From: "Jakub Narębski" <jnareb@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] gitweb: Link to "git describe"'d commits in log messages
Date: Wed, 21 Sep 2016 19:49:23 +0200 [thread overview]
Message-ID: <ba9d9c82-4b5e-4d62-95f1-a1c56cfc70af@gmail.com> (raw)
In-Reply-To: <xmqqvaxp9oyp.fsf@gitster.mtv.corp.google.com>
W dniu 21.09.2016 o 18:50, Junio C Hamano pisze:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> There's surely room for improvement here, but I just wanted to address
>> the very common case of sticking "git describe" output into commit
>> messages without trying to link to all possible refnames, that's going
>> to be a rather futile exercise given that this is free text, and it
>> would be prohibitively expensive to look up whether the references in
>> question exist in our repository.
>
> When I saw 2/3 I wondered about one thing and 3/3 shares the same,
> which is that we only use regex match and do not validate for a
> false match. Would it be too expensive to pick up what _looks_ like
> a rev (e.g. hex or g(refname regexp)-hex) then validate it with
> "rev-parse --verify --quiet" to make sure it is a rev, before
> actually making it a link? Even if are we trying to account for
> people referring to commits that do not exist in this repository
> (e.g. some other project, in a submodule repository, or just an
> earlier incarnation of rebasing that has since been lost), it seems
> to me that it does not help to mark them with a link that won't
> resolve.
I think it could be a good *option*, but revision verification
could be costly, for example in the 'log' view with multiple commits
and multiple revision-like looking candidates, even if we were able
to do it with one command.
Also, "git rev-parse --verify [--quiet]" can verify only one
revision at once, isn't it? Maybe something like 'git cat-file
--batch-check' would be better (one fork)?
It's a matter of balance between false positives (and unresolving
links) and performance...
Best,
--
Jakub Narębski
next prev parent reply other threads:[~2016-09-21 17:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 11:44 [PATCH 1/3] gitweb: Fix an ancient typo in v1.7.7-rc1-1-g0866786 Ævar Arnfjörð Bjarmason
2016-09-21 11:44 ` [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages Ævar Arnfjörð Bjarmason
2016-09-21 16:26 ` Jakub Narębski
2016-09-21 18:04 ` Ævar Arnfjörð Bjarmason
2016-09-21 18:28 ` Jakub Narębski
2016-09-21 20:09 ` Ævar Arnfjörð Bjarmason
2016-09-21 11:44 ` [PATCH 3/3] gitweb: Link to "git describe"'d commits in log messages Ævar Arnfjörð Bjarmason
2016-09-21 16:50 ` Junio C Hamano
2016-09-21 17:49 ` Jakub Narębski [this message]
2016-09-21 18:01 ` Junio C Hamano
2016-09-21 17:09 ` Jakub Narębski
2016-09-21 17:58 ` Ævar Arnfjörð Bjarmason
2016-09-21 19:13 ` Jakub Narębski
2016-09-21 13:33 ` [PATCH 1/3] gitweb: Fix an ancient typo in v1.7.7-rc1-1-g0866786 Jakub Narębski
2016-09-21 14:17 ` Ævar Arnfjörð Bjarmason
2016-09-21 17:14 ` Jakub Narębski
2016-09-21 17:17 ` Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba9d9c82-4b5e-4d62-95f1-a1c56cfc70af@gmail.com \
--to=jnareb@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).