Skip to content

Commit 4e49779

Browse files
committed
rebase (autostash): avoid duplicate call to state_dir_path()
We already called that function at this point, and stored the result in the `path` variable. We might just as well use it ;-) Signed-off-by: Johannes Schindelin <[email protected]> Reviewed-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent f4edc8c commit 4e49779

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/rebase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static int apply_autostash(struct rebase_options *opts)
250250
if (!file_exists(path))
251251
return 0;
252252

253-
if (read_one(state_dir_path("autostash", opts), &autostash))
253+
if (read_one(path, &autostash))
254254
return error(_("Could not read '%s'"), path);
255255
argv_array_pushl(&stash_apply.args,
256256
"stash", "apply", autostash.buf, NULL);

0 commit comments

Comments
 (0)