Re: [RFC] origin link for cherry-pick and revert, and more about porcelain-level metadata

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Petr Baudis <pasky@...>
Cc: Stephen R. van den Berg <srb@...>, <git@...>
Date: Wednesday, September 10, 2008 - 5:35 am

> Why do you actually *follow* the origin link at all anyway? Without its

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).


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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 9:22 am)
Re: [RFC] origin link for cherry-pick and revert, Miklos Vajna, (Wed Sep 10, 4:32 pm)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Wed Sep 10, 4:55 pm)
Re: [RFC] origin link for cherry-pick and revert, Miklos Vajna, (Wed Sep 10, 5:06 pm)
Re: [RFC] origin link for cherry-pick and revert, Petr Baudis, (Tue Sep 9, 5:13 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Wed Sep 10, 4:45 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 6:56 pm)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Wed Sep 10, 8:21 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 10:16 am)
Re: [RFC] origin link for cherry-pick and revert, Petr Baudis, (Wed Sep 10, 12:40 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Wed Sep 10, 1:58 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 6:44 pm)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Wed Sep 10, 12:18 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Wed Sep 10, 11:10 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 5:50 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Wed Sep 10, 5:54 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 6:34 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Wed Sep 10, 6:55 pm)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Wed Sep 10, 10:46 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 7:19 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Thu Sep 11, 1:16 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 3:55 am)
Re: [RFC] origin link for cherry-pick and revert, A Large Angry SCM, (Thu Sep 11, 8:33 am)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Thu Sep 11, 4:45 am)
Re: [RFC] origin link for cherry-pick and revert, Petr Baudis, (Tue Sep 9, 7:05 pm)
Re: [RFC] origin link for cherry-pick and revert, and more a..., Paolo Bonzini, (Wed Sep 10, 5:35 am)
Re: [RFC] origin link for cherry-pick and revert, and more a..., Stephen R. van den Berg, (Wed Sep 10, 11:15 am)
Re: [RFC] origin link for cherry-pick and revert, and more a..., Stephen R. van den Berg, (Wed Sep 10, 7:49 am)
Re: [RFC] origin link for cherry-pick and revert, and more a..., Stephen R. van den Berg, (Wed Sep 10, 9:14 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 7:32 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Tue Sep 9, 11:44 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 3:43 pm)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Tue Sep 9, 7:35 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Tue Sep 9, 7:59 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 7:58 pm)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Tue Sep 9, 8:23 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Wed Sep 10, 4:30 am)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Wed Sep 10, 11:32 am)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Wed Sep 10, 11:37 am)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Wed Sep 10, 11:43 am)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Wed Sep 10, 11:46 am)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Wed Sep 10, 12:23 pm)
Re: [RFC] origin link for cherry-pick and revert, Sam Vilain, (Thu Sep 11, 7:28 pm)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Thu Sep 11, 7:44 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 1:47 am)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Fri Sep 12, 10:58 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 11:54 am)
Re: [RFC] origin link for cherry-pick and revert, Sam Vilain, (Mon Sep 15, 8:21 am)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Fri Sep 12, 12:19 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 12:43 pm)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Fri Sep 12, 2:44 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 4:56 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Fri Sep 12, 11:11 am)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Fri Sep 12, 11:40 am)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Fri Sep 12, 12:00 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Fri Sep 12, 11:05 am)
Re: [RFC] origin link for cherry-pick and revert, Rogan Dawes, (Fri Sep 12, 2:19 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 2:56 am)
Re: [RFC] origin link for cherry-pick and revert, Sam Vilain, (Thu Sep 11, 10:24 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Wed Sep 10, 11:57 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 7:15 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 1:42 am)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Wed Sep 10, 11:30 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Wed Sep 10, 7:09 pm)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Wed Sep 10, 8:39 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 2:22 am)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Thu Sep 11, 11:39 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 3:23 pm)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 3:45 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 3:55 pm)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Thu Sep 11, 5:01 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 4:40 am)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 4:27 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 4:50 am)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Thu Sep 11, 12:53 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Thu Sep 11, 12:01 pm)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Thu Sep 11, 12:23 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 4:16 pm)
Re: [RFC] origin link for cherry-pick and revert, A Large Angry SCM, (Thu Sep 11, 8:28 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 8:39 am)
Re: [RFC] origin link for cherry-pick and revert, A Large Angry SCM, (Thu Sep 11, 8:03 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 8:13 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Thu Sep 11, 4:20 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 8:31 am)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 11:02 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 12:00 pm)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 1:02 pm)
Re: [RFC] origin link for cherry-pick and revert, Junio C Hamano, (Thu Sep 11, 5:05 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 6:32 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 6:40 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 2:44 pm)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 4:00 pm)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Thu Sep 11, 9:51 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 11:32 am)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Thu Sep 11, 2:00 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 3:03 pm)
Re: [RFC] origin link for cherry-pick and revert, Theodore Tso, (Thu Sep 11, 4:04 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Thu Sep 11, 5:46 pm)
Re: [RFC] origin link for cherry-pick and revert, Linus Torvalds, (Thu Sep 11, 7:10 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 7:36 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Thu Sep 11, 7:26 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 6:56 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Thu Sep 11, 7:01 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 7:17 pm)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 3:33 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 3:44 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Thu Sep 11, 4:05 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 4:22 pm)
Re: [RFC] origin link for cherry-pick and revert, A Large Angry SCM, (Thu Sep 11, 8:30 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Fri Sep 12, 1:39 am)
Re: [RFC] origin link for cherry-pick and revert, Nicolas Pitre, (Thu Sep 11, 4:03 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Thu Sep 11, 4:24 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Tue Sep 9, 4:54 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 7:08 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Tue Sep 9, 3:59 pm)
Re: [RFC] origin link for cherry-pick and revert, Junio C Hamano, (Tue Sep 9, 5:05 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Tue Sep 9, 5:09 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 7:36 pm)
Re: [RFC] origin link for cherry-pick and revert, Junio C Hamano, (Tue Sep 9, 4:42 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 8:13 pm)
Re: [RFC] origin link for cherry-pick and revert, Jeff King, (Tue Sep 9, 4:50 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Tue Sep 9, 6:35 pm)
Re: [RFC] origin link for cherry-pick and revert, Jakub Narebski, (Tue Sep 9, 7:07 pm)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Wed Sep 10, 4:10 am)
Re: [RFC] origin link for cherry-pick and revert, Shawn O. Pearce, (Tue Sep 9, 4:47 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 4:25 pm)
Re: [RFC] origin link for cherry-pick and revert, Steven Grimm, (Tue Sep 9, 12:38 pm)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 9:48 am)
Re: [RFC] origin link for cherry-pick and revert, Paolo Bonzini, (Tue Sep 9, 9:38 am)
Re: [RFC] origin link for cherry-pick and revert, Stephen R. van den Berg, (Tue Sep 9, 10:04 am)