This is an attempt to allow '-' everywhere a revision is normally allowed. I previously attempted this as a microproject and the subject was disscussed at : http://article.gmane.org/gmane.comp.version-control.git/265672 Currently, something like '-~2' does not work. I tried tracing the execution of, say 'log -~2' vs 'log master -~2' and noticed when calling dwim_ref() with '-~2', it returns 0 (no refs found) whereas when given 'master~2', it returned non-zero. However I'm not sure how exactly dwim_ref() works. Kenny Lee Sin Cheong (4): Add "-" as @{-1} support for the rev-parse command t1505: add tests for '-' notation in rev-parse Handle arg as revision first, then option. t0102: add tests for '-' notation builtin/rev-parse.c | 37 +++++++++++++------------- revision.c | 61 +++++++++++++++++++++++-------------------- sha1_name.c | 2 +- t/t0102-previous-shorthand.sh | 40 ++++++++++++++++++++++++++++ t/t1505-rev-parse-last.sh | 12 ++++++--- 5 files changed, 101 insertions(+), 51 deletions(-) create mode 100644 t/t0102-previous-shorthand.sh -- 2.3.3.203.g8ffb468.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html