projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-rev-parse: parse ".." before simple SHA1's
[git.git]
/
check-files.c
diff --git
a/check-files.c
b/check-files.c
index
c74bf87
..
6fd69e7
100644
(file)
--- a/
check-files.c
+++ b/
check-files.c
@@
-18,22
+18,22
@@
static void check_file(const char *path)
/* Nonexistent is fine */
if (fd < 0) {
if (errno != ENOENT)
/* Nonexistent is fine */
if (fd < 0) {
if (errno != ENOENT)
-
usag
e("%s: %s", path, strerror(errno));
+
di
e("%s: %s", path, strerror(errno));
return;
}
/* Exists but is not in the cache is not fine */
pos = cache_name_pos(path, strlen(path));
if (pos < 0)
return;
}
/* Exists but is not in the cache is not fine */
pos = cache_name_pos(path, strlen(path));
if (pos < 0)
-
usag
e("preparing to update existing file '%s' not in cache", path);
+
di
e("preparing to update existing file '%s' not in cache", path);
ce = active_cache[pos];
ce = active_cache[pos];
- if (
fstat(fd
, &st) < 0)
-
usage("f
stat(%s): %s", path, strerror(errno));
+ if (
lstat(path
, &st) < 0)
+
die("l
stat(%s): %s", path, strerror(errno));
- changed = c
ach
e_match_stat(ce, &st);
+ changed = ce_match_stat(ce, &st);
if (changed)
if (changed)
-
usag
e("preparing to update file '%s' not uptodate in cache", path);
+
di
e("preparing to update file '%s' not uptodate in cache", path);
}
int main(int argc, char **argv)
}
int main(int argc, char **argv)