[Bps-public-commit] git-sync branch, master, updated. 8f728de70a9a7870c322b181f60de1666533d604

Alex Vandiver alexmv at bestpractical.com
Sat Mar 30 00:45:39 EDT 2013


The branch, master has been updated
       via  8f728de70a9a7870c322b181f60de1666533d604 (commit)
       via  bbbead4d07a6ca6cf5cf5ee85991474c6427f197 (commit)
      from  1da0493c51eeb746926dfdbb5956242bc478b4d5 (commit)

Summary of changes:
 git-sync | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit bbbead4d07a6ca6cf5cf5ee85991474c6427f197
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Mar 5 12:54:10 2013 -0500

    Revert "Fetch updated tags as well"
    
    `git fetch --tags` _only_ fetches tags:
    
        -t, --tags
            This is a short-hand for giving "refs/tags/:refs/tags/" refspec
            from the command line, to ask all tags to be fetched and stored
            locally. Because this acts as an explicit refspec, the default
            refspecs (configured with the remote.$name.fetch variable) are
            overridden and not used.
    
    As such, fetching with --tags only fetched updates if there were new
    tags in the repository.
    
    This reverts commit 1da0493c51eeb746926dfdbb5956242bc478b4d5.

diff --git a/git-sync b/git-sync
index 9946200..ebc65b6 100755
--- a/git-sync
+++ b/git-sync
@@ -15,11 +15,11 @@ with their upstream repositories, and to clone new repositories as
 they are added to the upstream location.
 
 The updating is done in a manner which preserves your local state, and
-I<should> not cause conflicts.  A C<git fetch --all --tags --prune> is
-always done; if the user has no uncommitted changes, and the merge
-would be a fast-forward, the current branch is C<git pull>ed, and the
-diffstat is printed.  Otherwise, the state of the repository is shown
-in a concise manner.
+I<should> not cause conflicts.  A C<git fetch --all --prune> is always
+done; if the user has no uncommitted changes, and the merge would be a
+fast-forward, the current branch is C<git pull>ed, and the diffstat is
+printed.  Otherwise, the state of the repository is shown in a concise
+manner.
 
 C<git-sync> also understands C<git-svn> clones, and updates them using
 the same rules, but using C<git svn fetch> and C<git svn rebase>
@@ -375,7 +375,7 @@ sub add_github_remotes {
             $remote => $uri,
         );
     }
-    my $retval = eval { $repo->command( [qw/fetch --all --tags --prune/], STDERR => 0 ); }
+    my $retval = eval { $repo->command( [qw/fetch --all --prune/], STDERR => 0 ); }
         if $config{fetch};
 
     print colored("{ @network }\n", "dark green");
@@ -522,7 +522,7 @@ sub update {
          # git-svn doesn't work with $repo->command, hate
         `git --git-dir @{[$repo->repo_path]} svn fetch -q` unless $pretend;
     } else {
-        my $ret = eval { $repo->command( [qw/fetch --all --tags --prune/], STDERR => 0 ); } unless $pretend;
+        my $ret = eval { $repo->command( [qw/fetch --all --prune/], STDERR => 0 ); } unless $pretend;
     }
     kill $? & 127, $$ if $? & 127; # Propagate the signal it died with, if any
 

commit 8f728de70a9a7870c322b181f60de1666533d604
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sat Mar 30 00:44:18 2013 -0400

    Fetch branches and tags, in two separate commits
    
    This implements what 1da0493 attempted to do, correctly.

diff --git a/git-sync b/git-sync
index ebc65b6..350b245 100755
--- a/git-sync
+++ b/git-sync
@@ -15,11 +15,11 @@ with their upstream repositories, and to clone new repositories as
 they are added to the upstream location.
 
 The updating is done in a manner which preserves your local state, and
-I<should> not cause conflicts.  A C<git fetch --all --prune> is always
-done; if the user has no uncommitted changes, and the merge would be a
-fast-forward, the current branch is C<git pull>ed, and the diffstat is
-printed.  Otherwise, the state of the repository is shown in a concise
-manner.
+I<should> not cause conflicts.  A C<git fetch --all --prune> and C<git
+fetch --all --tags> is always done; if the user has no uncommitted
+changes, and the merge would be a fast-forward, the current branch is
+C<git pull>ed, and the diffstat is printed.  Otherwise, the state of the
+repository is shown in a concise manner.
 
 C<git-sync> also understands C<git-svn> clones, and updates them using
 the same rules, but using C<git svn fetch> and C<git svn rebase>
@@ -375,7 +375,8 @@ sub add_github_remotes {
             $remote => $uri,
         );
     }
-    my $retval = eval { $repo->command( [qw/fetch --all --prune/], STDERR => 0 ); }
+    my $retval = eval { $repo->command( [qw/fetch --all --prune/], STDERR => 0 )
+                     && $repo->command( [qw/fetch --all --tags/], STDERR => 0 ); }
         if $config{fetch};
 
     print colored("{ @network }\n", "dark green");
@@ -522,7 +523,8 @@ sub update {
          # git-svn doesn't work with $repo->command, hate
         `git --git-dir @{[$repo->repo_path]} svn fetch -q` unless $pretend;
     } else {
-        my $ret = eval { $repo->command( [qw/fetch --all --prune/], STDERR => 0 ); } unless $pretend;
+        my $ret = eval { $repo->command( [qw/fetch --all --prune/], STDERR => 0 )
+                      && $repo->command( [qw/fetch --all --tags/],  STDERR => 0 ); } unless $pretend;
     }
     kill $? & 127, $$ if $? & 127; # Propagate the signal it died with, if any
 

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



More information about the Bps-public-commit mailing list