summaryrefslogtreecommitdiff
path: root/builtin/rebase.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-10-23 19:57:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-24 04:38:15 (GMT)
commitffae8b2f904f0a82417ac24cb2684bbe5ca234e1 (patch)
treef680029f98ea21294a2eae082342bccd27a872bf /builtin/rebase.c
parent97bd162ca21dcc190327570ae8e6bd8a54582a23 (diff)
downloadgit-ffae8b2f904f0a82417ac24cb2684bbe5ca234e1.zip
git-ffae8b2f904f0a82417ac24cb2684bbe5ca234e1.tar.gz
git-ffae8b2f904f0a82417ac24cb2684bbe5ca234e1.tar.bz2
rebase --autostash: fix issue with dirty submodules
Since we cannot stash dirty submodules, there is no use in requiring them to be clean (or stash them when they are not). This brings the built-in rebase in line with the previous, scripted version, which also did not care about dirty submodules (but it was admittedly not very easy to figure that out). This fixes https://github.com/git-for-windows/git/issues/1820 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
-rw-r--r--builtin/rebase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e9995c9..bc92c9b 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1350,7 +1350,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
update_index_if_able(&the_index, &lock_file);
rollback_lock_file(&lock_file);
- if (has_unstaged_changes(0) || has_uncommitted_changes(0)) {
+ if (has_unstaged_changes(1) || has_uncommitted_changes(1)) {
const char *autostash =
state_dir_path("autostash", &options);
struct child_process stash = CHILD_PROCESS_INIT;