diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-17 18:14:03 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-17 18:14:03 -0700 |
commit | b467fb0b909883f28c4653361ccfa530ccf1a03e (patch) | |
tree | a84b4c34ef9cbf3e342a81ae14e7009a908cf2c7 /dir.c | |
parent | ac8e3f2bb8a790ca7810df18c3282d07e84ae345 (diff) | |
parent | db830b4f233bd45e28592fbf59395bc98d79dec5 (diff) | |
download | git-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.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; +} |