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 2f38ee1..e8603be 100755
--- a/contrib/related/git-related
+++ b/contrib/related/git-related
@@ -23,7 +23,8 @@ begin
$show_commits = v || true
end
end.parse!
-rescue OptionParser::InvalidOption
+rescue OptionParser::InvalidOption => e
+ $rev_args += e.args
end
class Commit
@@ -135,9 +136,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.2.1
--
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