summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-08-02 11:01:00 -0700
committerJunio C Hamano <gitster@pobox.com>2013-08-02 11:01:01 -0700
commitd6cbf2fa7a51229d992c9c8d51eb635eccdd6067 (patch)
tree7d3875e942bd8b2a73272228fe33b4166e4c587f /path.c
parentc7eb614c5cc4b265a53421354020634f92fc2d59 (diff)
parentf66450ae94f28a565226c3e443df5433722c5672 (diff)
downloadgit-d6cbf2fa7a51229d992c9c8d51eb635eccdd6067.tar.gz
Merge branch 'rj/cygwin-clarify-use-of-cheating-lstat'
Cygwin port added a "not quite correct but a lot faster and good enough for many lstat() calls that are only used to see if the working tree entity matches the index entry" lstat() emulation some time ago, and it started biting us in places. This removes it and uses the standard lstat() that comes with Cygwin. Recent topic that uses lstat on packed-refs file is broken when this cheating lstat is used, and this is a simplest fix that is also the cleanest direction to go in the long run. * rj/cygwin-clarify-use-of-cheating-lstat: cygwin: Remove the Win32 l/stat() implementation
Diffstat (limited to 'path.c')
-rw-r--r--path.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/path.c b/path.c
index 7f3324aeea..3d244d3e03 100644
--- a/path.c
+++ b/path.c
@@ -5,13 +5,7 @@
#include "strbuf.h"
#include "string-list.h"
-#ifndef get_st_mode_bits
-/*
- * The replacement lstat(2) we use on Cygwin is incomplete and
- * may return wrong permission bits. Most of the time we do not care,
- * but the callsites of this wrapper do care.
- */
-int get_st_mode_bits(const char *path, int *mode)
+static int get_st_mode_bits(const char *path, int *mode)
{
struct stat st;
if (lstat(path, &st) < 0)
@@ -19,7 +13,6 @@ int get_st_mode_bits(const char *path, int *mode)
*mode = st.st_mode;
return 0;
}
-#endif
static char bad_path[] = "/bad-path/";