author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Wed, 15 Dec 2010 09:02:54 +0000 (16:02 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 16 Dec 2010 21:11:42 +0000 (13:11 -0800) | ||
commit | 4322842acfaace812308f8aec0fe39a358f3c6f2 | |
tree | 31cb3e55eccfa2f4aa3d58985866a3870f85faf0 | tree | snapshot |
parent | 32574b68c57f3b34e58216a4c9c6d570d11ec47b | commit | diff |
get_sha1: handle special case $commit^{/}
Empty regex pattern should always match. But the exact behavior of
regexec() may vary. Because it always matches anyway, we can just
return 'matched' without calling regex machinery.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Empty regex pattern should always match. But the exact behavior of
regexec() may vary. Because it always matches anyway, we can just
return 'matched' without calling regex machinery.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c | diff | blob | history |