diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-11-10 06:48:49 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-12 14:50:05 +0900 |
| commit | 5b02ca38a30298a963b3595f2cd884e11cf10c09 (patch) | |
| tree | 27e8e4a3773307ff5087ec29c3ecbb5982350004 /builtin/rebase.c | |
| parent | Ninth batch for 2.20 (diff) | |
| download | git-5b02ca38a30298a963b3595f2cd884e11cf10c09.tar.gz git-5b02ca38a30298a963b3595f2cd884e11cf10c09.zip | |
wt-status.c: remove implicit dependency on the_index
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 'builtin/rebase.c')
| -rw-r--r-- | builtin/rebase.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 0ee06aa363..b9eb958454 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -983,7 +983,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) &lock_file); rollback_lock_file(&lock_file); - if (has_unstaged_changes(1)) { + if (has_unstaged_changes(the_repository, 1)) { puts(_("You must edit all merge conflicts and then\n" "mark them as resolved using git add")); exit(1); @@ -1351,7 +1351,8 @@ 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(1) || has_uncommitted_changes(1)) { + if (has_unstaged_changes(the_repository, 1) || + has_uncommitted_changes(the_repository, 1)) { const char *autostash = state_dir_path("autostash", &options); struct child_process stash = CHILD_PROCESS_INIT; @@ -1397,7 +1398,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) } } - if (require_clean_work_tree("rebase", + if (require_clean_work_tree(the_repository, "rebase", _("Please commit or stash them."), 1, 1)) { ret = 1; goto cleanup; |
