summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-12 18:32:49 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-12 18:32:49 -0700
commit3d045897585c4b1ca0dce6bb5a33331f1b48c2bf (patch)
tree34e52c7654827bf06d83b6e04c16fa3e5e2b0c53
parentba6ca757bb1859e924fe65cc9f04fe0551225c6d (diff)
parentf7bff00314f473be1ef6c166e91447fabd1822d8 (diff)
downloadgit-3d045897585c4b1ca0dce6bb5a33331f1b48c2bf.tar.gz
Merge branch 'jc/sha1-name-find-fix'
* jc/sha1-name-find-fix: sha1_name.c: fix parsing of ":/token" syntax Conflicts: sha1_name.c
-rw-r--r--sha1_name.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 4f2af8da93..4af94fa598 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -659,6 +659,16 @@ static int get_sha1_1(const char *name, int len, unsigned char *sha1)
return get_short_sha1(name, len, sha1, 0);
}
+/*
+ * This interprets names like ':/Initial revision of "git"' by searching
+ * through history and returning the first commit whose message starts
+ * the given regular expression.
+ *
+ * For future extension, ':/!' is reserved. If you want to match a message
+ * beginning with a '!', you have to repeat the exclamation mark.
+ */
+#define ONELINE_SEEN (1u<<20)
+
static int handle_one_ref(const char *path,
const unsigned char *sha1, int flag, void *cb_data)
{
@@ -674,19 +684,10 @@ static int handle_one_ref(const char *path,
if (object->type != OBJ_COMMIT)
return 0;
insert_by_date((struct commit *)object, list);
+ object->flags |= ONELINE_SEEN;
return 0;
}
-/*
- * This interprets names like ':/Initial revision of "git"' by searching
- * through history and returning the first commit whose message matches
- * the given regular expression.
- *
- * For future extension, ':/!' is reserved. If you want to match a message
- * beginning with a '!', you have to repeat the exclamation mark.
- */
-
-#define ONELINE_SEEN (1u<<20)
static int get_sha1_oneline(const char *prefix, unsigned char *sha1)
{
struct commit_list *list = NULL, *backup = NULL, *l;