зеркало из https://github.com/microsoft/git.git
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 <johannes.schindelin@gmx.de> Reviewed-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
5541bd5b8f
Коммит
71064e6008
|
@ -250,7 +250,7 @@ static int apply_autostash(struct rebase_options *opts)
|
|||
if (!file_exists(path))
|
||||
return 0;
|
||||
|
||||
if (read_one(state_dir_path("autostash", opts), &autostash))
|
||||
if (read_one(path, &autostash))
|
||||
return error(_("Could not read '%s'"), path);
|
||||
argv_array_pushl(&stash_apply.args,
|
||||
"stash", "apply", autostash.buf, NULL);
|
||||
|
|
Загрузка…
Ссылка в новой задаче