summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-05 00:00:46 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-06 07:25:52 (GMT)
commitf8a9d4287277ed15d3f0d61004f4510c59f1f392 (patch)
treeb3a75baf61f97d601d2e4d7cf79c8399b902d9bf /dir.c
parent8ebe185bbf3f1f4f59bcc61e3d1849a76f6af983 (diff)
downloadgit-f8a9d4287277ed15d3f0d61004f4510c59f1f392.zip
git-f8a9d4287277ed15d3f0d61004f4510c59f1f392.tar.gz
git-f8a9d4287277ed15d3f0d61004f4510c59f1f392.tar.bz2
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.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 96389b3..e6a61ee 100644
--- a/dir.c
+++ b/dir.c
@@ -156,7 +156,7 @@ void add_excludes_from_file(struct dir_struct *dir, const char *fname)
die("cannot use %s as an exclude file", fname);
}
-static int push_exclude_per_directory(struct dir_struct *dir, const char *base, int baselen)
+int push_exclude_per_directory(struct dir_struct *dir, const char *base, int baselen)
{
char exclude_file[PATH_MAX];
struct exclude_list *el = &dir->exclude_list[EXC_DIRS];
@@ -170,7 +170,7 @@ static int push_exclude_per_directory(struct dir_struct *dir, const char *base,
return current_nr;
}
-static void pop_exclude_per_directory(struct dir_struct *dir, int stk)
+void pop_exclude_per_directory(struct dir_struct *dir, int stk)
{
struct exclude_list *el = &dir->exclude_list[EXC_DIRS];