path: root/refs.c
diff options
authorJunio C Hamano <>2006-08-10 21:17:49 (GMT)
committerJunio C Hamano <>2006-08-10 21:17:49 (GMT)
commit44e1d764d0d3123a614377e10655b4348cf57771 (patch)
tree70154ab1c6ce2a4e8756770132de1b05552252c8 /refs.c
parent102cb08521df5f33b30c0ef41a1078a61e593943 (diff)
parent0eaf22f4c4bba89457e733264e71343368712793 (diff)
Merge branch 'master' into mk/rename
* master: git-verify-pack: no need to count errors git-verify-pack: buffer overrun paranoia git-verify-pack: free pack after use and a cleanup git-verify-pack: get rid of while loop git-verify-pack: insist on .idx extension git-verify-pack: more careful path handling git-verify-pack: show usage when no pack was specified Add has_extension() builtin-apply: remove unused increment Fix git-diff A...B combine-diff: use color git-apply: applying a patch to make a symlink shorter. allow diff.renamelimit to be set regardless of -M/-C make --find-copies-harder imply -C find_unique_abbrev() with len=0 should not abbreviate check return value from diff_setup_done() Fix tutorial-2.html Documentation: git-status takes the same options as git-commit Update git-init-db(1) and documentation of core.sharedRepository
Diffstat (limited to 'refs.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 02850b6..b01835f 100644
--- a/refs.c
+++ b/refs.c
@@ -147,7 +147,7 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u
namelen = strlen(de->d_name);
if (namelen > 255)
- if (namelen>5 && !strcmp(de->d_name+namelen-5,".lock"))
+ if (has_extension(de->d_name, namelen, ".lock"))
memcpy(path + baselen, de->d_name, namelen+1);
if (stat(git_path("%s", path), &st) < 0)