aboutsummaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-17 18:14:03 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-17 18:14:03 -0700
commitb467fb0b909883f28c4653361ccfa530ccf1a03e (patch)
treea84b4c34ef9cbf3e342a81ae14e7009a908cf2c7 /dir.c
parentac8e3f2bb8a790ca7810df18c3282d07e84ae345 (diff)
parentdb830b4f233bd45e28592fbf59395bc98d79dec5 (diff)
downloadgit-b467fb0b909883f28c4653361ccfa530ccf1a03e.tar.gz
git-b467fb0b909883f28c4653361ccfa530ccf1a03e.tar.xz
Merge branch 'jk/diff'
* jk/diff: wt-status: remove extraneous newline from 'deleted:' output git-status: document colorization config options Teach runstatus about --untracked git-commit.sh: convert run_status to a C builtin Move color option parsing out of diff.c and into color.[ch] diff: support custom callbacks for output
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 5a40d8ff8..e2f472ba7 100644
--- a/dir.c
+++ b/dir.c
@@ -397,3 +397,10 @@ int read_directory(struct dir_struct *dir, const char *path, const char *base, i
qsort(dir->entries, dir->nr, sizeof(struct dir_entry *), cmp_name);
return dir->nr;
}
+
+int
+file_exists(const char *f)
+{
+ struct stat sb;
+ return stat(f, &sb) == 0;
+}