summaryrefslogtreecommitdiff
path: root/upload-pack.h
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2022-01-04 23:04:58 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-04 15:37:45 -0800
commit71cade5a0b172ece7edf0ccb4420dd5b9a07e71a (patch)
treee3b8d81ee3e255662ef0b0052131416cdc3e9b65 /upload-pack.h
parentstash: restore untracked files AFTER restoring tracked files (diff)
downloadtgif-71cade5a0b172ece7edf0ccb4420dd5b9a07e71a.tar.xz
stash: do not return before restoring untracked files
In commit bee8691f19 ("stash: restore untracked files AFTER restoring tracked files", 2021-09-10), we correctly identified that we should restore changes to tracked files before attempting to restore untracked files, and accordingly moved the code for restoring untracked files a few lines down in do_apply_stash(). Unfortunately, the intervening lines had some early return statements meaning that we suddenly stopped restoring untracked files in some cases. Even before the previous commit, there was another possible issue with the current code -- a post-stash-apply 'git status' that was intended to be run after restoring the stash was skipped when we hit a conflict (or other error condition), which seems slightly inconsistent. Fix both issues by saving the return status, and letting other functionality run before returning. Reported-by: AJ Henderson Test-case-by: Randall S. Becker <randall.becker@nexbridge.ca> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.h')
0 files changed, 0 insertions, 0 deletions