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

Re: merging .gitignore

From
APAndy Parkins <andyparkins@gmail.com>
Date
Oct 3, 2007, 08:23 UTC
Message-ID
<200710030923.22767.andyparkins@gmail.com>
In-Reply-To
<20071002195148.GA14171@lapse.madduck.net>
On Tuesday 2007 October 02, martin f krafft wrote:
> 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

Okay; *.o was obviously not a good example. A more detailed one: how about a change like this to a makefile (excuse bastardised diff format)

diff Makefile -include depends.make +include depends.mak

diff .gitignore -depends.make +depends.mak

>   cat $gitignore_files | sort -u

Now, say there is another branch that makes exactly this change but chooses "depends.inc" as the filename. Your "additive only" merge of .gitignore will not flag the conflict and will leave a .gitignore with

depends.mak depends.inc

The makefile conflict will have been resolved one way or the other but the gitignore conflict will not. While it's not a serious fault it is wrong, and no one was signalled that it was wrong.

I am still having difficult seeing why you want to hide conflicts in .gitignore. It's just as possible to get and resolve conflicts in gitignore as in any other file.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Pierre HabouzitNext: Johan Herland
Message 16 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.