summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-02-15 18:54:38 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 12:25:49 +0100
commit1318a9419f2b6dae0318146cb9fe08d3f4ceb780 (patch)
tree3ccf8f46ab7d0f3b111dc7f98c05517ed896dd0c
parent4afe3a6c47fc816a81d71308d18173a8013978f0 (diff)
git-debrebase: check head is clean before starting
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xgit-debrebase6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-debrebase b/git-debrebase
index 5913aa3..70808da 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -795,7 +795,10 @@ sub walk ($;$$) {
return @r
}
-sub get_head () { return git_rev_parse qw(HEAD); }
+sub get_head () {
+ git_check_unmodified();
+ return git_rev_parse qw(HEAD);
+}
sub update_head ($$$) {
my ($old, $new, $mrest) = @_;
@@ -929,7 +932,6 @@ sub record_ffq_prev () {
}
sub cmd_new_upstream_v0 () {
- # tree should be clean and this is not checked
# automatically and unconditionally launders before rebasing
# if rebase --abort is used, laundering has still been done