diff options
Diffstat (limited to 'builtin/add.c')
-rw-r--r-- | builtin/add.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/add.c b/builtin/add.c index 4c38aff419..57b3186f69 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -390,7 +390,8 @@ static int add_files(struct dir_struct *dir, int flags) fprintf(stderr, _(ignore_error)); for (i = 0; i < dir->ignored_nr; i++) fprintf(stderr, "%s\n", dir->ignored[i]->name); - fprintf(stderr, _("Use -f if you really want to add them.\n")); + if (advice_add_nothing) + advise(_("Use -f if you really want to add them.\n")); exit_status = 1; } @@ -480,7 +481,8 @@ int cmd_add(int argc, const char **argv, const char *prefix) if (require_pathspec && pathspec.nr == 0) { fprintf(stderr, _("Nothing specified, nothing added.\n")); - fprintf(stderr, _("Maybe you wanted to say 'git add .'?\n")); + if (advice_add_nothing) + advise( _("Maybe you wanted to say 'git add .'?\n")); return 0; } |