From: "Stephen R. van den Berg" <srb@cuci.nl>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: [RFC] origin link for cherry-pick and revert
Date: Thu, 11 Sep 2008 14:31:48 +0200 [thread overview]
Message-ID: <20080911123148.GA2056@cuci.nl> (raw)
In-Reply-To: <200809111020.55115.jnareb@gmail.com>
Jakub Narebski wrote:
>Stephen R. van den Berg wrote:
>[...]
>> Please focus on the semantics and on the *non*-made up use case of
>> development of several stable branches with backports between them.
>> Discussing made-up use cases is wasting energy at this point.
>By the way, I would really consider trying first to host 'origin' links
>not in repository database itself, but in some extra database inside
>git repository, like reflog or index. Git community is _very_
>reluctant to modifying / extending format of persistent objects. From
Rightfully so, of course.
>So I think you should go the route of externally (outside 'commit'
>objects) maintaing 'origin'/'changeset'/'cset' links (like XLink
>extended links ;-)) as a prototype to examine consequences of the idea.
>That was the way _submodule_ support was added to Git, by the way.
>First there were (at least) two implementations maintaining submodules
>outside object database (see http://git.or.cz/gitwiki/SubprojectSupport
>especially "References" section), then it was officially added first at
>the level of plumbing support, as extension of a 'tree' object (and
>index format, I think).
Well, the train of thought here goes as follows:
1. Sure, why not add a field (zero or more) at the bottom of the free-form
commit message reading like:
Origin: bbb896d8e10f736bfda8f587c0009c358c9a8599 ee837244df2e2e4e9171f508f83f353730db9e53
2. Add support to cherry-pick/revert to actually generate the field upon
demand.
3. Then add support to prune/gc/fsck/blame/log --graph to take the field
into account.
4. Add support to filter-branch/rebase to renumber the field if necessary.
5. Add support to --topo-order to use the field if present and reachable.
6. For bonus points: add support to log to suppress the display of the
field at the end of the commit message, and redisplay the field
as Origin: bbb896d..ee83724
next to the Parent/Merge fields.
Well, and after having done steps 1 to 5, the net result is that it
works almost as if the field is present in the header, except that:
- It is now at the end of the body in the commit message.
- It takes more time to find and parse it.
So that gives two minuses, and no pluses.
So short-circuiting the reasoning suggests that since the only thing
that actually changes now is the position of the field (at the top or
end of the commit message), we might as well do it right and put it in
the top, that gets rid of the two minuses.
Anything I missed?
Basically it means that:
a. If there is a better solution to tracking the backports, I'll gladly
use that instead, but simply using the current really freeform
approach doesn't cut it (it currently refers to a single commit,
instead of a pair of commits, and takes too long to parse out in a
--top-order or blame command). Better solutions I haven't heard so
far.
b. I need the integrity protection of a commit to make sure that the
origin fields cannot be altered later; blame would be too easy to fool
otherwise. So using the notes solution seems to be out (it would also
be quite a performance hit again).
c. I consider the Origin: field at the end of the commit message a
workable solution, but it smells like X-header-extension-messes as in
E-mail headers, and it incurs a small performance hit (in case of
--topo-order/blame/prune/fsck), but maybe this performance hit can be
minimised by making sure that the fields are *always* at the end
of the commit message.
d. Using the proposed origin header in the standard commit header has
close to zero overhead (in most commits the field is not present), yet
codecomplexitywise it is almost identical with the Origin: field at
the end of the commit message.
I find it remarkable though that people are dragging their feet at
solution d, yet are quite ok with solution c. IMO solution c and d are
almost identical, except that solution c is ugly, and solution d is
elegant. But if it makes it easier to prove the usefulness by
implementing the ugly solution first, that's fine.
--
Sincerely,
Stephen R. van den Berg.
"There are three types of people in the world;
those who can count, and those who can't."
next prev parent reply other threads:[~2008-09-11 12:32 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 [this message]
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 ` [RFC] origin link for cherry-pick and revert, and more about porcelain-level metadata Paolo Bonzini
2008-09-10 10:44 ` 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=20080911123148.GA2056@cuci.nl \
--to=srb@cuci.nl \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=torvalds@linux-foundation.org \
/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).