summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-03-07 14:53:08 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-03-07 14:55:26 +0100
commit781086f0675d6d644a4f2e905b12a2069ce46174 (patch)
tree90416540f323c4b1664938189ccc4c1c7000c083 /g
parent6184a626b9d90b2cabeed6aaf3aad30a56ab772a (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-xg15
1 files changed, 11 insertions, 4 deletions
diff --git a/g b/g
index a440d65a8eda..a37943abbb29 100755
--- a/g
+++ b/g
@@ -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