From 752539843688b382ebd982cb6301b27b4e9abd7d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 9 Apr 2015 15:54:38 +0200 Subject: [PATCH] Update2: Print commit ranges as "OLD..NEW" instead of "OLD -> NEW" The new format can be easily cut and pasted to Git commands. --- update2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update2 b/update2 index d0e05fb..1caa5ca 100755 --- a/update2 +++ b/update2 @@ -143,7 +143,7 @@ sub update_branch($$$$$) $subj .= ' ' . $c0->{subject}; } - print $out "Push to branch $branch ($old -> $new)\n\n"; + print $out "Push to branch $branch ($old..$new)\n\n"; # If there are multiple commits, mention that if (@nonmerges > 1) { @@ -169,12 +169,12 @@ sub update_branch($$$$$) } elsif ($lca eq $new) { # Rewind $subj .= ' Branch rewound'; - print $out "Rewound branch $branch ($old -> $new).\n\n"; + print $out "Rewound branch $branch ($old..$new).\n\n"; most_recent($new); } else { # Otherwise it is a rebase $subj .= ' Branch rebased'; - print $out "Rebased branch $branch ($old -> $new).\n\n"; + print $out "Rebased branch $branch ($old..$new).\n\n"; print $out "Commits from common ancestor:\n\n"; system 'git', 'rev-list', @rev_list_options, $new, "^$old"; } @@ -201,7 +201,7 @@ sub update_tag($$$$$) print $out "Created tag $tag$cp ($new).\n\n"; } else { $subj .= " Changed tag $tag$cp"; - print $out "Changed tag $tag$cp ($old -> $new).\n\n"; + print $out "Changed tag $tag$cp ($old..$new).\n\n"; } most_recent($new); } -- 2.39.2