]> git.ipfire.org Git - thirdparty/git.git/blobdiff - wt-status.c
Merge branch 'ob/sequencer-empty-hint-fix' into maint-2.42
[thirdparty/git.git] / wt-status.c
index 5b1378965c9aa37505a23cf9c472f1abe4d8503e..bdbcf73cbf482ad87ac974a6ef3b21cfc80c1411 100644 (file)
@@ -2655,8 +2655,12 @@ int require_clean_work_tree(struct repository *r,
        }
 
        if (err) {
-               if (hint)
+               if (hint) {
+                       if (!*hint)
+                               BUG("empty hint passed to require_clean_work_tree();"
+                                   " use NULL instead");
                        error("%s", hint);
+               }
                if (!gently)
                        exit(128);
        }