[Bps-public-commit] SD branch, master, updated. 4b0b745c0c98ef60e78f64183ce4ae5498a85d25
spang at bestpractical.com
spang at bestpractical.com
Thu Aug 20 08:35:23 EDT 2009
The branch, master has been updated
via 4b0b745c0c98ef60e78f64183ce4ae5498a85d25 (commit)
via 52f9716da5eaf8d8f27e2a4ba2c808027efc3289 (commit)
via 97c35f96635de1e88a7c67a629a9aba7fe1af113 (commit)
via fa5c5d6ce51c08eaa50f5c8c806bc956dcf78e86 (commit)
from 21e30bf244bcacdff7cd83aeaa3ab59b2f2c3c78 (commit)
Summary of changes:
bin/git-sd | 23 +++++++++++++++++++----
lib/App/SD/CLI/Dispatcher.pm | 2 +-
2 files changed, 20 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit fa5c5d6ce51c08eaa50f5c8c806bc956dcf78e86
Author: franck cuny <franck at lumberjaph.net>
Date: Wed Aug 19 22:26:08 2009 +0200
if the command is init or clone, set the email address to the one found in the git config
Signed-off-by: Christine Spang <spang at bestpractical.com>
diff --git a/bin/git-sd b/bin/git-sd
index ade96bb..2a370a2 100755
--- a/bin/git-sd
+++ b/bin/git-sd
@@ -1,5 +1,6 @@
#!/bin/sh
+sdsetup=0
replica=$(git config --get sd.local-replica)
if [ -z "$replica" ]; then
gitdir=$(git rev-parse --git-dir 2>/dev/null)
@@ -20,6 +21,19 @@ if [ -z "$replica" ]; then
echo " git config --add sd.local-replica $replica"
echo ""
git config --add sd.local-replica "$replica"
+ sdsetup=1
+fi
+
+if [ \( "$1" = "init" \) -o \( "$1" = "clone" \) ]; then
+ echo ""
+ echo " git config --get user.email"
+ echo ""
+ gitemail=$(git config --get user.email)
+ if [ ! -d $replica ]; then
+ mkdir $replica
+ fi
+ SD_REPO="$replica" sd config user.email-address $gitemail
+ echo "Using $gitemail as your email address"
fi
SD_REPO="$replica" exec sd "$@"
commit 97c35f96635de1e88a7c67a629a9aba7fe1af113
Author: franck cuny <franck at lumberjaph.net>
Date: Wed Aug 19 22:34:22 2009 +0200
fix a regex that was failing the config command
Signed-off-by: Christine Spang <spang at bestpractical.com>
diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index 4506c02..4b236d5 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -83,7 +83,7 @@ on qr'.*' => sub {
on qr'.*' => sub {
my $self = shift;
my $command = $_;
- next_rule if $command =~ /^(?:shell|clone|init|config|alias(?:es)?)$/;
+ next_rule if $command =~ /^(?:shell|clone|init)$|(config|alias(?:es)?)/;
next_rule if $self->cli->app_handle->handle->replica_exists;
print join("\n","No SD database was found at " . $self->cli->app_handle->handle->url(),
commit 52f9716da5eaf8d8f27e2a4ba2c808027efc3289
Author: Christine Spang <spang at bestpractical.com>
Date: Thu Aug 20 12:36:52 2009 +0100
Don't mix tabs and spaces
diff --git a/bin/git-sd b/bin/git-sd
index 2a370a2..354cf2e 100755
--- a/bin/git-sd
+++ b/bin/git-sd
@@ -5,14 +5,14 @@ replica=$(git config --get sd.local-replica)
if [ -z "$replica" ]; then
gitdir=$(git rev-parse --git-dir 2>/dev/null)
if [ -z "$gitdir" ]; then
- echo "Can't find a .git directory anywhere in your current directory"
- echo "or any higher directories."
- exit 1;
+ echo "Can't find a .git directory anywhere in your current directory"
+ echo "or any higher directories."
+ exit 1;
fi
# Special case: when in the toplevel directory, rev-parse --git-dir only
# returns '.git' instead of the full path.
if [ "$gitdir" = ".git" ]; then
- gitdir="$(pwd)/.git"
+ gitdir="$(pwd)/.git"
fi
replica="$gitdir/sd"
echo "You don't appear to have an sd.local-replica defined in your .git/config"
commit 4b0b745c0c98ef60e78f64183ce4ae5498a85d25
Author: Christine Spang <spang at bestpractical.com>
Date: Thu Aug 20 12:56:27 2009 +0100
Some minor tweaks to git-sd's echoed messages
diff --git a/bin/git-sd b/bin/git-sd
index 354cf2e..86262c5 100755
--- a/bin/git-sd
+++ b/bin/git-sd
@@ -25,15 +25,16 @@ 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"
- echo ""
gitemail=$(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
- echo "Using $gitemail as your email address"
fi
SD_REPO="$replica" exec sd "$@"
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list