diff --git a/builtin/rebase.c b/builtin/rebase.c index 418624837c132a..30d58118c66dd9 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -253,6 +253,8 @@ static int apply_autostash(struct rebase_options *opts) if (read_one(path, &autostash)) return error(_("Could not read '%s'"), path); + /* Ensure that the hash is not mistake for a number */ + strbuf_addstr(&autostash, "^0"); argv_array_pushl(&stash_apply.args, "stash", "apply", autostash.buf, NULL); stash_apply.git_cmd = 1;