Submodule problem

Jim Meyering jim at meyering.net
Fri May 13 16:09:34 UTC 2011


Pete Zaitcev wrote:
> This happened:
>
> [zaitcev at lembas iwhd-tip]$ git pull
> remote: Counting objects: 98, done.
> remote: Compressing objects: 100% (73/73), done.
> remote: Total 74 (delta 51), reused 0 (delta 0)
> Unpacking objects: 100% (74/74), done.
> From /q/zaitcev/hail/iwhd-0
>    4fa67c2..6ebedfe  master     -> origin/master
> From /q/zaitcev/hail/iwhd-0
>  * [new tag]         v0.94      -> v0.94
> warning: Failed to merge submodule gnulib (commits not present)
> Auto-merging bootstrap.conf
> Auto-merging gnulib
> CONFLICT (submodule): Merge conflict in gnulib
> Auto-merging rest.c
> Automatic merge failed; fix conflicts and then commit the result.
> [zaitcev at lembas iwhd-tip]$

Hi Pete,

Did you ever use a command like this?

  ./bootstrap --gnulib-srcdir=../gnulib

If so, you may need to update that ../gnulib repository,
and then retry from iwhd.

Another explanation: somehow you committed (locally) an update to gnulib,
and when you try to pull in my changes (which also update gnulib,
but to a different SHA1), you get a conflict.

> And now:
>
> [zaitcev at lembas iwhd-tip]$ git pull
> M       .prev-version
> M       NEWS
> A       README-release
> ...........
> A       t/exercise
> M       template.h
> Pull is not possible because you have unmerged files.
> Please, fix them up in the work tree, and then use 'git add/rm <file>'
> as appropriate to mark resolution, or use 'git commit -a'.
> [zaitcev at lembas iwhd-tip]$ git commit -a
> U       gnulib
> fatal: 'commit' is not possible because you have unmerged files.
> Please, fix them up in the work tree, and then use 'git add/rm <file>' as
> appropriate to mark resolution and make a commit, or use 'git commit -a'.
> [zaitcev at lembas iwhd-tip]$
>
> You know, maybe we ought to quit this "submodule" thing and just
> document how to check out the right gnulib explicitly.

Believe me, if there were a better way, I'd be using it ;-)
However, for reproducibility (i.e., bisectability), and for the
ability to stage our development, I've found that using a
submodule is essential.

BTW, this is a good demonstration of why it is useful to
develop your changes on a branch, or at least to always
commit locally before running "git pull".


More information about the iwhd-devel mailing list