For example '-1'.
Signed-off-by: Felipe Contreras <[email protected]>
---
contrib/related/git-related | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/contrib/related/git-related b/contrib/related/git-related
index 62c9b56..69737ac 100755
--- a/contrib/related/git-related
+++ b/contrib/related/git-related
@@ -29,7 +29,8 @@ begin
$show_commits = v || true
end
end.parse!
-rescue OptionParser::InvalidOption
+rescue OptionParser::InvalidOption => e
+ $rev_args += e.args
end
def get_mailmap(filename)
@@ -241,9 +242,11 @@ class Commits
case revs.size
when 1
- committish = [ '%s..HEAD' % revs[0] ]
+ r = revs[0]
+ r = '^' + r if r[0] != '-'
+ args = [ r, 'HEAD' ]
else
- committish = revs
+ args = revs
end
source = nil
--
1.8.3.rc2.542.g24820ba
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html