summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-04-11 21:49:44 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-12 02:09:55 (GMT)
commit095952585c2a955f45deac69df17a702d7584c80 (patch)
treeb82f2b3aa70b28539a67252961d521999c786aa3 /dir.h
parent1833a925484675b328d5df04ffca62efa7a0a012 (diff)
downloadgit-095952585c2a955f45deac69df17a702d7584c80.zip
git-095952585c2a955f45deac69df17a702d7584c80.tar.gz
git-095952585c2a955f45deac69df17a702d7584c80.tar.bz2
Teach directory traversal about subprojects
This is the promised cleaned-up version of teaching directory traversal (ie the "read_directory()" logic) about subprojects. That makes "git add" understand to add/update subprojects. It now knows to look at the index file to see if a directory is marked as a subproject, and use that as information as whether it should be recursed into or not. It also generally cleans up the handling of directory entries when traversing the working tree, by splitting up the decision-making process into small functions of their own, and adding a fair number of comments. Finally, it teaches "add_file_to_cache()" that directory names can have slashes at the end, since the directory traversal adds them to make the difference between a file and a directory clear (it always did that, but my previous too-ugly-to-apply subproject patch had a totally different path for subproject directories and avoided the slash for that case). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.h b/dir.h
index 33c31f2..817c674 100644
--- a/dir.h
+++ b/dir.h
@@ -33,7 +33,8 @@ struct dir_struct {
int nr, alloc;
unsigned int show_ignored:1,
show_other_directories:1,
- hide_empty_directories:1;
+ hide_empty_directories:1,
+ no_dirlinks:1;
struct dir_entry **entries;
/* Exclude info */