[Bps-public-commit] git-sync branch, master, updated. 33b01fa7f98b27ae4ae1add8394919529d08fcfe

Alex M Vandiver alexmv at bestpractical.com
Sat Nov 21 21:35:20 EST 2009


The branch, master has been updated
       via  33b01fa7f98b27ae4ae1add8394919529d08fcfe (commit)
       via  0f5ba3bda071a23788db8862603f6e417a7d712d (commit)
      from  e41863d1e900a0c3711178b32e69b358eb6edf5b (commit)

Summary of changes:
 git-sync |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 0f5ba3bda071a23788db8862603f6e417a7d712d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sat Nov 21 21:16:50 2009 -0500

    Remove dependency on Config::GitLike

diff --git a/git-sync b/git-sync
index 7dfe92f..5deac7c 100755
--- a/git-sync
+++ b/git-sync
@@ -10,7 +10,6 @@
 # $ git sync bps
 # syncs only one of the sections
 
-use Config::GitLike::Git;
 use Git;
 use strict;
 use warnings;
@@ -31,12 +30,12 @@ GetOptions(
     'log|l' => \$log,
 );
 
-my %conf = Config::GitLike::Git->new->load;
-
 my %sync;
-for (keys %conf) {
-    next unless /^sync\.(.*?)\.(.*)$/;
-    $sync{$1}{$2} = $conf{$_};
+for (split /\0/, `git config -z --get-regexp ^sync\\\\.`) {
+    next unless /^sync\.(.*?)\.([^\n]*)(?:\n(.*))?/;
+    $sync{$1}{$2} = exists $sync{$1}{$2}
+        ? ref $sync{$1}{$2} ? [@{$sync{$1}{$2}}, $3] : [$sync{$1}{$2}, $3]
+        : $3;
 }
 
 my @categories;

commit 33b01fa7f98b27ae4ae1add8394919529d08fcfe
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sat Nov 21 21:33:32 2009 -0500

    Hide USR1 and "Exit request sent" from ssh master connection

diff --git a/git-sync b/git-sync
index 5deac7c..53f68c9 100755
--- a/git-sync
+++ b/git-sync
@@ -22,6 +22,7 @@ $SIG{INT} = sub {
     print colored("\n\nInterrupted!\n", "bold red");
     exit;
 };
+$SIG{USR1} = 'IGNORE';
 
 my ($verbose, $pretend, $log);
 GetOptions(
@@ -173,7 +174,7 @@ sub sync_all_remote {
     }
 
     # Shut down master connection
-    system "ssh", "-O", "exit", $config{host}
+    `ssh -O exit $config{host} 2>&1`
         if $pid and kill 0, $pid;
 }
 

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



More information about the Bps-public-commit mailing list