[Bps-public-commit] SD branch, master, updated. bf5fc43724512b0f28c5ed7c8a7183a097f11fbe

spang at bestpractical.com spang at bestpractical.com
Thu Aug 20 13:15:30 EDT 2009


The branch, master has been updated
       via  bf5fc43724512b0f28c5ed7c8a7183a097f11fbe (commit)
      from  d02accac84c588b99422aa602f40e2ee1b6228da (commit)

Summary of changes:
 bin/git-sd |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit bf5fc43724512b0f28c5ed7c8a7183a097f11fbe
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Aug 20 18:15:23 2009 +0100

    If no email configured in git, don't set sd's user.email-address to nothing (git-sd)

diff --git a/bin/git-sd b/bin/git-sd
index 86262c5..71f566b 100755
--- a/bin/git-sd
+++ b/bin/git-sd
@@ -25,16 +25,18 @@ if [ -z "$replica" ]; then
 fi
 
 if [ \( "$1" = "init" \) -o \( "$1" = "clone" \) ]; then
-    echo "Setting your SD email address to your git email:"
-    echo ""
-    echo "  git config --get user.email"
     gitemail=$(git config --get user.email)
-    if [ ! -d $replica ]; then
-        mkdir $replica
+    if [ ! -z $gitemail ]; then
+        echo "Setting your SD email address to your git email:"
+        echo ""
+        echo "  git config --get user.email"
+        if [ ! -d $replica ]; then
+            mkdir $replica
+        fi
+        echo "  sd config user.email-address $gitemail"
+        echo ""
+        SD_REPO="$replica" sd config user.email-address $gitemail
     fi
-    echo "  sd config user.email-address $gitemail"
-    echo ""
-    SD_REPO="$replica" sd config user.email-address $gitemail
 fi
 
 SD_REPO="$replica" exec sd "$@"

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list