diff options
author | John Keeping <john@keeping.me.uk> | 2012-04-07 11:20:53 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-09 15:08:18 -0700 |
commit | a6754cda4362d129738d42d2683d07d433379e99 (patch) | |
tree | dbc792393be4cb289019c8f25ed410e67c67b29f /git-rebase--interactive.sh | |
parent | b1bcfbe34439ff6d1a04d0bddb01eebe4df418a5 (diff) | |
download | git-a6754cda4362d129738d42d2683d07d433379e99.tar.gz |
rebase -i continue: don't skip commits that only change submodules
When git-rebase--interactive stops due to a conflict and the only change
to be committed is in a submodule, the test for whether there is
anything to be committed ignores the staged submodule change. This
leads rebase to skip creating the commit for the change.
While unstaged submodule changes should be ignored to avoid needing to
update submodules during a rebase, it is safe to remove the
--ignore-submodules option to diff-index because --cached ensures that
it is only checking the index. This was discussed in [1] and a test is
included to ensure that unstaged changes are still ignored correctly.
[1] http://thread.gmane.org/gmane.comp.version-control.git/188713
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r-- | git-rebase--interactive.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 5812222eb9..454674976e 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -672,7 +672,7 @@ rearrange_squash () { case "$action" in continue) # do we have anything to commit? - if git diff-index --cached --quiet --ignore-submodules HEAD -- + if git diff-index --cached --quiet HEAD -- then : Nothing to commit -- skip this else |