summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-04 16:00:46 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-05 23:25:52 -0800
commitf8a9d4287277ed15d3f0d61004f4510c59f1f392 (patch)
treeb3a75baf61f97d601d2e4d7cf79c8399b902d9bf /dir.h
parent8ebe185bbf3f1f4f59bcc61e3d1849a76f6af983 (diff)
downloadgit-f8a9d4287277ed15d3f0d61004f4510c59f1f392.tar.gz
read-tree: further loosen "working file will be lost" check.
This follows up commit ed93b449 where we removed overcautious "working file will be lost" check. A new option "--exclude-per-directory=.gitignore" can be used to tell the "git-read-tree" command that the user does not mind losing contents in untracked files in the working tree, if they need to be overwritten by a merge (either a two-way "switch branches" merge, or a three-way merge). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 313f8ab64e..550551ab25 100644
--- a/dir.h
+++ b/dir.h
@@ -43,6 +43,9 @@ extern int common_prefix(const char **pathspec);
extern int match_pathspec(const char **pathspec, const char *name, int namelen, int prefix, char *seen);
extern int read_directory(struct dir_struct *, const char *path, const char *base, int baselen);
+extern int push_exclude_per_directory(struct dir_struct *, const char *, int);
+extern void pop_exclude_per_directory(struct dir_struct *, int);
+
extern int excluded(struct dir_struct *, const char *);
extern void add_excludes_from_file(struct dir_struct *, const char *fname);
extern void add_exclude(const char *string, const char *base,