summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-11 16:43:28 +0700
committerJunio C Hamano <gitster@pobox.com>2018-02-12 14:07:59 -0800
commitfbd7a23237094c3fb2e249bbcacbbf1e858e79c9 (patch)
treee6d0c78248f7bd326f68baafc894bff7cb75eb2a /git-rebase.sh
parent66335298a47032267edd6d6e7a71cc337e46e995 (diff)
downloadgit-fbd7a23237094c3fb2e249bbcacbbf1e858e79c9.tar.gz
rebase: introduce and use pseudo-ref REBASE_HEADnd/rebase-show-current-patch
The new command `git rebase --show-current-patch` is useful for seeing the commit related to the current rebase state. Some however may find the "git show" command behind it too limiting. You may want to increase context lines, do a diff that ignores whitespaces... For these advanced use cases, the user can execute any command they want with the new pseudo ref REBASE_HEAD. This also helps show where the stopped commit is from, which is hard to see from the previous patch which implements --show-current-patch. Helped-by: Tim Landscheidt <tim@tim-landscheidt.de> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 41c915d18c..a13a581fe6 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -182,6 +182,7 @@ You can run "git stash pop" or "git stash drop" at any time.
}
finish_rebase () {
+ rm -f "$(git rev-parse --git-path REBASE_HEAD)"
apply_autostash &&
{ git gc --auto || true; } &&
rm -rf "$state_dir"