[Bps-public-commit] git-sync branch, master, updated. d09ac61710303d67350f02ef87735d5ec15c39f5
Alex Vandiver
alexmv at bestpractical.com
Thu Dec 11 13:24:45 EST 2014
The branch, master has been updated
via d09ac61710303d67350f02ef87735d5ec15c39f5 (commit)
from fa2f6a14e84de3f0288c277db8608ba1210bc74b (commit)
Summary of changes:
git-sync | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit d09ac61710303d67350f02ef87735d5ec15c39f5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Dec 11 13:24:42 2014 -0500
Git 2.0 drops the leading pound sign on `git status` output
diff --git a/git-sync b/git-sync
index 5ac5378..6185074 100755
--- a/git-sync
+++ b/git-sync
@@ -565,10 +565,10 @@ sub update {
# Rebase if there are no changes, it is on a tracking
# branch, and the result would be a fast-forward
- my ($branch) = $status =~ /^# On branch (.*)/m;
+ my ($branch) = $status =~ /^(?:# )?On branch (.*)/m;
$branch ||= 'Not currently on any branch';
if ($status =~ /^nothing (?:added )?to commit/m
- and $status =~ /^# Your branch is behind '(.*?)' by (\d+) commits?, and can be fast-forwarded/m) {
+ and $status =~ /^(?:# )?Your branch is behind '(.*?)' by (\d+) commits?, and can be fast-forwarded/m) {
my ($tracking, $behind) = ($1, $2);
# git-pull is a shell script, unfortunately, and
# thus can't be run via $repo->command( "pull" )
@@ -599,13 +599,13 @@ sub update {
$repo->command("gc", "--quiet") if $gc and not $pretend;
my $logs = "";
my $dirty = ($status !~ /^nothing (?:added )?to commit/m) ? 1 : 0;
- if ($status =~ /^# Your branch and '.*?' have diverged.*?(\d+) and (\d+) different commit/sm) {
+ if ($status =~ /^(?:# )?Your branch and '.*?' have diverged.*?(\d+) and (\d+) different commit/sm) {
print colored( "[ Diverged by $1 and $2 commits ($branch) ]", "bold cyan" );
- } elsif ($status =~ /^# Your branch is ahead of '(.*?)' by (\d+) commit/m) {
+ } elsif ($status =~ /^(?:# )?Your branch is ahead of '(.*?)' by (\d+) commit/m) {
my ($tracking, $ahead) = ($1, $2);
print colored( "[ Ahead by $ahead ($branch) ]", "bold blue");
$logs = logs($repo, $tracking => $branch);
- } elsif ($status =~ /^# Your branch is behind '(.*?)' by (\d+) commit/m) {
+ } elsif ($status =~ /^(?:# )Your branch is behind '(.*?)' by (\d+) commit/m) {
my ($tracking, $behind) = ($1, $2);
print colored( "[ Behind by $behind ($branch) ]", "bold magenta");
$logs = logs($repo, $branch => $tracking);
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list