Skip to content

Instantly share code, notes, and snippets.

@dindinw
Created September 28, 2012 07:57
Show Gist options
  • Save dindinw/3798534 to your computer and use it in GitHub Desktop.
Save dindinw/3798534 to your computer and use it in GitHub Desktop.

Revisions

  1. dindinw renamed this gist Sep 28, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. dindinw created this gist Sep 28, 2012.
    8 changes: 8 additions & 0 deletions git_object_cat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # git_cat : cat all git objects
    # find .git/objects/ -type f|cut -c14-15,17-20|xargs -I {} sh -c "echo '\nFor {}:' ; git cat-file -p {}"
    function git_cat (){
    for o in $(find .git/objects/ -type f|cut -c14-15,17-20); do
    echo $(tput bold) $o \($(tput setaf 1) $(git cat-file -t $o)$(tput sgr0)$(tput bold) \):$(tput sgr0)
    git cat-file -p $o
    done;
    }