[Bps-public-commit] Shipwright branch, master, updated. 9bac16656ab8f0650c88325acc90d3fbbc413027

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Jul 13 00:32:50 EDT 2009


The branch, master has been updated
       via  9bac16656ab8f0650c88325acc90d3fbbc413027 (commit)
      from  ea11422aa1eafd7671af655d7cea80d16835906b (commit)

Summary of changes:
 lib/Shipwright/Backend/Git.pm |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 9bac16656ab8f0650c88325acc90d3fbbc413027
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Jul 13 12:30:13 2009 +0800

    config git to erase git warnings

diff --git a/lib/Shipwright/Backend/Git.pm b/lib/Shipwright/Backend/Git.pm
index c23dc2a..63b8886 100644
--- a/lib/Shipwright/Backend/Git.pm
+++ b/lib/Shipwright/Backend/Git.pm
@@ -41,6 +41,12 @@ sub initialize {
     my $cwd = getcwd;
     chdir $dir;
     Shipwright::Util->run( [ $ENV{'SHIPWRIGHT_GIT'}, 'init' ] );
+    Shipwright::Util->run(
+        [
+            $ENV{'SHIPWRIGHT_GIT'},      'config',
+            'receive.denyCurrentBranch', 'ignore',
+        ]
+    );
     Shipwright::Util->run( [ $ENV{'SHIPWRIGHT_GIT'}, 'add', '.' ] );
     Shipwright::Util->run(
         [ $ENV{'SHIPWRIGHT_GIT'}, 'commit', '-m', 'creating repository' ] );
@@ -75,6 +81,12 @@ sub cloned_dir {
     my $target = catdir( $base_dir, 'clone' );
     Shipwright::Util->run(
         [ $ENV{'SHIPWRIGHT_GIT'}, 'clone', $self->repository, $target ] );
+    my $cwd = getcwd;
+    chdir $target; 
+    # git 1.6.3.3 will warn if we don't specify push.default
+    Shipwright::Util->run(
+        [ $ENV{'SHIPWRIGHT_GIT'}, 'config', 'push.default', 'matching' ] );
+    chdir $cwd;
     return $cloned_dir = $target;
 }
 

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



More information about the Bps-public-commit mailing list