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

Re: merging .gitignore

From
Pierre Habouzit <madcoder@debian.org>
Date
Oct 2, 2007, 20:47 UTC
Message-ID
<20071002204748.GA19710@artemis.corp>
In-Reply-To
<20071002201318.GD16776@artemis.corp>
On mar, oct 02, 2007 at 08:13:18 +0000, Pierre Habouzit wrote:
Show 8 quoted lines
>   Ancestor: (aa*, aaa, bbb)
>   Left child: (aa*, bbb)   <-- remove aaa because aa* covers it
>   Right child: (aaa, aabcd, bbb, cc*) <-- remove aa* and be explicit
> 
>   The proper result is probably: (aaa, aabcd, bbb, cc*) but is in fact a
> case of conflict, because the "left" child could have used the fact that
> aa* was present and hide say a aaXXX that the right child did not had,
> and the merge would be wrong.
  Okay this example blows, I believe this one is better:
       (a*)
      /    \
  (ab*)    (ac*)
      \    /
       ????
  gitignore are subsets of the set of words.  if S is the ancestor set,
S1 and S2 the left and right sets. let Δ1 and Δ2 be S1 \ S and S2 \ S
respectively.  I think there is a conflict if
  Δ1 n Δ2 != 0 and (Δ1 is not a subset of Δ2) and (Δ2 is not a subset of Δ1)
  If the condition holds, then I believe that the "merged" .gitignore
would be: (S1 u S2) \ (Δ1 u Δ2)
  Though, don't take my word for it, I've only sketched this on a small
piece of paper, and have no rigorous proof.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Pierre HabouzitNext: martin f krafft
Message 8 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.