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

Re: git refuses to switch to older branches

From
Martin Waitz <tali@admingilde.org>
Date
Aug 20, 2006, 12:19 UTC
Message-ID
<20060820121935.GF30022@admingilde.org>
In-Reply-To
<20060820072612.GA6003@steel.home>
hoi :)
On Sun, Aug 20, 2006 at 09:26:12AM +0200, Alex Riesen wrote:
Show 16 quoted lines
> Junio C Hamano, Sun, Aug 20, 2006 00:39:20 +0200:
> > Martin Waitz <tali@admingilde.org> writes:
> > 
> > > This safety measure is quite useful normally, but for files that are
> > > explicitly marked as to-be-ignored it should not be neccessary.
> > >
> > > But all the code that handles .gitignore is only used by ls-files now.
> > > Does it make sense to add exclude handling to unpack-trees.c, too?
> > 
> > In principle, I am not opposed to the idea of making read-tree
> > take the ignore information into consideration.
> > 
> > But I would suggest you to be _extremely_ careful if you want to
> 
> It should be optional. And off by default, people already have got
> scripts depending on this behaviour (well, I have).

but having this sort of behaviour optional is bad, I think. Some people will depend on one semantic and others on the other. And then get bite if they want to share their scripts. We have to find _one_ semantic that always works.

Show 8 quoted lines
> > try this.  I do not have an example offhand, but I would not be
> > surprised at all if there is a valid use case where it is useful
> > to have a pattern that matches a tracked file in .gitignore
> > file.
> 
> Ignored directory and but some files/subdirectories in it are tracked,
> because this is temporary or externally changed data (I have both
> examples).

but do you have non-tracked files in the ignored directory that you really care about, i.e. which must not be overridden by a tracked file with the same name?

-- 
Martin Waitz
Previous: Alex RiesenNext: Alex Riesen
Message 14 of 15 in “git refuses to switch to older branches”
  1. Martin WaitzAug 19, 2006
  2. Jakub NarebskiAug 19, 2006
  3. Junio C HamanoAug 19, 2006
  4. Jakub NarebskiAug 19, 2006
  5. Junio C HamanoAug 20, 2006
  6. Junio C HamanoAug 19, 2006
  7. Petr BaudisAug 19, 2006
  8. Martin WaitzAug 20, 2006
  9. Johannes SchindelinAug 20, 2006
  10. Martin WaitzAug 20, 2006
  11. Johannes SchindelinAug 20, 2006
  12. Josef WeidendorferAug 20, 2006
  13. Alex RiesenAug 20, 2006
  14. Martin WaitzAug 20, 2006
  15. Alex RiesenSep 8, 2006

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.