Add --quiet option passed to git-fast-import(1)
authorRocco Rutte <pdmef@gmx.net>
Wed, 7 Mar 2007 11:24:59 +0000 (11:24 +0000)
committerRocco Rutte <pdmef@gmx.net>
Wed, 7 Mar 2007 11:24:59 +0000 (11:24 +0000)
Signed-off-by: Rocco Rutte <pdmef@gmx.net>
hg2git.sh

index ea25f9a..46ce727 100755 (executable)
--- a/hg2git.sh
+++ b/hg2git.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-USAGE='[-m max] repo'
+USAGE='[-m max] [--quiet] repo'
 LONG_USAGE='Import hg repository <repo> up to either tip or <max>'
 ROOT="`dirname $0`"
 REPO=""
@@ -9,6 +9,7 @@ PFX="hg2git"
 SFX_MARKS="marks"
 SFX_HEADS="heads"
 SFX_STATE="state"
+QUIET=""
 
 . git-sh-setup
 cd_to_toplevel
@@ -20,6 +21,9 @@ do
       shift
       MAX="$1"
       ;;
+    --q|--qu|--qui|--quie|--quiet)
+      QUIET="--quiet"
+      ;;
     -*)
       usage
       ;;
@@ -48,7 +52,7 @@ GIT_DIR="$GIT_DIR" python "$ROOT/hg2git.py" \
   "$GIT_DIR/$PFX-$SFX_MARKS" \
   "$GIT_DIR/$PFX-$SFX_HEADS" \
   "$GIT_DIR/$PFX-$SFX_STATE" \
-| git-fast-import --export-marks="$GIT_DIR/$PFX-$SFX_MARKS.tmp" \
+| git-fast-import $QUIET --export-marks="$GIT_DIR/$PFX-$SFX_MARKS.tmp" \
 || die 'Git fast-import failed'
 
 # move recent marks cache out of the way...