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>
Johannes Schindelin committed
Oct 22, 2018 at 15:15 UTC
71064e6008d13de72de0387a1301a557477cbed2
1 file changed
+1
-1
builtin/rebase.c
+1
-1
@@ -250,7 +250,7 @@ static int apply_autostash(struct rebase_options *opts)
250
if (!file_exists(path))
251
return 0;
252
253
- if (read_one(state_dir_path("autostash", opts), &autostash))
253
+ if (read_one(path, &autostash))
254
return error(_("Could not read '%s'"), path);
255
argv_array_pushl(&stash_apply.args,
256
"stash", "apply", autostash.buf, NULL);