Skip to content

Commit 3525f1d

Browse files
committed
Merge branch 'ob/sequencer-empty-hint-fix'
The use of API for consistency between two calls to require_clean_work_tree() from the sequencer code has been cleaned up. * ob/sequencer-empty-hint-fix: sequencer: rectify empty hint in call of require_clean_work_tree()
2 parents 967bfc5 + a9b5955 commit 3525f1d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6229,7 +6229,7 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla
62296229
if (checkout_onto(r, opts, onto_name, &oid, orig_head))
62306230
goto cleanup;
62316231

6232-
if (require_clean_work_tree(r, "rebase", "", 1, 1))
6232+
if (require_clean_work_tree(r, "rebase", NULL, 1, 1))
62336233
goto cleanup;
62346234

62356235
todo_list_write_total_nr(&new_todo);

wt-status.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2655,8 +2655,12 @@ int require_clean_work_tree(struct repository *r,
26552655
}
26562656

26572657
if (err) {
2658-
if (hint)
2658+
if (hint) {
2659+
if (!*hint)
2660+
BUG("empty hint passed to require_clean_work_tree();"
2661+
" use NULL instead");
26592662
error("%s", hint);
2663+
}
26602664
if (!gently)
26612665
exit(128);
26622666
}

0 commit comments

Comments
 (0)