On Nov 9, 2007 11:28 AM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > and you should now have a line that looks like > > 10064 blob 4b9458b3786228369c63936db65827de3cc06200 my-magic-file That works and now I know the file > > The easiest way to do it is to do > > git log --raw --all --full-history -- subdirectory/my-magic-file > > and that will show you the whole log for that file (please realize that > the tree you had may not be the top-level tree, so you need to figure out > which subdirectory it was in on your own), and because you're asking for > raw output, you'll now get something like > > commit abc > Author: > Date: > .. > :100644 100644 4b9458b... newsha... M somedirectory/my-magic-file > > > commit xyz > Author: > Date: > > .. > :100644 100644 oldsha... 4b9458b... M somedirectory/my-magic-file > > and this actually tells you what the *previous* and *subsequent* versions > of that file were! So now you can look at those ("oldsha" and "newsha" > respectively), and hopefully you have done commits often, and can > re-create the missing my-magic-file version by looking at those older and > newer versions! > > If you can do that, you can now recreate the missing object with Ok, tried that and unfortuantly the SHA1 number is apear only one [mellanox@mellanox-compile ib]$ git log --raw --all --full-history -- SymmK/St.c | grep 4b9 :100755 100755 308806c... 4b9458b3786228369c63936db65827de3cc06200 M SymmK/St.c git log --raw --all --full-history -- SymmK/St.c ... ... commit 597e70e7dc8e06a7cdbe4d9e9727411c964bd023 Author: sleybo <sleybo@xxxxxxxxxxxxxx> Date: Fri Oct 5 10:41:43 2007 -0400 1. increase QPs parameters - QP is bigger than 4k 2. lock buffers use the dma key 3. add prints :100755 100755 308806c... 4b9458b3786228369c63936db65827de3cc06200 M SymmK/St.c What intersting is that the SHA1 that I looked for apear only once (only as new SHA1) So I checkout version of the file which produce the old SHA1 308806c.... [mellanox@mellanox-compile ib-tmp]$ git checkout mlx4-start -- SymmK/St.c [mellanox@mellanox-compile ib-tmp]$ git hash-object -w SymmK/St.c 308806cf3a864656a49d00edc35b9505abd627a2 than I did [mellanox@mellanox-compile ib-tmp]$ git diff-tree --stdin -p --pretty 597e70e7dc8e06a7cdbe4d9e9727411c964bd023 > commit-597e70e ( which is the commit SHA1) [mellanox@mellanox-compile ib-tmp]$ git apply commit-597e70e Adds trailing whitespace. ../ib/commit-597e70e:1622: Adds trailing whitespace. ../ib/commit-597e70e:1646: (int)devif->lock_dma + lockid*sizeof(u64), warning: 2 lines add whitespace errors. [mellanox@mellanox-compile ib-tmp]$ git hash-object -w SymmK/St.c e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 So the same commit actual lead to the wrong SHA1 (I tried this flow on different file and it works) I think I am close but still not there , any suggestions ? Thanks Yossi - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html