From: Jörg Sommer Date: Sun, 27 Apr 2008 10:47:04 GMT Subject: git doesn't finds the parent of a commit (was: How to fetch missing pack) Message-ID: <20080427104704.GA11784@alea.gnuu.de> In-Reply-To: <20080424060857.GX29771@spearce.org> Hi, Shawn O. Pearce schrieb am Thu 24. Apr, 02:08 (-0400): > If you know the name of the objects you are missing, you can > make a temporary pack to transfer the list of objects: > > # at good repo > # > git pack-objects --stdout save.pack > > # at bad repo > # > git index-pack --stdin &1 >/dev/null) echo $outp [ $#outp -eq 0 ] && break cmt=${${outp##* \(}%\)} git cat-file -t $cmt >/dev/null 2>&1 && \ cmt=$(git cat-file commit $cmt |grep '^tree ') echo ${cmt##* } | ssh server cd git\; git pack-objects --stdout | \ git index-pack --stdin >/dev/null done Maybe it helps someone else. :) But now, there's something else broken. % git cat-file commit b63e99500137c913bd801a2f22b6cf88c63b95c5 tree 68a58fb97935f35c6fb7bcbcfed73b1697db000a parent 3f061887c562b20d3ed3d1f764462cf986a1ad12 author Wincent Colaiuta 1195996542 +0100 committer Junio C Hamano 1196019475 -0800 Add "--patch" option to git-add--interactive When the "--patch" option is supplied, the patch_update_cmd() function is … % git cat-file commit 3f061887c562b20d3ed3d1f764462cf986a1ad12 tree 636a0f9c085aac7ba539ef2ace03b3081481891a parent 324ccbd6a09816af830b22b02bbeb06349141849 author Junio C Hamano 1196014210 -0800 committer Junio C Hamano 1196014993 -0800 add -i: Fix running from a subdirectory This fixes the pathspec interactive_add() passes to the underlying … % git rev-parse b63e99500137c913bd801a2f22b6cf88c63b95c5~1 b63e99500137c913bd801a2f22b6cf88c63b95c5~1 fatal: ambiguous argument 'b63e99500137c913bd801a2f22b6cf88c63b95c5~1': unknown revision or path not in the working tree. Use '--' to separate paths from revisions Can someone tell me what I'm doing wrong? > Note that you may need to do this several times; e.g. if you are > missing a tree you won't know what blobs you are missing until > you load the tree and run fsck --full again to parse the tree and > discover the missing blobs. fsck --full reports only dangling objects, no breakage. Bye, Jörg. -- Die zehn Gebote Gottes enthalten 172 Wörter, die amerikanische Unabhängigkeitserklärung 300 Wörter, die Verordnung der europäischen Gemeinschaft über den Import von Karamelbonbons exakt 25911 Wörter.