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

Re: merging .gitignore

From
MKmartin f krafft <madduck@madduck.net>
Date
Oct 2, 2007, 19:51 UTC
Message-ID
<20071002195148.GA14171@lapse.madduck.net>
In-Reply-To
<Pine.LNX.4.64.0710011457120.28395@racer.site>
also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.10.01.1457 +0100]:
> You might be interested in writing a merge driver.  See 
> Documentation/gitattributes.txt.
This is an excellent idea; thanks.
also sprach Andy Parkins <andyparkins@gmail.com> [2007.10.01.1448 +0100]:
Show 6 quoted lines
> Then, assuming the conflicts you get now occur for a reason, you
> will get conflicts within the .gitignore.d/ directory.  Let's say
> branchCignores adds *.o and branchFignores removes *.o from the
> ignores.  Who is right?  Who knows, and worse than that you didn't
> see the conflict when it happened so it wasn't resolved and the
> master branch was left with conflicts in it.

Well, with gitignore I am ready to say that merges should be resolved in an additive way. Remember that I am talking about an intergration branch, and if feature branches A and B used to ignore .o files, and now B suddenly does not ignore them anymore, the only real reason I can think of is that it was rewritten in a languages other than C*. So then you *still* want to ignore .o files in the integration branch.

Basically I am saying that it should be
  cat $gitignore_files | sort -u

and obviously, this is something for a specific merge driver, as Johannes suggested.

Thanks for the feedback,
-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
minchinhampton (n.): the expression on a man's face when he has just
zipped up his trousers without due care and attention.
                               -- douglas adams, the meaning of liff
 
spamtraps: madduck.bogus@madduck.net
Previous: Johannes SchindelinNext: Junio C Hamano
Message 4 of 20 in “merging .gitignore”
  1. martin f krafftOct 1, 2007
  2. Andy ParkinsOct 1, 2007
  3. Johannes SchindelinOct 1, 2007
  4. martin f krafftOct 2, 2007
  5. Junio C HamanoOct 2, 2007
  6. martin f krafftOct 2, 2007
  7. Pierre HabouzitOct 2, 2007
  8. Pierre HabouzitOct 2, 2007
  9. martin f krafftOct 2, 2007
  10. Pierre HabouzitOct 2, 2007
  11. martin f krafftOct 2, 2007
  12. Pierre HabouzitOct 2, 2007
  13. martin f krafftOct 3, 2007
  14. Pierre HabouzitOct 3, 2007
  15. Pierre HabouzitOct 2, 2007
  16. Andy ParkinsOct 3, 2007
  17. Johan HerlandOct 3, 2007
  18. Johannes SchindelinOct 3, 2007
  19. Johan HerlandOct 3, 2007
  20. Junio C HamanoOct 3, 2007

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.