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

Re: [PATCH] git-submodule: Remove duplicate entries during merge with conflict

From
Jens Lehmann <jens.lehmann@web.de>
Date
Mar 21, 2011, 20:53 UTC
Message-ID
<4D87BAC7.4010505@web.de>
In-Reply-To
<4D870FAB.4050307@morey-chaisemartin.com>
Am 21.03.2011 09:43, schrieb Nicolas Morey-Chaisemartin:
> I agree that the actual behavior of status is definitely wrong and it should be changed.
Yup.
> But I think there needs to be a simple way for a user to know whats happening to a conflicted submodule.
> When merging a file, editing the conflicting area in the code is often enough.
> For a submodule, I think the user needs an easy access to which branch used what SHA1.
You can see the sha1s using "git diff":

diff --cc submod index bd4cfe7,7128fbd..0000000

--- a/submod
+++ b/submod

(But the sha1s don't tell you much about what differing commits you
have in the submodule branches, which would be really helpful for
deciding how to solve the merge conflict. Unfortunately "git diff
--submodule" doesn't work for merge conflicts yet, another issue on
my ToDo-list ...)

> Git submodule status is probably not the right place to do that.

I agree.

> git ls-files --stage allows that but it's not part of the standard porcelain commands...

And it shows you three sha1s, one of them being the current state of
the submodule. Me thinks the output of "git diff" is easier to digest.

> I'll check/test the patch you proposed as soon as possible and repost it if it's allright !

Cool!
Previous: Nicolas Morey-ChaisemartinNext: Jens Lehmann
Message 5 of 14 in “git-submodule: Remove duplicate entries during merge with conflict”
  1. git-submodule: Remove duplicate entries during merge with conflictNicolas Morey-Chaisemartin, Mar 17, 2011
  2. Junio C HamanoMar 17, 2011
  3. Junio C HamanoMar 17, 2011
  4. Nicolas Morey-ChaisemartinMar 21, 2011
  5. Jens LehmannMar 21, 2011
  6. Jens LehmannMar 21, 2011
  7. Junio C HamanoMar 21, 2011
  8. Nicolas Morey-ChaisemartinMar 21, 2011
  9. Jens LehmannMar 21, 2011
  10. Nicolas Morey-ChaisemartinMar 22, 2011
  11. funeeldyJul 14, 2011
  12. Jens LehmannJul 15, 2011
  13. Marlene CoteJul 15, 2011
  14. Jens LehmannJul 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.