From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, phillip.wood@dunelm.org.uk
Subject: Re: [PATCH/RFC v2] sequencer.c: record revert/cherry-pick commit with trailer lines
Date: Sun, 4 Nov 2018 21:30:07 +0000 [thread overview]
Message-ID: <20181104213007.GL731755@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20181104181026.8451-1-pclouds@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
On Sun, Nov 04, 2018 at 07:10:26PM +0100, Nguyễn Thái Ngọc Duy wrote:
> When a commit is reverted (or cherry-picked with -x) we add an English
> sentence recording that commit id in the new commit message. Make
> these real trailer lines instead so that they are more friendly to
> parsers (especially "git interpret-trailers").
>
> A reverted commit will have a new trailer
>
> Revert: <commit-id>
>
> Similarly a cherry-picked commit with -x will have
>
> Cherry-picked-from: <commit-id>
>
> When reverting or cherry picking a merge, the reverted/cherry-picked
> branch will be shown using extended SHA-1 syntax, e.g.
>
> Revert: <commit-id>~2
>
> Since we're not producing the old lines "This reverts commit ..." and
> "(cherry picked from commit .." anymore, scripts that look for these
> lines will need to be updated to handle both. Fresh new history could
> just rely on git-interpret-trailers instead.
Overall, I like the idea of this series. This is a much cleaner way to
handle things and much better for machine-readability. I foresee git
cherry potentially learning how to parse this, for example, for cases
where the patch-id doesn't match due to context changes.
However, I do have concerns about breaking compatibility with existing
scripts. I wonder if we could add a long alias for git cherry-pick -x,
say "--notate" and have "--notate=text" mean "-x" and "--notate=trailer"
mean this new format. Similarly, git revert could learn such an option
as well.
One final thought: since our trailers seem to act as if we wrote "this
commit" (has been), I wonder if we should say "Reverts" instead of
"Revert" for consistency.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
next prev parent reply other threads:[~2018-11-04 21:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-04 7:22 [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines Nguyễn Thái Ngọc Duy
2018-11-04 16:45 ` Phillip Wood
2018-11-04 17:41 ` Duy Nguyen
2018-11-04 21:12 ` Phillip Wood
2018-11-05 21:57 ` Johannes Schindelin
2018-11-04 18:10 ` [PATCH/RFC v2] " Nguyễn Thái Ngọc Duy
2018-11-04 21:30 ` brian m. carlson [this message]
2018-11-05 16:08 ` Duy Nguyen
2018-11-06 17:16 ` [PATCH/RFC] Support --append-trailer in cherry-pick and revert Nguyễn Thái Ngọc Duy
2018-11-06 17:48 ` Ævar Arnfjörð Bjarmason
2018-11-06 22:11 ` Jeff King
2018-11-06 22:29 ` Jeff King
2018-11-07 0:42 ` Junio C Hamano
2018-11-07 15:30 ` Duy Nguyen
2018-11-07 21:02 ` Jeff King
2018-11-08 0:36 ` Junio C Hamano
2018-11-08 1:29 ` Jeff King
2018-11-08 3:34 ` Junio C Hamano
2018-11-07 0:31 ` Junio C Hamano
2018-11-05 0:56 ` [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines Junio C Hamano
2018-11-05 16:17 ` Duy Nguyen
2018-11-06 1:44 ` Junio C Hamano
2018-11-06 8:57 ` Ævar Arnfjörð Bjarmason
2018-11-06 16:13 ` Duy Nguyen
2018-11-06 17:44 ` Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181104213007.GL731755@genre.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).