From: Johan Herland <johan@herland.net>
To: John Wiegley <johnw@boostpro.com>
Cc: git@vger.kernel.org
Subject: Re: Using Origin hashes to improve rebase behavior
Date: Thu, 10 Feb 2011 23:16:23 +0100 [thread overview]
Message-ID: <201102102316.23628.johan@herland.net> (raw)
In-Reply-To: <m21v3fvbix.fsf@hermes.luannocracy.com>
On Thursday 10 February 2011, John Wiegley wrote:
> Is it allowable to add new metadata fields to a commit, and would this
> require bumping the repository version number? Or should this be
> implemented by appending a Header-style textual field at the end of the
> commit message?
Many have tried before you to add such fields to the commit objects
(including, literally, storing the origin of cherry-picks to help with
rebases; search the archives for several examples). They have not succeeded.
With good reason. This information does not belong in the commit object
header section (see earlier discussions for a more complete rationale).
Putting them at the end of the commit message is your best bet. Or even
better: as a note object stored in a special-purpose notes ref (e.g.
refs/notes/cherry-picks). The note approach also allows you to retroactively
add this field to previous cherry-picks. AND it allows you to remove Origin-
IDs that refer to no-longer-existing commits. AND it pretty much solves the
"git log should show this info" for you as well. In short, this is exactly
the thing that notes were created to do.
Also, don't forget that the existing -x option to cherry-pick pretty much
does exactly what you want to add to the commit object.
As for making use of this information in other git commands (e.g. rebase,
log, etc.), you should show the list that the feature works well and solves
Real Problems(tm) in the real world. If you can do so (with patches), and
are willing to work with the list to address issues raised, and improve your
patches, I'll guess you have a pretty good shot at getting this accepted.
AFAIK, nobody else is working in this area right now, although I don't read
the mailing list religuously, so I may have missed things. As I said, others
have previously proposed similar features, so you'll want to search the
archive for those discussions to make sure you don't repeat the same
mistakes.
Have fun! :)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2011-02-10 22:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 21:13 Using Origin hashes to improve rebase behavior John Wiegley
2011-02-10 22:16 ` Johan Herland [this message]
2011-02-10 22:54 ` Jeff King
2011-02-11 3:14 ` John Wiegley
2011-02-11 4:45 ` Jeff King
2011-02-11 5:26 ` John Wiegley
2011-02-12 14:36 ` Thomas Rast
2011-02-11 10:02 ` skillzero
2011-02-11 11:40 ` Johan Herland
2011-02-11 19:03 ` Jeff King
2011-02-11 19:32 ` Junio C Hamano
2011-02-11 19:45 ` Jeff King
2011-02-20 17:49 ` Enrico Weigelt
2011-02-21 23:49 ` Dave Abrahams
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=201102102316.23628.johan@herland.net \
--to=johan@herland.net \
--cc=git@vger.kernel.org \
--cc=johnw@boostpro.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).