From: linux@horizon.com
To: git@vger.kernel.org
Subject: Re: [RFC] [PATCH 0/5] Implement 'prior' commit object links (and
Date: 29 Apr 2006 12:51:51 -0400 [thread overview]
Message-ID: <20060429165151.2570.qmail@science.horizon.com> (raw)
Boy, this is an interesting discussion!
On the one hand, it seems "obvious" to me that extra links might be
useful. But Linus's minimalist points have a lot of merit.
I have to agree, it's important to think of a single practical use before
adding the feature. So let's do a little brainstorming...
For just referring to another commit, there's no problem putting
it in the body. A sensible porcelain GUI will, when it seems something
that looks like an object identifier in a comment, and that object
identifier exists, make it a clickable link. So a comment like:
"This fixes the same problem as <commit>, but is a cleaner
(albeit more invasive) fix."
Would do the right thing: the user reading it could easily jump
to the other comment. A "header" link as opposed to a "comment"
link just has the property of being unambiguous. No heuristic
will guess that a link should exist when there isn't.
So, what is that property useful for?
Now, one thing that porcelains provide, in addition to "parent" links,
is "child" links. Useful. But it could be done with commit comment
links as well, and it's not clear that having the link in the commit
header as opposed to the comment would help much. You still have to
find and uncompress part of each commit to generate the history
tree. Does uncompressing the rest of it and running a heuristic
over the text for really cost that much?
I'm not convinced it's needed for that feature. (I'd sooner argue for
never compressing commit objects in packs on the grounds that the
repeated uncompression while browsing is worth saving more than the
relatively minor disk space.)
So to be valuable, and inadvisable to express with a specially
formatted comment, it has to be something that would be Very Bad
to get wrong. What qualifies?
Maybe some merge algorithm information? If the merge could be told that
this change "is the same" as that change, so it can be skipped when
cherry-picking that branch, and the information was wrong, that could
cause lots of problems.
But given that git-cherry already uses (imperfect) heuristics to
detect already-merged patches, and they seem to work well enough, is
that a strong enough argument? Is there some other merge application
where it would help?
Now, the "this other object should exist in the repository, and it's an
error if you can't fetch it" link obviously needs to be unambiguously
distinguished from, say, a reference to the (Linux kernel) dodecapus merge
in a git tree checkin comment. But, as Linus says, what reason is there
for including it? What do you need the commit in the repository for?
Well, the only reason that you need ANY commit in the repository is
because it's part of history, and comparing it with other versions is
meaningful. So what trees, not already in the ancestry graph of a
given commit, are useful to compare to? In particular, useful for some
automated process; manual comparisons can always be done manually.
Nothing's jumping out at me. Any suggestions?
next reply other threads:[~2006-04-29 16:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-29 16:51 linux [this message]
2006-04-29 17:35 ` [RFC] [PATCH 0/5] Implement 'prior' commit object links (and Linus Torvalds
2006-04-29 18:07 ` Jakub Narebski
2006-04-29 19:30 ` Junio C Hamano
2006-04-29 18:27 ` Jakub Narebski
2006-04-29 20:44 ` Junio C Hamano
2006-04-29 20:58 ` Jakub Narebski
2006-04-30 15:21 ` Jakub Narebski
2006-04-30 23:19 ` Junio C Hamano
2006-05-01 0:50 ` Junio C Hamano
2006-05-01 1:25 ` Sam Vilain
2006-05-01 4:44 ` Jakub Narebski
2006-05-01 6:58 ` Junio C Hamano
2006-05-02 0:21 ` Sam Vilain
2006-05-02 7:08 ` Martin Langhoff
2006-05-01 0:05 ` Sam Vilain
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=20060429165151.2570.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=git@vger.kernel.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).