summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3695dc0)
raw | patch | inline | side by side (parent: 3695dc0)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Fri, 24 Sep 2010 16:43:59 +0000 (18:43 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 27 Sep 2010 17:54:52 +0000 (10:54 -0700) |
The documentation in revisions.txt did not match the implementation, and
the comment in sha1_name.c was incomplete.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the comment in sha1_name.c was incomplete.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/revisions.txt | patch | blob | history | |
sha1_name.c | patch | blob | history |
index fe846f043ca30fdfc3bc93b2dbba75154bd38804..3d4b79c480e2c84150bee96392ee2dd2a4b7d3ea 100644 (file)
found.
* 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.
+ a commit whose commit message matches the specified regular expression.
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.
+ The regular expression can match any part of the commit message. To
+ match messages starting with a string, one can use e.g. `:/^foo`.
* A suffix ':' followed by a path (e.g. `HEAD:README`); this names the blob or tree
at the given path in the tree-ish object named by the part
diff --git a/sha1_name.c b/sha1_name.c
index 7b7e61719fa63e41917b41240061c68e3cbabf01..484081de82928108a23a714a76ea88693e56bdd1 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
/* 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 -> recent commit matching foo
*/
if (name[0] == ':') {
int stage = 0;