From: Paolo Bonzini <bonzini@gnu.org>
To: Petr Baudis <pasky@suse.cz>
Cc: "Stephen R. van den Berg" <srb@cuci.nl>, git@vger.kernel.org
Subject: Re: [RFC] origin link for cherry-pick and revert, and more about porcelain-level metadata
Date: Wed, 10 Sep 2008 11:35:18 +0200 [thread overview]
Message-ID: <48C794D6.20001@gnu.org> (raw)
In-Reply-To: <20080909230525.GC10360@machine.or.cz>
> Why do you actually *follow* the origin link at all anyway? Without its
> parents, the associated tree etc., the object is essentially useless for
> you
Stephen posed the origin links as weak, but it is not necessarily true
that you don't have the parents and the associated tree. For example,
if you download a repository that includes a "master" branch and a few
stable branches, you *will* have the objects cherry-picked into stable
branches, because they are commits in the master branch.
Junio explained that the way achieves the same effect in git is by
forking the topic branch off the "oldest" branch where the patch will
possibly be of interest. Then he can merge it in that branch and all
the newest ones. That's great, but not all people are as
forward-looking (he did say that sometimes he needs to cherrypick).
Another problem is that in some projects actually there are two "maint"
branches (e.g. currently GCC 4.2 and GCC 4.3), and most developers do
not care about what goes in the older "maint" branch; they develop for
trunk and for the newer "maint" branch, and then one person comes and
cherry-picks into the older "maint" branch. This has two problems:
1) Having to fork topic branches off the older branch would force extra
testing on the developers.
2) Besides this, topic branches are not cloned, so if I am the
integrator on the older "maint" branch, I need to dig manually in the
commits to find bugfixes. True, I could use Bugzilla, but what if I
want to use git instead? There is "git cherry -v ... | grep -w ^+.*PR",
except that it has too many false negatives (fixes that have already
been backported, but do show up in the list).
> And why are the notes created by git cherry-pick -x insufficient for that?
For example, these notes (or the ones created by "git revert") are
*wrong* because they talk about commits instead of changesets (deltas
between two commits).
Why is only one commit present? Because these messages are meant for
users, not for programs. That's easy to show: users think of commits as
deltas anyway, even though git stores them as snapshots---"git show
HEAD" shows a delta, not a snapshot.
And what does this mean for programs? That they must resort to
commit-message scraping to distinguish the two cases. (*)
(*) A GUI blame program, for example, would need to distinguish
whether code added by a commit is taken from commit 4329bd8, or is
reverting commit 4329bd8. (In the first case, the author of that
code is whoever was responsible for that code in 4329bd8; in the
second case, it is whoever was responsible for that code in
4329bd8^). If recording changesets, you see 4329bd8^..4329bd8 in
the first case, and 4329bd8..4329bd8^ in the second, so it is trivial
to follow the chain.
And scraping is bad. Imagine people that are writing commit messages in
their native language. What if they patch git to translate the magic
notes created by "git cherry-pick -x" or "git revert" (maybe a future
version of git will do that automatically)? Should they translate also
every program that scrapes the messages?
Whenever there is a piece of data that could be useful to programs (no
matter if plumbing or porcelain), I consider free form notes to be bad.
Because data is data, and metadata is metadata.
If there was a generic way to put porcelain-level metadata in commit
messages (e.g. Signed-Off-By and Acknowledged-By can be already
considered metadata), I would not be so much in favor of "origin" links
being part of the commit object's format. Now if you think about it,
commit references within this kind of metadata would have mostly the
properties that Stephen explained in his first message:
1) they would be rewritten by git-filter-branch
2) these references, albeit weak by default, could optionally be
followed when fetching (either with command-line or configuration options)
3) they would not be pruned by git-gc
4) possibly, git rev-list --topo-order would sort commits by taking into
account metadata references too.
So the implementation effort would be roughly the same.
But, can you think of any other such metadata? Personally I can't, so
while I understand the opposition to a new commit header field that
would be there from here to eternity (or until the LHC starts), I do
think it is the simplest thing that can possibly work.
Paolo
next prev parent reply other threads:[~2008-09-10 9:36 UTC|newest]
Thread overview: 137+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 13:22 [RFC] origin link for cherry-pick and revert Stephen R. van den Berg
2008-09-09 13:38 ` Paolo Bonzini
2008-09-09 14:04 ` Stephen R. van den Berg
2008-09-09 13:48 ` Stephen R. van den Berg
2008-09-09 15:44 ` Jakub Narebski
2008-09-09 16:38 ` Steven Grimm
2008-09-09 19:43 ` Stephen R. van den Berg
2008-09-09 19:59 ` Jeff King
2008-09-09 20:25 ` Stephen R. van den Berg
2008-09-09 20:42 ` Junio C Hamano
2008-09-09 20:47 ` Shawn O. Pearce
2008-09-09 20:50 ` Jeff King
2008-09-09 22:35 ` Jakub Narebski
2008-09-09 23:07 ` Jakub Narebski
2008-09-10 8:10 ` Paolo Bonzini
2008-09-10 0:13 ` Stephen R. van den Berg
2008-09-10 1:59 ` Junio C Hamano
2008-09-10 5:38 ` Stephen R. van den Berg
2008-09-09 21:05 ` Junio C Hamano
2008-09-09 21:09 ` Jeff King
2008-09-09 23:36 ` Stephen R. van den Berg
2008-09-09 20:54 ` Jakub Narebski
2008-09-09 23:08 ` Stephen R. van den Berg
2008-09-09 23:35 ` Linus Torvalds
2008-09-09 23:58 ` Stephen R. van den Berg
2008-09-10 0:23 ` Linus Torvalds
2008-09-10 5:42 ` Stephen R. van den Berg
2008-09-10 15:30 ` Linus Torvalds
2008-09-10 23:09 ` Stephen R. van den Berg
2008-09-11 0:39 ` Linus Torvalds
2008-09-11 6:22 ` Stephen R. van den Berg
2008-09-11 8:20 ` Jakub Narebski
2008-09-11 12:31 ` Stephen R. van den Berg
2008-09-11 13:51 ` Theodore Tso
2008-09-11 15:32 ` Stephen R. van den Berg
2008-09-11 18:00 ` Theodore Tso
2008-09-11 19:03 ` Stephen R. van den Berg
2008-09-11 19:33 ` Nicolas Pitre
2008-09-11 19:44 ` Stephen R. van den Berg
2008-09-11 20:03 ` Nicolas Pitre
2008-09-11 20:24 ` Stephen R. van den Berg
2008-09-11 20:05 ` Jakub Narebski
2008-09-11 20:22 ` Stephen R. van den Berg
2008-09-12 0:30 ` A Large Angry SCM
2008-09-12 5:39 ` Stephen R. van den Berg
2008-09-11 20:04 ` Theodore Tso
2008-09-11 21:46 ` Jeff King
2008-09-11 22:56 ` Stephen R. van den Berg
2008-09-11 23:01 ` Jeff King
2008-09-11 23:17 ` Stephen R. van den Berg
2008-09-11 23:10 ` Linus Torvalds
2008-09-11 23:26 ` Jeff King
2008-09-11 23:36 ` Stephen R. van den Berg
2008-09-11 15:02 ` Nicolas Pitre
2008-09-11 16:00 ` Stephen R. van den Berg
2008-09-11 17:02 ` Nicolas Pitre
2008-09-11 18:44 ` Stephen R. van den Berg
2008-09-11 20:00 ` Nicolas Pitre
2008-09-11 21:05 ` Junio C Hamano
2008-09-11 22:32 ` Stephen R. van den Berg
2008-09-11 22:40 ` Stephen R. van den Berg
2008-09-11 12:28 ` A Large Angry SCM
2008-09-11 12:39 ` Stephen R. van den Berg
2008-09-12 0:03 ` A Large Angry SCM
2008-09-12 0:13 ` Stephen R. van den Berg
2008-09-11 15:39 ` Linus Torvalds
2008-09-11 16:01 ` Paolo Bonzini
2008-09-11 16:23 ` Linus Torvalds
2008-09-11 20:16 ` Stephen R. van den Berg
2008-09-11 16:53 ` Jakub Narebski
2008-09-11 19:23 ` Stephen R. van den Berg
2008-09-11 19:45 ` Nicolas Pitre
2008-09-11 19:55 ` Stephen R. van den Berg
2008-09-11 20:27 ` Nicolas Pitre
2008-09-12 8:50 ` Stephen R. van den Berg
2008-09-11 21:01 ` Theodore Tso
2008-09-12 8:40 ` Stephen R. van den Berg
2008-09-10 8:30 ` Paolo Bonzini
2008-09-10 15:32 ` Linus Torvalds
2008-09-10 15:37 ` Paolo Bonzini
2008-09-10 15:43 ` Linus Torvalds
2008-09-10 15:46 ` Linus Torvalds
2008-09-10 15:57 ` Paolo Bonzini
2008-09-10 23:15 ` Stephen R. van den Berg
2008-09-10 16:23 ` Jakub Narebski
2008-09-11 23:28 ` Sam Vilain
2008-09-11 23:44 ` Linus Torvalds
2008-09-12 2:24 ` Sam Vilain
2008-09-12 5:47 ` Stephen R. van den Berg
2008-09-12 6:19 ` Rogan Dawes
2008-09-12 6:56 ` Stephen R. van den Berg
2008-09-12 14:58 ` Theodore Tso
2008-09-12 15:05 ` Paolo Bonzini
2008-09-12 15:11 ` Jakub Narebski
2008-09-12 15:40 ` Paolo Bonzini
2008-09-12 16:00 ` Theodore Tso
2008-09-12 15:54 ` Stephen R. van den Berg
2008-09-12 16:19 ` Jeff King
2008-09-12 16:43 ` Stephen R. van den Berg
2008-09-12 18:44 ` Theodore Tso
2008-09-12 20:56 ` Stephen R. van den Berg
2008-09-15 12:21 ` Sam Vilain
2008-09-09 23:59 ` Jakub Narebski
2008-09-09 21:13 ` Petr Baudis
2008-09-09 22:56 ` Stephen R. van den Berg
2008-09-09 23:05 ` Petr Baudis
2008-09-09 23:32 ` Stephen R. van den Berg
2008-09-10 9:35 ` Paolo Bonzini [this message]
2008-09-10 10:44 ` [RFC] origin link for cherry-pick and revert, and more about porcelain-level metadata Petr Baudis
2008-09-10 11:49 ` Stephen R. van den Berg
2008-09-10 12:30 ` Petr Baudis
2008-09-10 13:14 ` Stephen R. van den Berg
2008-09-10 14:33 ` Dmitry Potapov
2008-09-10 15:15 ` Stephen R. van den Berg
2008-09-10 15:24 ` Paolo Bonzini
2008-09-10 12:21 ` [RFC] origin link for cherry-pick and revert Theodore Tso
2008-09-10 14:16 ` Stephen R. van den Berg
2008-09-10 15:10 ` Jeff King
2008-09-10 21:50 ` Stephen R. van den Berg
2008-09-10 21:54 ` Jeff King
2008-09-10 22:34 ` Stephen R. van den Berg
2008-09-10 22:55 ` Jeff King
2008-09-10 23:19 ` Stephen R. van den Berg
2008-09-11 5:16 ` Paolo Bonzini
2008-09-11 7:55 ` Stephen R. van den Berg
2008-09-11 8:45 ` Paolo Bonzini
2008-09-11 12:33 ` A Large Angry SCM
2008-09-11 2:46 ` Nicolas Pitre
2008-09-10 16:18 ` Theodore Tso
2008-09-10 16:40 ` Petr Baudis
2008-09-10 17:58 ` Paolo Bonzini
2008-09-10 22:44 ` Stephen R. van den Berg
2008-09-10 8:45 ` Paolo Bonzini
2008-09-23 13:51 ` Recording "partial merges" (was: Re: [RFC] origin link for cherry-pick and revert) Peter Krefting
2008-09-10 20:32 ` [RFC] origin link for cherry-pick and revert Miklos Vajna
2008-09-10 20:55 ` Nicolas Pitre
2008-09-10 21:06 ` Miklos Vajna
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=48C794D6.20001@gnu.org \
--to=bonzini@gnu.org \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
--cc=srb@cuci.nl \
/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).