{"thread":{"id":"12709","subject":"Something strange has happened to my git HEADs.","startedAt":"2008-03-15T17:44:35Z","lastAt":"2008-03-15T18:44:29Z","messageCount":4,"participants":["Krzysztof Halasa","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72188","messageId":"m38x0j51bw.fsf@maximus.localdomain","threadId":"12709","inReplyTo":null,"subject":"Something strange has happened to my git HEADs.","fromName":"Krzysztof Halasa","fromEmail":"khc@pm.waw.pl","sentAt":"2008-03-15T17:44:35Z","receivedAt":"2008-03-15T17:44:35Z","isPatch":false,"sender":{"key":"khc@pm.waw.pl","avatar":null},"body":"Hi,\n\nNot sure what has happened but it was hardly expected:\n\n1. I have individual bare git repos in ~/scm and ~/scm/linux-2.6 is one\nof them (currently):\n\nintrepid:~/scm/linux-2.6$ find -not -type d\n./logs/HEAD\n./logs/refs/heads/lirc\n./logs/refs/heads/viafb\n./logs/refs/heads/ixp4xx23\n./logs/refs/heads/linux-stable\n./logs/refs/heads/wireless\n./logs/refs/heads/ixp4xx-hss-chan-old\n./logs/refs/heads/alpine\n./logs/refs/heads/linux-test\n./logs/refs/heads/linux-router-test\n./logs/refs/heads/origin\n./logs/refs/heads/ixp4xx-upstream\n./logs/refs/heads/linux-router (and so on)\n./config\n./objects/**********\n./description\n./HEAD\n./hooks/pre-rebase\n./hooks/applypatch-msg\n./hooks/update\n./hooks/post-commit\n./hooks/commit-msg\n./hooks/pre-commit\n./hooks/pre-applypatch\n./hooks/post-receive\n./hooks/post-update\n./info/refs\n\nConfig file mostly contains:\n[diff]\n        renames = copies\n[core]\n        preferSymlinkRefs = true\n(plus less relevant things).\n\nintrepid:~/scm/linux-2.6$ cat HEAD \nref: refs/heads/origin\n\nThere used to be a number of refs and heads but now they are all gone:\nintrepid:~/scm/linux-2.6$ find refs/\nrefs/\nrefs/heads\nrefs/tags\n\n\n\n2. Working dirs using this repo are in /usr/src/linux* and\n/usr/src/linux-test is one of them, currently (.git dir):\nlrwx 1      30 2007-10-09 00:55 config -> ~/scm/linux-2.6/config\nlrwx 1      35 2007-08-24 18:33 description -> ~/scm/linux-2.6/description\n-rw- 1     126 2008-02-01 21:39 FETCH_HEAD\nlrwx 1      19 2008-03-15 17:52 HEAD -> refs/heads/eelogger\n-rw- 1 2220597 2008-03-15 17:56 index\ndrwx 2    4096 2008-03-15 17:57 info\n-rw- 1   21482 2008-03-15 17:57 info/refs\nlrwx 1      28 2007-08-24 18:33 logs -> ~/scm/linux-2.6/logs\nlrwx 1      31 2007-08-24 18:33 objects -> ~/scm/linux-2.6/objects\n-rw- 1      41 2008-03-15 17:56 ORIG_HEAD\n-rw- 1   17909 2008-03-15 17:56 packed-refs\nlrwx 1      28 2007-08-24 18:33 refs -> ~/scm/linux-2.6/refs\n\n\nWhat I did was (copy & paste):\nintrepid:/usr/src/linux-test$ git-status \n# On branch eelogger\nnothing to commit (working directory clean)\n\nintrepid:/usr/src/linux-test$ git-rebase v2.6.24\nFirst, rewinding head to replay your work on top of it...\nChecking out files: 100% (10213/10213), done.\nHEAD is now at 4991408... Linux 2.6.24\nApplying I2C: Added eelogger driver - EEPROM kernel console logger\nAuto packing your repository for optimum performance. You may also\nrun \"git gc\" manually. See \"git help gc\" for more information.\nCounting objects: 744096, done.\nCompressing objects: 100% (135615/135615), done.\nWriting objects: 100% (744096/744096), done.\nTotal 744096 (delta 613061), reused 738324 (delta 607483)\nerror: Ref refs/heads/eelogger is at 9465fea31dff47dee3d0e0018d7aa52d16e14c33 but expected e00e34771aac93479c4d939e4e5cceeca64b38f8\nfatal: Cannot lock the ref 'refs/heads/eelogger'.\nCould not move back to refs/heads/eelogger\n\nNow all references are gone, the objects seem to be packed correctly\ninto one 230 MB file (there are some individual object files left,\nperhaps orphans).\n\nI have been trying to use gitweb while git-rebase was operating but it\nwasn't able to find anything.\n\nHow could that happened?\nI did the same many times and never had anything like that, but perhaps\nthe symlinks caused that? It never autopacked while rebasing.\n\n/usr/src/linux-test/.git/info/refs seems to contain all the heads and\ntags (including the new eeprom head).\n\ne00e34771aac93479c4d939e4e5cceeca64b38f8 is the old eelogger head\n9465fea31dff47dee3d0e0018d7aa52d16e14c33 is the new (rebased) head\n\ngit-core-1.5.4.1-1.fc8, it's practically up-to-date Fedora 8 x86_64\nSMP.\n-- \nKrzysztof Halasa\n"},{"id":"72189","messageId":"m34pb7513f.fsf@maximus.localdomain","threadId":"12709","inReplyTo":"m38x0j51bw.fsf@maximus.localdomain","subject":"Re: Something strange has happened to my git HEADs.","fromName":"Krzysztof Halasa","fromEmail":"khc@pm.waw.pl","sentAt":"2008-03-15T17:49:40Z","receivedAt":"2008-03-15T17:49:40Z","isPatch":false,"sender":{"key":"khc@pm.waw.pl","avatar":null},"body":"Hmm, I didn't know references are now being packed as well.\n-- \nKrzysztof Halasa\n"},{"id":"72191","messageId":"7vwso3n8i5.fsf@gitster.siamese.dyndns.org","threadId":"12709","inReplyTo":"m38x0j51bw.fsf@maximus.localdomain","subject":"Re: Something strange has happened to my git HEADs.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-15T18:32:18Z","receivedAt":"2008-03-15T18:32:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Krzysztof Halasa <khc@pm.waw.pl> writes:\n\n> 2. Working dirs using this repo are in /usr/src/linux* and\n> /usr/src/linux-test is one of them, currently (.git dir):\n> lrwx 1      30 2007-10-09 00:55 config -> ~/scm/linux-2.6/config\n> lrwx 1      35 2007-08-24 18:33 description -> ~/scm/linux-2.6/description\n> -rw- 1     126 2008-02-01 21:39 FETCH_HEAD\n> lrwx 1      19 2008-03-15 17:52 HEAD -> refs/heads/eelogger\n> -rw- 1 2220597 2008-03-15 17:56 index\n> drwx 2    4096 2008-03-15 17:57 info\n> -rw- 1   21482 2008-03-15 17:57 info/refs\n> lrwx 1      28 2007-08-24 18:33 logs -> ~/scm/linux-2.6/logs\n> lrwx 1      31 2007-08-24 18:33 objects -> ~/scm/linux-2.6/objects\n> -rw- 1      41 2008-03-15 17:56 ORIG_HEAD\n> -rw- 1   17909 2008-03-15 17:56 packed-refs\n> lrwx 1      28 2007-08-24 18:33 refs -> ~/scm/linux-2.6/refs\n\nThis is wrong.  How did you set this up initially?\n\nIf you are putting a work tree by symlinking contents of its .git\ndirectory, info and packed-refs are alsy symlinked.  See how\ncontrib/workdir/git-new-workdir does this.\n"},{"id":"72192","messageId":"m3ve3n3jzm.fsf@maximus.localdomain","threadId":"12709","inReplyTo":"7vwso3n8i5.fsf@gitster.siamese.dyndns.org","subject":"Re: Something strange has happened to my git HEADs.","fromName":"Krzysztof Halasa","fromEmail":"khc@pm.waw.pl","sentAt":"2008-03-15T18:44:29Z","receivedAt":"2008-03-15T18:44:29Z","isPatch":false,"sender":{"key":"khc@pm.waw.pl","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> lrwx 1      30 2007-10-09 00:55 config -> ~/scm/linux-2.6/config\n>> lrwx 1      35 2007-08-24 18:33 description -> ~/scm/linux-2.6/description\n>> -rw- 1     126 2008-02-01 21:39 FETCH_HEAD\n>> lrwx 1      19 2008-03-15 17:52 HEAD -> refs/heads/eelogger\n>> -rw- 1 2220597 2008-03-15 17:56 index\n>> drwx 2    4096 2008-03-15 17:57 info\n>> -rw- 1   21482 2008-03-15 17:57 info/refs\n>> lrwx 1      28 2007-08-24 18:33 logs -> ~/scm/linux-2.6/logs\n>> lrwx 1      31 2007-08-24 18:33 objects -> ~/scm/linux-2.6/objects\n>> -rw- 1      41 2008-03-15 17:56 ORIG_HEAD\n>> -rw- 1   17909 2008-03-15 17:56 packed-refs\n>> lrwx 1      28 2007-08-24 18:33 refs -> ~/scm/linux-2.6/refs\n>\n> This is wrong.  How did you set this up initially?\n\nBy hand, I'm using that from the beginning (with some incremental\nchanges). Are only info and packed-refs missing?\n\n> If you are putting a work tree by symlinking contents of its .git\n> directory, info and packed-refs are alsy symlinked.\n\nInfo seems to have been dropped somehow or maybe never linked in this\ndirectory, but it's not a problem unless I see it again. I just didn't\nknow about packing references, linking packed-refs made it work.\n\nHow about the error message? Seems serious, though git-rebase did its\nwork.\n-- \nKrzysztof Halasa\n"}]}