git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] clean: new option --exclude-from

From
Jeff King <peff@peff.net>
Date
Dec 2, 2015, 16:47 UTC
Message-ID
<20151202164712.GA16636@sigill.intra.peff.net>
In-Reply-To
<xmqqlh9c6byy.fsf@gitster.mtv.corp.google.com>
On Wed, Dec 02, 2015 at 08:40:05AM -0800, Junio C Hamano wrote:
Show 6 quoted lines
> But for this particular one, I viewed the topic as adding a new
> option as a shorter way for passing multiple -e <pattern> options on
> the command line.  When viewed that way, even if core.excludesfile
> were multi-valued, I wouldn't have imagined that people would try to
> use that mechanism for such a purpose--for one thing, the precedence
> order is wrong for that purpose, isn't it?
Good point. I didn't think about precedence at all.

I perhaps shouldn't have brought up core.excludesfile as all. I only meant it as "you maybe can hack your way through to this without adding any code".

I think a real option to do git-wide excludes would probably be more like:

  git --exclude-from=/path/to/file clean ...

and that in turn would probably set GIT_EXCLUDE_FROM to a colon-separated list of paths (or similar) so that sub-processes would respect it, too.

On the other hand, one could make the same argument about the existing "-e". You cannot do:

  git add --exclude='*.o' .

right now. So maybe "clean" is really the only place where people care about such ad-hoc exclusion. Or maybe this an opportunity to add:

  git --exclude='*.o' clean

I dunno. I cannot think of a time when I would have used any of those options myself.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 21 in “clean: new option --exclude-from”
  1. clean: new option --exclude-fromJames, Nov 26, 2015
  2. Eric SunshineNov 30, 2015
  3. Jeff KingDec 2, 2015
  4. Junio C HamanoDec 2, 2015
  5. Jeff KingDec 2, 2015
  6. Junio C HamanoDec 2, 2015
  7. Jeff KingDec 2, 2015
  8. Junio C HamanoDec 2, 2015
  9. Jeff KingDec 2, 2015
  10. Junio C HamanoDec 6, 2015
  11. Jeff KingDec 7, 2015
  12. Eric SunshineDec 1, 2015
  13. 1/2 modernize t7300James, Dec 6, 2015
  14. 2/2 clean: new option --exclude-fromJames, Dec 6, 2015
  15. Jeff KingDec 7, 2015
  16. Junio C HamanoDec 7, 2015
  17. Eric SunshineDec 7, 2015
  18. Junio C HamanoDec 7, 2015
  19. Eric SunshineDec 7, 2015
  20. Junio C HamanoDec 7, 2015
  21. Eric SunshineDec 7, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.