Permalink
Browse files

on git-sd init, if we have an url for origin, and the url match githu…

…b, clone issues from this repo at the same time
  • Loading branch information...
1 parent 6506454 commit d77ab26d82d0a3ff2dfe772a75a0bb903cc3b48f @fcuny fcuny committed May 1, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/git-sd
View
@@ -39,6 +39,14 @@ if [ "$1" = "init" ] || [ "$1" = "clone" ] && [ "$2" != "-h" ] \
echo ""
SD_REPO="$replica" sd config user.email-address "$gitemail"
fi
+ gitorigin=$(git config remote.origin.url 2>/dev/null)
+ if [ `echo $gitorigin | grep github` ]; then
+ echo "Cloning issues from $gitorigin:"
+ echo ""
+ echo " sd clone --from github:$gitorigin"
+ echo ""
+ SD_REPO="$replica" sd clone --from "github:$gitorigin"
+ fi
fi
SD_REPO="$replica" exec sd "$@"

0 comments on commit d77ab26

Please sign in to comment.