Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-26 12:20:42 +0300
committerJunio C Hamano <junkio@cox.net>2007-02-26 12:20:42 +0300
commit048f48a2fdefdf71e7af19ec7111000ce2ebf52e (patch)
treeee91b56c9071972b1585fa65838da5748c0abfd9 /diff-lib.c
parent646b3299613f0dd947557bc965660986d024322b (diff)
parentc260d790c85c07a5f50235f664c36725deedfb10 (diff)
Merge branch 'master' into js/diff-ni
* master: (201 commits) Documentation: link in 1.5.0.2 material to the top documentation page. Documentation: document remote.<name>.tagopt GIT 1.5.0.2 git-remote: support remotes with a dot in the name Documentation: describe "-f/-t/-m" options to "git-remote add" diff --cc: fix display of symlink conflicts during a merge. merge-recursive: fix longstanding bug in merging symlinks merge-index: fix longstanding bug in merging symlinks diff --cached: give more sensible error message when HEAD is yet to be created. Update tests to use test-chmtime Add test-chmtime: a utility to change mtime on files Add Release Notes to prepare for 1.5.0.2 Allow arbitrary number of arguments to git-pack-objects rerere: do not deal with symlinks. rerere: do not skip two conflicted paths next to each other. Don't modify CREDITS-FILE if it hasn't changed. diff-patch: Avoid emitting double-slashes in textual patch. Reword git-am 3-way fallback failure message. Limit filename for format-patch core.legacyheaders: Use the description used in RelNotes-1.5.0 ...
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 17b9a56fa2..ae8364b42a 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -248,17 +248,27 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
path_len = ce_namelen(ce);
- dpath = xmalloc (combine_diff_path_size (5, path_len));
+ dpath = xmalloc(combine_diff_path_size(5, path_len));
dpath->path = (char *) &(dpath->parent[5]);
dpath->next = NULL;
dpath->len = path_len;
memcpy(dpath->path, ce->name, path_len);
dpath->path[path_len] = '\0';
- dpath->mode = 0;
hashclr(dpath->sha1);
memset(&(dpath->parent[0]), 0,
- sizeof(struct combine_diff_parent)*5);
+ sizeof(struct combine_diff_parent)*5);
+
+ if (lstat(ce->name, &st) < 0) {
+ if (errno != ENOENT && errno != ENOTDIR) {
+ perror(ce->name);
+ continue;
+ }
+ if (silent_on_removed)
+ continue;
+ }
+ else
+ dpath->mode = canon_mode(st.st_mode);
while (i < entries) {
struct cache_entry *nce = active_cache[i];