Re: [PATCH] sha1_name.c: update comment to mention :/foo syntax
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Sep 21, 2010, 20:06 UTC
- Message-ID
- <vpq8w2ug8u0.fsf@bauges.imag.fr>
- In-Reply-To
- <7v62xzug94.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 24 quoted lines
> Matthieu Moy <Matthieu.Moy@imag.fr> writes: > >> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> >> --- >> Noticed while reviewing the patch serie about textconv and symlinks. >> If we have comments, better have them up-to-date ;-). >> >> sha1_name.c | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/sha1_name.c b/sha1_name.c >> index 7b7e617..d7ab72a 100644 >> --- a/sha1_name.c >> +++ b/sha1_name.c >> @@ -1062,6 +1062,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1, >> /* sha1:path --> object name of path in ent sha1 >> * :path -> object name of path in index >> * :[0-3]:path -> object name of path in index at stage >> + * :/foo -> last commit whose subject starts with foo > > Documenting what hasn't been is a good thing, but is it really up-to-date? > > Isn't it "a randomly chosen recent commit whose subject contains regexp > foo" these days?
I don't know.
I just tried to summarize what man git-rev-parse says:
· A colon, followed by a slash, followed by a text (e.g. :/fix nasty bug):
this names a commit whose commit message starts with the specified text.
This name returns the youngest matching commit which is reachable from any
ref. If the commit message starts with a !, you have to repeat that; the
special sequence :/!, followed by something else than ! is reserved for
now.If your description is more accurate than mine (especially about "randomly" Vs "last" and "regexp"), then the man should be updated.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/