]>
Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/git-find-object
   2 #/ Usage: git-find-object <id> <repo>... 
   3 #/ Write first <repo> that includes object <id>. Useful when trying to locate a 
   4 #/ missing object in a list of repositories. 
   6 #/ Ex: git-find-object deadbee /repos/*.git 
   8 # shift off the SHA1 object id to look for 
  13 [ "$sha" = "--help" ] && { 
  18 # run through each repo dir and write the path to the first one 
  19 # that includes the object 
  21 do (cd "$dir" && git 
cat-file -e $sha 2>/dev
/null
) && { 
  27 # if we make it here, the object wasn't found