Skip to content

Commit

Permalink
effort: allow sending options to log. Fix #326
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiskogheim committed Jul 22, 2015
1 parent 7d1ede1 commit fd72edd
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions bin/git-effort
Expand Up @@ -107,12 +107,32 @@ sort_effort() {
< $tmp sort -rn -k 2
}

# --above <n-commits>

if test "$1" = "--above"; then
shift; above=$1
#
# parse arguments
# we handle --above, and send the rest to git log
#
while [[ $# > 0 ]] ; do
key=$1
declare -a log_args

case $key in
--above)
shift; above=$1
;;
--*)
log_args+=$1
;;
--)
shift
break # files from here on
;;
*)
break # files from here on
;;
esac
shift
fi
done


# [file ...]

Expand Down

0 comments on commit fd72edd

Please sign in to comment.