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

Re: [PATCH v2 2/2] Submodules: Don't parse .gitmodules when it contains, merge conflicts

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
May 15, 2011, 05:00 UTC
Message-ID
<BANLkTim_J7gW1rW+yO74ETEjFcHhyArBRg@mail.gmail.com>
In-Reply-To
<7vfwoh5fom.fsf@alter.siamese.dyndns.org>
On Sun, May 15, 2011 at 12:56 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>
>> On Sat, May 14, 2011 at 11:26 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>> Commands like "git status", "git diff" and "git fetch" would fail when the
>>> .gitmodules file contained merge conflicts because ...
>>
>> Side note. .gitattributes and .gitignore likely suffer the same.
>> Perhaps the unmerged check in this patch can be generalized for reuse.
>
> I am somewhat skeptical about that statement.  These files are designed to
> be one-entry-per-line so that useful information in the non-conflicted
> parts in a conflicted file (which should be majority) can still be used.
> Only the .gitmodules is an oddball.

True for .gitignore. A line in .gitattributes is more complex, it's easier to break the parser with conflict markers. Anyway unmerged entries should not be used until they're cleaned up, or can be used with a big fat warning.

-- 
Duy
Previous: Junio C Hamano
Message 7 of 7 in “better handle .gitmodules merge conflicts”
  1. 0/2 better handle .gitmodules merge conflictsJens Lehmann, May 14, 2011
  2. 1/2 test that git status works with merge conflict in, .gitmodulesJens Lehmann, May 14, 2011
  3. 2/2 Submodules: Don't parse .gitmodules when it contains, merge conflictsJens Lehmann, May 14, 2011
  4. Nguyen Thai Ngoc DuyMay 14, 2011
  5. Jens LehmannMay 14, 2011
  6. Junio C HamanoMay 14, 2011
  7. Nguyen Thai Ngoc DuyMay 15, 2011

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.