From: Kenny Lee Sin Cheong <kenny.lee28@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Kenny Lee Sin Cheong <kenny.lee28@gmail.com>
Subject: [PATCH/RFC 0/4] Adding '-' notation as @{-1} (pu, d40f108)
Date: Mon, 30 Mar 2015 13:41:51 -0400 [thread overview]
Message-ID: <1427737315-7229-1-git-send-email-kenny.lee28@gmail.com> (raw)
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
next reply other threads:[~2015-03-30 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 17:41 Kenny Lee Sin Cheong [this message]
2015-03-30 17:41 ` [PATCH/RFC 1/4] Add "-" as @{-1} support for the rev-parse command Kenny Lee Sin Cheong
2015-03-30 19:46 ` Junio C Hamano
2015-03-30 17:41 ` [PATCH/RFC 2/4] t1505: add tests for '-' notation in rev-parse Kenny Lee Sin Cheong
2015-03-31 4:55 ` Torsten Bögershausen
2015-03-30 17:41 ` [PATCH/RFC 3/4] Handle arg as revision first, then option Kenny Lee Sin Cheong
2015-03-30 17:41 ` [PATCH/RFC 4/4] t0102: add tests for '-' notation Kenny Lee Sin Cheong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427737315-7229-1-git-send-email-kenny.lee28@gmail.com \
--to=kenny.lee28@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.