{"thread":{"id":"439","subject":"cogito: linux-2.6 merge fails due to cg-rm","startedAt":"2005-05-02T17:12:50Z","lastAt":"2005-05-02T23:10:21Z","messageCount":3,"participants":["Matt Porter","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"2374","messageId":"20050502101250.A21716@cox.net","threadId":"439","inReplyTo":null,"subject":"cogito: linux-2.6 merge fails due to cg-rm","fromName":"Matt Porter","fromEmail":"mporter@kernel.crashing.org","sentAt":"2005-05-02T17:12:50Z","receivedAt":"2005-05-02T17:12:50Z","isPatch":false,"sender":{"key":"mporter@kernel.crashing.org","avatar":null},"body":"I guess it was bound to happen after reading rmk's issues. I finally\nhad a working tree of mine fail to merge from linus' tree while doing\na cg-update. I'm using cogito 0.8.  I had to hand merge something\ndue to DocBook Makefile changes but the real problem was in the\nset of files that were removed:\n\nDocumentation/DocBook/tulip-user.tmpl\nDocumentation/DocBook/via-audio.tmpl\narch/um/kernel/sys_call_table.c\ndrivers/video/intelfb/intelfbdrv.h\nscripts/makeman\nscripts/split-man\n\nThese kept showing up as \"needs merged\" even though I explicitly\ntried to cg-rm them or \"update-cache --remove\" them. It turns out\nthat cg-rm is 'rm -f'ing the files before calling update-cache.\nBy touching each file, and then modifying cg-rm as follows, I\nwas able to complete the merge. I'm not sure yet if this is the\nproper fix to the cogito script. It at least made update-cache\nhappy for this remove case.\n\n-Matt\n\n--- c3aa1e6b53cc59d5fbe261f3f859584904ae3a63/cg-rm  (mode:100755 sha1:029a03128eb7a8dd807335fea2ff52cb2bcda4fa)\n+++ uncommitted/cg-rm  (mode:100755)\n@@ -10,5 +10,5 @@\n\n [ \"$1\" ] || die \"usage: cg-rm FILE...\"\n\n-rm -f \"$@\"\n update-cache --remove -- \"$@\"\n+rm -f \"$@\"\n\n"},{"id":"2377","messageId":"20050502102034.B21716@cox.net","threadId":"439","inReplyTo":"20050502101250.A21716@cox.net","subject":"Re: cogito: linux-2.6 merge fails due to cg-rm","fromName":"Matt Porter","fromEmail":"mporter@kernel.crashing.org","sentAt":"2005-05-02T17:20:34Z","receivedAt":"2005-05-02T17:20:34Z","isPatch":false,"sender":{"key":"mporter@kernel.crashing.org","avatar":null},"body":"On Mon, May 02, 2005 at 10:12:50AM -0700, Matt Porter wrote:\n> These kept showing up as \"needs merged\" even though I explicitly\n> tried to cg-rm them or \"update-cache --remove\" them. It turns out\n> that cg-rm is 'rm -f'ing the files before calling update-cache.\n> By touching each file, and then modifying cg-rm as follows, I\n> was able to complete the merge. I'm not sure yet if this is the\n> proper fix to the cogito script. It at least made update-cache\n> happy for this remove case.\n\nLooking a bit further, I see the cg-Xmergefile also removes the\nfile before update-cache --remove which doesn't seem to work. This\nseems to be the actual culprit during the merge, but cg-rm needed\nfixed to manually fix without calling git commands directly.\n\n-Matt\n"},{"id":"2412","messageId":"20050502231021.GI20818@pasky.ji.cz","threadId":"439","inReplyTo":"20050502102034.B21716@cox.net","subject":"Re: cogito: linux-2.6 merge fails due to cg-rm","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-02T23:10:21Z","receivedAt":"2005-05-02T23:10:21Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, May 02, 2005 at 07:20:34PM CEST, I got a letter\nwhere Matt Porter <mporter@kernel.crashing.org> told me that...\n> On Mon, May 02, 2005 at 10:12:50AM -0700, Matt Porter wrote:\n> > These kept showing up as \"needs merged\" even though I explicitly\n> > tried to cg-rm them or \"update-cache --remove\" them. It turns out\n> > that cg-rm is 'rm -f'ing the files before calling update-cache.\n> > By touching each file, and then modifying cg-rm as follows, I\n> > was able to complete the merge. I'm not sure yet if this is the\n> > proper fix to the cogito script. It at least made update-cache\n> > happy for this remove case.\n> \n> Looking a bit further, I see the cg-Xmergefile also removes the\n> file before update-cache --remove which doesn't seem to work. This\n> seems to be the actual culprit during the merge, but cg-rm needed\n> fixed to manually fix without calling git commands directly.\n\nOops, this was de facto fixed long time ago (by Junio) but for some\nreason was not physically merged to my tree. (He already pointed out,\nbut I re-forgot to fix it back then.) update-cache --remove is supposed\nto remove missing files, so the cg- code is correct.\n\nShould be fixed now. Thanks for pointing it out.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"}]}