Skip to content

Commit bf8fc21

Browse files
committed
Merge branch 'maint'
* maint: ls-files: die instead of fprintf/exit in -i error
2 parents 651aef3 + ac78b00 commit bf8fc21

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

builtin-ls-files.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,8 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
524524
ps_matched = xcalloc(1, num);
525525
}
526526

527-
if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given) {
528-
fprintf(stderr, "%s: --ignored needs some exclude pattern\n",
529-
argv[0]);
530-
exit(1);
531-
}
527+
if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given)
528+
die("ls-files --ignored needs some exclude pattern");
532529

533530
/* With no flags, we default to showing the cached files */
534531
if (!(show_stage | show_deleted | show_others | show_unmerged |

0 commit comments

Comments
 (0)