{"thread":{"id":"5380","subject":"Problem with pack","startedAt":"2006-08-25T08:45:33Z","lastAt":"2006-08-25T09:12:00Z","messageCount":2,"participants":["Sergio Callegari","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"25882","messageId":"44EEB8AD.5080703@arces.unibo.it","threadId":"5380","inReplyTo":null,"subject":"Problem with pack","fromName":"Sergio Callegari","fromEmail":"scallegari@arces.unibo.it","sentAt":"2006-08-25T08:45:33Z","receivedAt":"2006-08-25T08:45:33Z","isPatch":false,"sender":{"key":"scallegari@arces.unibo.it","avatar":null},"body":"Hi,\n\nI am encountering a problem after a\n\ngit repack -a -d\n\non an archive.\n\nThe packet that has been generated appears to be corrupted:\n\ngit verify-pack -v pack-ebcdfbbda07e5a3e4136aa1f499990b35685bab4.idx\nfatal: failed to read delta-pack base object \n2849bd2bd8a76bbca37df2a4c8e8b990811d01a7\n\nand apparently I might have lost all the history of my project.\n\nI have a few questions:\n\n1) I am working on both a pc and a notebook, syncing the two everytime I \nmove from one to the other.\nOn the PC I have git 1.4.2, on the notebook git 1.4.0. I am using \n\"unison\" as a syncing tool.\nMight the data loss have something to do with...\n- the version of git I am using or the mixing of two versions?\n- the syncing? I have noticed that after a sync, git is not immediately \nin a happy state... for instance if I run\n\ngit diff\n\ngit lists diff commands for every file, even if those have not changed. \nHowever after a\n\ngit status\n\neverything seems fine again.\n\n2) git unpack-objects seems to be able to extract some objects from the \npack, but at a certain point it dies.\n- does it die on the first error or does it try to extract everything \nthat is possible to extract after the error?\n- if it's the first, is there a way to trigger the second behaviour to \ntry to save as much as possible from the pack?\n\nThanks,\n\nSergio Callegari\n"},{"id":"25883","messageId":"Pine.LNX.4.63.0608251104410.28360@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5380","inReplyTo":"44EEB8AD.5080703@arces.unibo.it","subject":"Re: Problem with pack","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-08-25T09:12:00Z","receivedAt":"2006-08-25T09:12:00Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 25 Aug 2006, Sergio Callegari wrote:\n\n> git verify-pack -v pack-ebcdfbbda07e5a3e4136aa1f499990b35685bab4.idx\n> fatal: failed to read delta-pack base object 2849bd2bd8a76bbca37df2a4c8e8b990811d01a7\n\nEeeh! Not good.\n\n> 1) I am working on both a pc and a notebook, syncing the two everytime I move\n> from one to the other.\n\nSo, you still have one \"good\" version? Please make a backup immediately. \n(If only to reproduce the problem.)\n\n> On the PC I have git 1.4.2, on the notebook git 1.4.0. I am using \"unison\" as\n> a syncing tool.\n> Might the data loss have something to do with...\n> - the version of git I am using or the mixing of two versions?\n\nWe tried very hard to maintain backward compatibility. So, it should be \nfine.\n\n> - the syncing? I have noticed that after a sync, git is not immediately in a\n> happy state...\n\nThat is okay. The \"index\" (remember, git has a staging area called \n\"index\") stores ctimes and mtimes, and these are not synced.\n\n> 2) git unpack-objects seems to be able to extract some objects from the pack,\n> but at a certain point it dies.\n> - does it die on the first error or does it try to extract everything that is\n> possible to extract after the error?\n\nSince unpack-objects does not use the index, it cannot extract anything \nafter the first error. We _could_ enhance unpack-objects to be nice and \noptionally take a pack-index to try to reconstruct as many objects as \npossible.\n\nBTW I'd recommend not syncing with unison, but with the git transports: If \nyour PC and Laptop are connected, you could do something like\n\n\tgit pull laptop:my_project/.git\n\n(Of course, you have to adjust it for your setup.) This would sync your \nrepository on the PC with the one on the laptop.\n\nHth,\nDscho\n"}]}