From: "Jakub Narębski" <jnareb@gmail.com>
To: Vegard Nossum <vegard.nossum@oracle.com>, git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Santi Béjar" <sbejar@gmail.com>,
"Kevin Bracey" <kevin@bracey.fi>,
"Philip Oakley" <philipoakley@iee.org>
Subject: Re: [RFC PATCH v2] revision: new rev^-n shorthand for rev^n..rev
Date: Sun, 25 Sep 2016 16:19:58 +0200 [thread overview]
Message-ID: <ab725c6e-5c8f-d137-fefc-7f094ea7b7bb@gmail.com> (raw)
In-Reply-To: <20160925085511.12515-1-vegard.nossum@oracle.com>
W dniu 25.09.2016 o 10:55, Vegard Nossum pisze:
> I use rev^..rev daily, and I'm surely not the only one. To save typing
> (or copy-pasting, if the rev is long -- like a full SHA-1 or branch name)
> we can make rev^- a shorthand for that.
>
> The existing syntax rev^! seems like it should do the same, but it
> doesn't really do the right thing for merge commits (it gives only the
> merge itself).
>
> As a natural generalisation, we also accept rev^-n where n excludes the
> nth parent of rev, although this is expected to be generally less useful.
>
> [v2: Use ^- instead of % as suggested by Junio Hamano and use some
> common helper functions for parsing.]
Minor sidenote: the above should go after the "---" line, as it should
be not included in the final commit message.
>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
> ---
> Documentation/revisions.txt | 14 +++++++
> builtin/rev-parse.c | 28 ++++++++++++++
> revision.c | 91 +++++++++++++++++++++++++++++++++++++++++++++
> revision.h | 1 +
> 4 files changed, 134 insertions(+)
next prev parent reply other threads:[~2016-09-25 14:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-25 8:55 [RFC PATCH v2] revision: new rev^-n shorthand for rev^n..rev Vegard Nossum
2016-09-25 10:25 ` Matthieu Moy
2016-09-25 14:07 ` Ramsay Jones
2016-09-25 14:19 ` Jakub Narębski [this message]
2016-09-25 17:37 ` Philip Oakley
2016-09-26 0:39 ` Junio C Hamano
2016-09-26 13:00 ` Philip Oakley
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=ab725c6e-5c8f-d137-fefc-7f094ea7b7bb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kevin@bracey.fi \
--cc=philipoakley@iee.org \
--cc=sbejar@gmail.com \
--cc=vegard.nossum@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).