diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-29 16:38:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-29 16:57:16 +0100 |
commit | 79e65eefd954f4217c5cd45a75076d76d56717e5 (patch) | |
tree | a5c2d2234ede6e507b6a67735708680732ac9fc2 /g | |
parent | c17daddf7b51f685da0f7b83951916ba791a315c (diff) |
Added ./g -v switch to show git commands.
Diffstat (limited to 'g')
-rwxr-xr-x | g | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -12,6 +12,7 @@ if [ "$#" -eq "0" ] ; then echo "Usage: g [options] [git commands]" echo " -f Force - act on all the repos, not only the changed ones" echo " -s Silent - do not report the repo names." + echo " -v Verbose - Print git commands." echo " -1 report the repos name on the first line of the output as <repo>:" echo " -z just to some house cleaning (hooks mostly). this is a stand-alone option as in ./g -z" echo " --set-push-user [username] re-write an existing tree's config with an fd.o commit account name" @@ -119,6 +120,7 @@ SET_LAST_WORKING= ALLOW_EMPTY= KEEP_GOING=0 REPORT_REPOS=1 +REPORT_COMMANDS=0 REPORT_COMPACT=0 DO_HOOK_REFRESH=false @@ -128,6 +130,8 @@ while [ "${COMMAND:0:1}" = "-" ] ; do ;; -s) REPORT_REPOS=0 ;; + -v) REPORT_COMMANDS=1 + ;; -1) REPORT_COMPACT=1 ;; --set-push-user) @@ -336,6 +340,9 @@ for REPO in $DIRS ; do echo "===== $NAME =====" fi fi + if [ "$REPORT_COMMANDS" = "1" ] ; then + echo "+ git $PAGER $COMMAND $EXTRA ${FILES[@]}" + fi git $PAGER "$COMMAND" $EXTRA "${FILES[@]}" RETURN=$? fi |