{"thread":{"id":"12428","subject":"kernel.org git tree corrupt?","startedAt":"2008-03-02T15:49:44Z","lastAt":"2008-03-04T04:42:34Z","messageCount":7,"participants":["Steve French","Linus Torvalds","Martin Langhoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70649","messageId":"524f69650803020749o469f2e48l125a55267b0b5d13@mail.gmail.com","threadId":"12428","inReplyTo":null,"subject":"kernel.org git tree corrupt?","fromName":"Steve French","fromEmail":"smfrench@gmail.com","sentAt":"2008-03-02T15:49:44Z","receivedAt":"2008-03-02T15:49:44Z","isPatch":false,"sender":{"key":"smfrench@gmail.com","avatar":"https://gravatar.com/avatar/abd38036fa7e26214d332fcd6240ad1cf8cd68b831b674e329b0b9071d5a1fb2?d=mp&s=160"},"body":"In preparation for a merge request I do\n    cg-diff -m -r origin: | diffstat -p1\n(git diff -m -r origin: shows the same problem) and\n    cg-log -m -r origin:\nfrom my kernel.org cifs-2.6.git tree against the linux-2.6.git which\nshould only show a small set of changes (typically only affecting one\ndirectory in the kernel source), but instead now is showing thousands\nof changesets with changed lines all over the tree.   The origin is\n        /pub/scm/linux/kernel/git/torvalds/linux-2.6.git\nand the only operation done on cifs-2.6.git is git pull (to merge in\nchanges from linux-2.6.git) and applying (patch and cg-commit) small\npatches (to the fs/cifs directory typically).    Even after doing git\npull again (and also git-fsck) that did not seem to help as there are\nstill thousands of changesets showing up when there should be fewer\nthan 30.   Was the linux-2.6.git rebuilt in the last four weeks with\ndifferent changeset numbers? Something seems to have drastically\nchanged in the kernel.org tree in the last few weeks.\n\nAny idea how to get around this ... short of going through all patches\nto fs/cifs saving the uncommitted ones off one by one by hand,\nrecloning the tree and reapplying them one by one?\nDoing \"cg-log -m -r origin: fs/cifs\" shows changesets that are already\nin linux-2.6.git (e.g. the vfs-wide changes to add path_put\n1d957f9bf87da74f420424d16ece005202bbebd3 and\n4ac9137858e08a19f29feac4e1f4df7c268b0ba5 )\n\nThe oldest patch which affects fs/cifs which incorrectly shows up as\nnot in mainline (ie shows up with cg-diff but is actually merged into\nboth mainline and my tree, and submitted and merged by someone else)\nis eebd2aa355692afaf9906f62118620f1a1c19dbb dated 2/4/2008 so I assume\nthat the problem started around then.\n\nIdeas for another solution short of recloning and sorting through all\nof the last month or two of patches that affect this directory by\nhand?\n\n\n-- \nThanks,\n\nSteve\n"},{"id":"70699","messageId":"alpine.LFD.1.00.0803021302070.17889@woody.linux-foundation.org","threadId":"12428","inReplyTo":"524f69650803020749o469f2e48l125a55267b0b5d13@mail.gmail.com","subject":"Re: kernel.org git tree corrupt?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-03-02T21:16:48Z","receivedAt":"2008-03-02T21:16:48Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 2 Mar 2008, Steve French wrote:\n>\n> In preparation for a merge request I do\n>     cg-diff -m -r origin: | diffstat -p1\n> (git diff -m -r origin: shows the same problem) and\n>     cg-log -m -r origin:\n\nFirst off, you really should lay off the cogito thing, it's pretty much \nguaranteed that any cogito usage will just be harder and less likely to be \ncorrect than just usign native git (and almost nobody will be able to help \nyou any more - it's not like it's been maintained for the last year).\n\nIt *sounds* like your \"origin\" isn't what you expect it to be. \n\n> Was the linux-2.6.git rebuilt in the last four weeks with different \n> changeset numbers? Something seems to have drastically changed in the \n> kernel.org tree in the last few weeks.\n\nNope, nothing has been rebuilt, but there's been another merge window, so \nthere's certainly been drastic changes.\n\n> Doing \"cg-log -m -r origin: fs/cifs\" shows changesets that are already\n> in linux-2.6.git (e.g. the vfs-wide changes to add path_put\n> 1d957f9bf87da74f420424d16ece005202bbebd3 and\n> 4ac9137858e08a19f29feac4e1f4df7c268b0ba5 )\n\nIn that case, your \"origin\" simply isn't updated, but points somewhere \nlong back in history. I can only assume that cogito has done something \nwrong, like not been able to handle packed refs or something, and you have \nan updated tree but \"origin\" pointing to way back in the history.\n\n> Ideas for another solution short of recloning and sorting through all\n> of the last month or two of patches that affect this directory by\n> hand?\n\nDo this:\n\n - get rid of cogito (or at least make sure that it doesn't mess up the \n   following sequence)\n\n - look at your .git/config file to make sure that the remote branches are \n   sane. It should have something like this (and if it doesn't, add it):\n\n\t[remote \"origin\"]\n\t\turl = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n\t\tfetch = +refs/heads/*:refs/remotes/origin/*\n\n\t[branch \"master\"]\n\t\tremote = origin\n\t\tmerge = refs/heads/master\n\n - look at your \"origin\" branch, and make sure it's a *remote* branch, not \n   the old-style local one. Ie it should *not* show up when you do a \n   plain\n\n\tgit branch\n\n   but it *should* show up (as both \"origin/HEAD\" and \"origin/master\") \n   when you do\n\n\tgit branch -a\n\n   and if it's a local branch (very possible, since you're using cogito \n   that may not even understand remote branches), then just blow it away \n   entirely with \"git branch -D origin\".\n\n - do \"git fetch\" to make sure that the remote branches are up-to-date\n\n - now do \"git log origin\" an it should show something recent like\n\n\tcommit 038f2f725503b55ab76cfd2645915a85594710fe\n\tMerge: 8d07a67... 855c603...\n\tAuthor: Linus Torvalds <torvalds@woody.linux-foundation.org>\n\tDate:   Sun Mar 2 12:38:17 2008 -0800\n\t\n\t    Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux139\n\t...\n\n - and if it does, now you should be all good, and you can dothe normal \n   \"gitk origin..\" and see the commits that are in your tree but not in \n   mine.\n\nNow your setup should be ok again. I *suspect* that what has happened is \nthat you got a local \"origin\" branch - probably through cogito - that hid \nthe remote one. \n\n\t\tLinus\n"},{"id":"70703","messageId":"46a038f90803021340uf1c9c6te5501d9fb0565f19@mail.gmail.com","threadId":"12428","inReplyTo":"alpine.LFD.1.00.0803021302070.17889@woody.linux-foundation.org","subject":"Re: kernel.org git tree corrupt?","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-03-02T21:40:15Z","receivedAt":"2008-03-02T21:40:15Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Mon, Mar 3, 2008 at 10:16 AM, Linus Torvalds\n<torvalds@linux-foundation.org> wrote:\n>  In that case, your \"origin\" simply isn't updated, but points somewhere\n>  long back in history. I can only assume that cogito has done something\n>  wrong, like not been able to handle packed refs or something, and you have\n>  an updated tree but \"origin\" pointing to way back in the history.\n\nStrange - cogito over git protocol will use git itself to peek at the\nreferences. Steve, what is your git version?\n\n>  > Ideas for another solution short of recloning and sorting through all\n>  > of the last month or two of patches that affect this directory by\n>  > hand?\n\nLinus' plan assumes you have a .git/config file. I don't think a\ncogito-based checkout follows such modern conventions - here's an\nalternative plan:\n\n - make sure you have a current git\n\n - get a fresh clone of linux-2.6, and in there\n\n    # tell it about your old checkout\n    $ git remote add oldlinux /path/to/your/older/linux/checkout/.git\n    $ git fetch oldlinux\n    # visualise what's in there\n    $ gitk origin/master oldlinux/master\n\n    # you may want to merge your old branch\n    $ git merge oldlinux/master\n\nhth,\n\n\nmartin\n"},{"id":"70705","messageId":"524f69650803021402q93534c4w5acaa01fe1d1dd6f@mail.gmail.com","threadId":"12428","inReplyTo":"46a038f90803021340uf1c9c6te5501d9fb0565f19@mail.gmail.com","subject":"Re: kernel.org git tree corrupt?","fromName":"Steve French","fromEmail":"smfrench@gmail.com","sentAt":"2008-03-02T22:02:31Z","receivedAt":"2008-03-02T22:02:31Z","isPatch":false,"sender":{"key":"smfrench@gmail.com","avatar":"https://gravatar.com/avatar/abd38036fa7e26214d332fcd6240ad1cf8cd68b831b674e329b0b9071d5a1fb2?d=mp&s=160"},"body":"On Sun, Mar 2, 2008 at 3:40 PM, Martin Langhoff\n<martin.langhoff@gmail.com> wrote:\n> On Mon, Mar 3, 2008 at 10:16 AM, Linus Torvalds\n>  <torvalds@linux-foundation.org> wrote:\n>  >  In that case, your \"origin\" simply isn't updated, but points somewhere\n>  >  long back in history. I can only assume that cogito has done something\n>  >  wrong, like not been able to handle packed refs or something, and you have\n>  >  an updated tree but \"origin\" pointing to way back in the history.\n>\n>  Strange - cogito over git protocol will use git itself to peek at the\n>  references. Steve, what is your git version?\n\nThis is master.kernel.org so git version is 1.5.4.3\n\n-- \nThanks,\n\nSteve\n"},{"id":"70736","messageId":"524f69650803021943i33ce6ddbo309f118cd0a77ac9@mail.gmail.com","threadId":"12428","inReplyTo":"alpine.LFD.1.00.0803021302070.17889@woody.linux-foundation.org","subject":"Re: kernel.org git tree corrupt?","fromName":"Steve French","fromEmail":"smfrench@gmail.com","sentAt":"2008-03-03T03:43:39Z","receivedAt":"2008-03-03T03:43:39Z","isPatch":false,"sender":{"key":"smfrench@gmail.com","avatar":"https://gravatar.com/avatar/abd38036fa7e26214d332fcd6240ad1cf8cd68b831b674e329b0b9071d5a1fb2?d=mp&s=160"},"body":"On Sun, Mar 2, 2008 at 3:16 PM, Linus Torvalds\n<torvalds@linux-foundation.org> wrote:\n>\n>  On Sun, 2 Mar 2008, Steve French wrote:\n>  >\n>  > In preparation for a merge request I do\n>  >     cg-diff -m -r origin: | diffstat -p1\n>  > (git diff -m -r origin: shows the same problem) and\n>  >     cg-log -m -r origin:\n>\n>  First off, you really should lay off the cogito thing\nno problem\n\n>   - look at your .git/config file to make sure that the remote branches are\n>    sane. It should have something like this (and if it doesn't, add it):\n>\n>         [remote \"origin\"]\n>                 url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n>                 fetch = +refs/heads/*:refs/remotes/origin/*\n>\n>         [branch \"master\"]\n>                 remote = origin\n>                 merge = refs/heads/master\n.git/config now includes\n\n[core]\n        repositoryformatversion = 0\n        filemode = true\n        bare = false\n        logallrefupdates = true\n[remote \"origin\"]\n        url = /pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n        fetch = +refs/heads/*:refs/remotes/origin/*\n[branch \"master\"]\n        remote = origin\n        merge = refs/heads/master\n\n\n>   - look at your \"origin\" branch, and make sure it's a *remote* branch, not\n>    the old-style local one. Ie it should *not* show up when you do a\n>    plain\n>\n>         git branch\nnow only shows \"* master\"\n\n>    but it *should* show up (as both \"origin/HEAD\" and \"origin/master\")\n>    when you do\n>\n>         git branch -a\nNow \"git branch -a\" shows\n* master\n  origin/master\n\nIt is missing \"origin/HEAD\"\n>   - now do \"git log origin\" an it should show something recent\ngit log origin and git log origin/master both return\n\"ambiguous argument 'origin': unknown revision\"\n\nI must be misunderstanding the syntax/manpage of git-log but \"git diff\n-m -r origin/master\"\nnow works fine and displays exactly what I expect so things have improved.\n\n\n\n>  Now your setup should be ok again. I *suspect* that what has happened is\n>  that you got a local \"origin\" branch - probably through cogito - that hid\n>  the remote one.\nThis seems plausible and\n\n\n-- \nThanks,\n\nSteve\n"},{"id":"70795","messageId":"alpine.LFD.1.00.0803030800460.17889@woody.linux-foundation.org","threadId":"12428","inReplyTo":"524f69650803021943i33ce6ddbo309f118cd0a77ac9@mail.gmail.com","subject":"Re: kernel.org git tree corrupt?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-03-03T16:21:35Z","receivedAt":"2008-03-03T16:21:35Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 2 Mar 2008, Steve French wrote:\n> \n> >   - look at your \"origin\" branch, and make sure it's a *remote* branch, not\n> >    the old-style local one. Ie it should *not* show up when you do a\n> >    plain\n> >\n> >         git branch\n> now only shows \"* master\"\n> \n> >    but it *should* show up (as both \"origin/HEAD\" and \"origin/master\")\n> >    when you do\n> >\n> >         git branch -a\n> Now \"git branch -a\" shows\n> * master\n>   origin/master\n> \n> It is missing \"origin/HEAD\"\n\nAhh, yeah, my bad. The origin/HEAD thing will be created if you use either \nclone or \"git remote add -m master\" to create the remote. But when I asked \nyou to do it by just editing the config file, you now have to create that \nHEAD pointer manually too.\n\nYou can do\n\n\tgit symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master\n\nto create the thing (it just creates a symbolic ref from the origin/HEAD \nremote ref to the origin/master one, so now git will know that when you \ntalk about 'origin', it is supposed to just use the master branch of \nthat remote).\n\n> >   - now do \"git log origin\" an it should show something recent\n> git log origin and git log origin/master both return\n> \"ambiguous argument 'origin': unknown revision\"\n\nWell, origin/master should have worked, but the fact that plain \"origin\" \ndidn't work is due to exactly the lack of HEAD file for that remote branch \n(for your kernel tree, there's only one remote branch, so it may be \n\"obvious\" that origin must be talking about the master branch, but if \nthere are multiple branches at the origin it's not obvious *which* branch \nshould be considered the default one, which is why we use HEAD)\n\n> I must be misunderstanding the syntax/manpage of git-log but \"git diff\n> -m -r origin/master\"\n> now works fine and displays exactly what I expect so things have improved.\n\nWell, if \"origin/master\" works in that situation, then \"origin/master\" \nshould have worked in \"git log\" too, so maybe you mistyped?\n\nAnyway, with the HEAD link added for the remote 'origin', you should be \nable to use plain 'origin' like you're used to.\n\n\t\t\tLinus\n"},{"id":"70887","messageId":"524f69650803032042rab309f3nd5c2d52d312fb3c5@mail.gmail.com","threadId":"12428","inReplyTo":"alpine.LFD.1.00.0803030800460.17889@woody.linux-foundation.org","subject":"Re: kernel.org git tree corrupt?","fromName":"Steve French","fromEmail":"smfrench@gmail.com","sentAt":"2008-03-04T04:42:34Z","receivedAt":"2008-03-04T04:42:34Z","isPatch":false,"sender":{"key":"smfrench@gmail.com","avatar":"https://gravatar.com/avatar/abd38036fa7e26214d332fcd6240ad1cf8cd68b831b674e329b0b9071d5a1fb2?d=mp&s=160"},"body":"On Mon, Mar 3, 2008 at 10:21 AM, Linus Torvalds\n<torvalds@linux-foundation.org> wrote:\n>\n>  On Sun, 2 Mar 2008, Steve French wrote:\n>  > Now \"git branch -a\" shows\n>  > * master\n>  >   origin/master\n>  >\n>  > It is missing \"origin/HEAD\"\n>\n>  Ahh, yeah, my bad. The origin/HEAD thing will be created if you use either\n>  clone or \"git remote add -m master\" to create the remote. But when I asked\n>  you to do it by just editing the config file, you now have to create that\n>  HEAD pointer manually too.\n>\n>  You can do\n>\n>         git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master\n>\n>  to create the thing (it just creates a symbolic ref from the origin/HEAD\nWorked.\n\nShaggy pointed me to the git-request-pull script which is\neasier than the previous scripts I used and now works fine on\nthe cifs-2.6.git tree so will send merge request.\n\n\n-- \nThanks,\n\nSteve\n"}]}