From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: shunichi fuji <palglowr@gmail.com>,
Pierre Habouzit <madcoder@debian.org>,
Andreas Ericsson <ae@op5.se>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH] Unify the use of standard set of exclude files
Date: Wed, 14 Nov 2007 22:38:41 -0800 [thread overview]
Message-ID: <7v4pfo813i.fsf_-_@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vsl39l0b7.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 14 Nov 2007 00:05:00 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> We probably could change git-ls-files to use the standard set
> when no excludes are specified from the command line, or
> something like that, but this will be a change in semantics that
> would affect the scripts in a subtle way. I am somewhat
> reluctant to make such a change.
So here it is.
This teaches "git ls-files" to read the standard set of exclude
files when no exclude patterns nor files is given from the
command line. We used to error out in such a case.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin-ls-files.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index e0b856f..50dcb89 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -542,11 +542,8 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
ps_matched = xcalloc(1, num);
}
- if (dir.show_ignored && !exc_given) {
- fprintf(stderr, "%s: --ignored needs some exclude pattern\n",
- argv[0]);
- exit(1);
- }
+ if (dir.show_ignored && !exc_given)
+ setup_standard_excludes(&dir);
/* With no flags, we default to showing the cached files */
if (!(show_stage | show_deleted | show_others | show_unmerged |
next prev parent reply other threads:[~2007-11-15 6:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 21:49 git-clean won't read global ignore shunichi fuji
2007-11-13 22:50 ` Pierre Habouzit
2007-11-14 8:05 ` Junio C Hamano
2007-11-14 8:42 ` Andreas Ericsson
2007-11-14 9:03 ` Junio C Hamano
2007-11-14 17:46 ` Johannes Schindelin
2007-11-15 4:21 ` Miles Bader
2007-11-15 4:33 ` Miles Bader
2007-11-15 6:38 ` Junio C Hamano [this message]
2007-11-15 7:04 ` [PATCH] Unify the use of standard set of exclude files Jeff King
2007-11-15 9:03 ` Junio C Hamano
2007-11-15 9:15 ` Jeff King
2007-11-15 7:41 ` Junio C Hamano
2007-11-15 10:07 ` git-clean won't read global ignore Matthieu Moy
2007-11-15 17:27 ` Junio C Hamano
2007-11-15 17:50 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4pfo813i.fsf_-_@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=madcoder@debian.org \
--cc=palglowr@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).