summaryrefslogtreecommitdiff
path: root/g
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
commit090d023b002cb7929372982044ae0efd12a6d968 (patch)
tree83b7e52f0ac250b18177ebb49130173dbf00c64f /g
parenta11422d9470371fc8d4c0c279a90e9d5ae05c025 (diff)
g clone now tolerate silently already cloned repos.
Diffstat (limited to 'g')
-rwxr-xr-xg9
1 files changed, 5 insertions, 4 deletions
diff --git a/g b/g
index 191daf72e94c..dba698b3e9b7 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