mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Added --above <n> to git-effort(1)
This commit is contained in:
parent
c1d2dfc04c
commit
9c7232afcf
|
|
@ -171,6 +171,12 @@ $ git summary v42..
|
|||
|
||||

|
||||
|
||||
If you wish to ignore files with commits `<=` a value you may use `--above`:
|
||||
|
||||
```
|
||||
$ git effort --above 5
|
||||
```
|
||||
|
||||
## git-repl
|
||||
|
||||
GIT read-eval-print-loop:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
files=`git ls-files`
|
||||
above='0'
|
||||
|
||||
if test "$1" = "--above"; then
|
||||
above=$2
|
||||
fi
|
||||
|
||||
echo
|
||||
echo " file commits"
|
||||
|
|
@ -10,6 +15,11 @@ for file in $files; do
|
|||
commits=`git log --oneline $file | wc -l`
|
||||
color='90'
|
||||
|
||||
if test $commits -le $above; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
test $commits -gt 10 && color='33'
|
||||
test $commits -gt 25 && color='93'
|
||||
test $commits -gt 50 && color='32'
|
||||
|
|
|
|||
Loading…
Reference in a new issue