Mercurial > dotfiles
comparison .shell.d/50.git_functions.sh @ 234:0cd241f35c40
git-functions: add a couple of handy aliases
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Sun, 28 Nov 2010 18:30:26 -0600 |
| parents | 0590f34b92a0 |
| children |
comparison
equal
deleted
inserted
replaced
| 233:da06f9fd5016 | 234:0cd241f35c40 |
|---|---|
| 14 git repack -ad --window 100 | 14 git repack -ad --window 100 |
| 15 git gc --prune="`date`" | 15 git gc --prune="`date`" |
| 16 popd | 16 popd |
| 17 done | 17 done |
| 18 } | 18 } |
| 19 alias git-repack-all=git_repack_all | |
| 19 | 20 |
| 20 function git_fsck_all() { | 21 function git_fsck_all() { |
| 21 for repo in $(find . | \ | 22 for repo in $(find . | \ |
| 22 grep '/objects/pack/' | \ | 23 grep '/objects/pack/' | \ |
| 23 sed -e 's%\.git/objects/pack/.*%%' | \ | 24 sed -e 's%\.git/objects/pack/.*%%' | \ |
| 25 pushd $repo | 26 pushd $repo |
| 26 git fsck | 27 git fsck |
| 27 popd | 28 popd |
| 28 done | 29 done |
| 29 } | 30 } |
| 31 alias git-fsck-all=git_fsck_all |
