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

Re: different git-merge behavior with regard to submodules in 1.6.2.4 vs. 1.6.2.1

From
Finn Arne Gangstad <finnag@pvv.org>
Date
Apr 28, 2009, 21:12 UTC
Message-ID
<20090428211257.GA31191@pvv.org>
In-Reply-To
<7v4ow8my1u.fsf@gitster.siamese.dyndns.org>
On Tue, Apr 28, 2009 at 11:29:49AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Tim Olsen <tim@brooklynpenguin.com> writes:
> 
> > $ git merge origin/deployed
> > fatal: cannot read object 83055ffdddde60d41d9811aae77e78be50b329f8
> > 'rubydav': It is a submodule!
> >
> > Nothing in my history suggests that rubydav was at one point not a
> > submodule.
[...]
Show 24 quoted lines
> > So then I downgraded to the last debian package of git which is 1.6.2.1.
> >  Now I get a result which is more approachable:
> >
> > $ git merge origin/deployed
> > Auto-merging rubydav
> > CONFLICT (submodule): Merge conflict in rubydav - needs
> > 167a344227c4745031d50a210869e6fb59a5ac03
> > Auto-merging server
> > CONFLICT (submodule): Merge conflict in server - needs
> > 82a74ae791c8563ca65f29187d2fe5ebfbc167ea
> > Automatic merge failed; fix conflicts and then commit the result.
> >
> > Both merges are from freshly checked out clones.
> >
> > Is this a bug in 1.6.2.4?  Please let me know what other information I
> > can provide to help debug the problem.
> 
> Thanks for a report.  I think the following commits are involved.
> 
>     39d8e27 simplify output of conflicting merge
>     0eb6574 update cache for conflicting submodule entries
>     f37ae35 add tests for merging with submodules
> 
> Clemens, these seem to be yours.  Thoughts?

The current error message is not an improvement I think, it should say that merge does not support merging submodules, not complain about being unable to read some object because it is a submodule.

I added the "CONFLICT (submodule) Merge conflict .. needs <SHA-1>" messages when I tried to work with submodules a while (1-2 years?) ago. The intention was that you could enter the submodule(s), write "git merge <SHA-1>", and resolve the conflict that way.

git is unfortunately not capable of merging submodules at all, so I added these error messages to give me a hint about what I needed to do in conflicting submodules to get something useful. I have used git a lot more now, so maybe it is time to pick this up again and implement proper recursive sub-module merging.

- Finn Arne
Previous: Junio C HamanoNext: Clemens Buchacher
Message 3 of 15 in “different git-merge behavior with regard to submodules in 1.6.2.4 vs. 1.6.2.1”
  1. Tim OlsenApr 28, 2009
  2. Junio C HamanoApr 28, 2009
  3. Finn Arne GangstadApr 28, 2009
  4. Clemens BuchacherApr 29, 2009
  5. Finn Arne GangstadApr 29, 2009
  6. Teach gitlinks to combine-diffJunio C Hamano, Apr 29, 2009
  7. diff -c -p: do not die on submodulesJunio C Hamano, Apr 29, 2009
  8. Alex RiesenApr 29, 2009
  9. Johannes SchindelinApr 29, 2009
  10. Alex RiesenApr 29, 2009
  11. Johannes SchindelinApr 29, 2009
  12. Alex RiesenApr 30, 2009
  13. Finn Arne GangstadApr 30, 2009
  14. Junio C HamanoApr 29, 2009
  15. Junio C HamanoApr 29, 2009

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.