Re: [PATCH 2/2] Add revision range support on - and @{-1}

2015-03-25 Thread Junio C Hamano
Kenny Lee Sin Cheong kenny.le...@gmail.com writes: If I'm understanding correctly, the problem of checking revisions before arg is that an option fed to handle_revision_arg() might die() before getting checked as an option in cases where a file with the same name exists? But doesn't

Re: [PATCH 2/2] Add revision range support on - and @{-1}

2015-03-23 Thread Kenny Lee Sin Cheong
On Tue, Mar 17 2015 at 06:16:38 PM, Junio C Hamano gits...@pobox.com wrote: I also notice that handle_revision_arg() would die() by calling it directly or indirectly via verify_non_filename(), etc., but the caller actually is expecting it to silently return non-zero when it finds an argument

Re: [PATCH 2/2] Add revision range support on - and @{-1}

2015-03-17 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: @@ -1499,6 +1500,13 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi next = head_by_default; if (dotdot == arg) this = head_by_default; +/* Allows

Re: [PATCH 2/2] Add revision range support on - and @{-1}

2015-03-17 Thread Kenny Lee Sin Cheong
On Tue, Mar 17 2015 at 02:49:48 AM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: if (try to see if it is a revision or regvision range) { /* if failed ... */ if (starts with '-') { do the option

Re: [PATCH 2/2] Add revision range support on - and @{-1}

2015-03-17 Thread Junio C Hamano
Kenny Lee Sin Cheong kenny.le...@gmail.com writes: On Tue, Mar 17 2015 at 02:49:48 AM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: if (try to see if it is a revision or regvision range) { /* if failed ... */ if (starts with

[PATCH 2/2] Add revision range support on - and @{-1}

2015-03-16 Thread Kenny Lee Sin Cheong
Currently it is not be possible to do something like git checkout master git checkout next git log -.. to see what master has on top of master. Allows use of the revision range such as rev..- or -..rev to see what HEAD has on top of rev or vice versa, respectively. Also allows use of symmetric

Re: [PATCH 2/2] Add revision range support on - and @{-1}

2015-03-16 Thread Junio C Hamano
Kenny Lee Sin Cheong kenny.le...@gmail.com writes: diff --git a/revision.c b/revision.c index 7778bbd..a79b443 100644 --- a/revision.c +++ b/revision.c @@ -1490,6 +1490,7 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi int symmetric =