diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-07 14:53:08 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-07 14:55:26 +0100 |
commit | 781086f0675d6d644a4f2e905b12a2069ce46174 (patch) | |
tree | 90416540f323c4b1664938189ccc4c1c7000c083 /g | |
parent | 6184a626b9d90b2cabeed6aaf3aad30a56ab772a (diff) |
teach ./g at least some basic manners when using commit -F
* still needs fixes for message files with relative paths
Diffstat (limited to 'g')
-rwxr-xr-x | g | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -105,10 +105,16 @@ while shift ; do FILES[$FILESNUM]="$1" FILESNUM=$(($FILESNUM+1)) else - [ "$COMMAND" = "commit" -a "$PARAM" = "--allow-empty" ] && ALLOW_EMPTY=1 - - FILES[$FILESNUM]="$PARAM" - FILESNUM=$(($FILESNUM+1)) + if [ "$COMMAND" = "commit" -a "$PARAM" = "-F" ] + then + shift + # this still needs some magic to handle relative paths + EXTRA="${EXTRA} -F ${1}" + else + [ "$COMMAND" = "commit" -a "$PARAM" = "--allow-empty" ] && ALLOW_EMPTY=1 + FILES[$FILESNUM]="$PARAM" + FILESNUM=$(($FILESNUM+1)) + fi fi else if [ "$COMMAND" = "apply" ] ; then @@ -225,6 +231,7 @@ for REPO in $DIRS ; do # do it! if [ "$COMMAND" != "clone" -o ! -d $DIR ] ; then [ "$REPORT_REPOS" = "1" ] && echo "===== $NAME =====" + echo git $PAGER "$COMMAND" $EXTRA "${FILES[@]}" git $PAGER "$COMMAND" $EXTRA "${FILES[@]}" RETURN=$? fi |