Hello all,

Eric Hanchrow offers this improvement to my objects alias for git:

find .git/objects -wholename '*/??/??????????????????????????????????????' 
-type f | sed -e "s:git/objects/::" -e "s:/::" | while read hash; do echo 
"================" $hash "================" ; git show $hash; done  

which works if you have pack files or other things not hash-named in the 
objects directory (which I didn't). Many thanks to Eric for this! 

Below is Eric's original message to me showing what happens when there are pack 
files....

From Eric:

FYI -- I just tried this, and it gacked on my pack and pack-index files:

$ find .git/objects -type f | sed -e "s:.git/objects/::" -e "s:/::" | while 
read hash; do echo "================" $hash "================" ; git show 
$hash; done > /tmp/egads
fatal: ambiguous argument 
'packpack-a61be353801aad636b8ca677a6fc981bf6ad8c5b.idx': unknown revision or 
path not in the working tree.
Use '--' to separate paths from revisions
fatal: ambiguous argument 
'packpack-a61be353801aad636b8ca677a6fc981bf6ad8c5b.pack': unknown revision or 
path not in the working tree.
Use '--' to separate paths from revisions
fatal: ambiguous argument 'infopacks': unknown revision or path not in the 
working tree.
Use '--' to separate paths from revisions
16:04:52 [erich@ubuntu64-erich artemis.git] (master)$ 

This ugliness seems to work better:

find .git/objects -wholename '*/??/??????????????????????????????????????' 
-type f | sed -e "s:git/objects/::" -e "s:/::" | while read hash; do echo 
"================" $hash "================" ; git show $hash; done  


Best regards,

Melissa
-----
Dr. Melissa Rice, PhD
Full Moon Technical Solutions, LLC
14202 60th Ave, NW
Stanwood, WA 98292-4808
email: mailto:[email protected]
phone: 360-654-0709
cell: 425-923-7713

Reply via email to