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

Possibly-spurious 'not uptodate. Cannot merge'

From
Nix <nix@esperi.org.uk>
Date
Dec 14, 2008, 16:47 UTC
Message-ID
<874p16puuq.fsf@hades.wkstn.nix>

Recently (as of perhaps git 1.5.4?), whenever I update my l-k tree I get this:

loki 504 /usr/packages/linux/linux% git pull
remote: Counting objects: 638, done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 517 (delta 430), reused 516 (delta 430)
Receiving objects: 100% (517/517), 74.91 KiB, done.
Resolving deltas: 100% (430/430), completed with 120 local objects.
From git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y
   078bb16..5defaf8  master     -> 2.6.27-stable/master
 * [new tag]         v2.6.27.9  -> v2.6.27.9
error: Entry 'Makefile' not uptodate. Cannot merge.
fatal: merging of trees 34f70ec1fadcaad7de6979491e2dea9da735e6f9 and ded3f44559ce050e0ef014ebce093c5d9295ede8 failed
Merge with strategy recursive failed.

In this situation, 'git diff' reports no changes at all, but 'git reset --hard' gets the tree back into a state where merging succeeds, as does 'git update-index --refresh'.

I suspect the 'problem' is that I've hardlinked a bunch of build trees to this tree in the interim via 'cp -al', then applied patches to each of those trees with quilt, then deleted all those trees prior to the git pull. This doesn't change the original files at all, but *does* update their link count: is git getting annoyed by the corresponding change in ctime? (If so, why did it start happening only fairly recently?)

Next: Junio C Hamano
Message 1 of 5 in “Possibly-spurious 'not uptodate. Cannot merge'”
  1. NixDec 14, 2008
  2. Junio C HamanoDec 14, 2008
  3. NixDec 14, 2008
  4. Sitaram ChamartyDec 15, 2008
  5. Junio C HamanoDec 15, 2008

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.