summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-12-05 00:44:39 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-12-05 19:10:02 -0600
commit4b427e32271a672551f2747cff1c1f01bde052f6 (patch)
treeba0472dc5762c5c230d8409eb155670aafb56458
parent474e4b60fec1f859bc16f268d6340d7850c7874e (diff)
g clone now tolerate silently already cloned repos.
-rwxr-xr-xg9
1 files changed, 5 insertions, 4 deletions
diff --git a/g b/g
index 191daf72e..dba698b3e 100755
--- a/g
+++ b/g
@@ -211,14 +211,15 @@ for REPO in $DIRS ; do
;;
esac
- [ "$REPORT_REPOS" = "1" ] && echo "===== $NAME ====="
-
# check for changes
HEADREF=$(git show-ref --head HEAD)
# do it!
- git $PAGER "$COMMAND" $EXTRA "${FILES[@]}"
- RETURN=$?
+ if [ "$COMMAND" != "clone" -o ! -d $DIR ] ; then
+ [ "$REPORT_REPOS" = "1" ] && echo "===== $NAME ====="
+ git $PAGER "$COMMAND" $EXTRA "${FILES[@]}"
+ RETURN=$?
+ fi
# now we can change the dir in case of clone as well
if [ "$COMMAND" = "clone" ] ; then