@matheusbsbs / matheus-bagliano / commits / 22f741dab7
Fork 0

read-tree: document --exclude-per-directory

This documents the new option to read-tree that is used for the improved "branch switching" code. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Dec 5, 2006 at 23:44 UTC 22f741dab7cc93f00f7cf96cd65d7481677cd855
2 files changed +16 -2
Documentation/git-read-tree.txt
+15 -1
@@ -8,7 +8,7 @@ git-read-tree - Reads tree information into the index
8
9 SYNOPSIS
10 --------
11 -'git-read-tree' (<tree-ish> | [[-m [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] <tree-ish1> [<tree-ish2> [<tree-ish3>]])
11 +'git-read-tree' (<tree-ish> | [[-m [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] <tree-ish1> [<tree-ish2> [<tree-ish3>]])
12
13
14 DESCRIPTION
@@ -71,6 +71,20 @@ OPTIONS
71 directory. Note that the `<prefix>/` value must end
72 with a slash.
73
74 +--exclude-per-directory=<gitignore>::
75 + When running the command with `-u` and `-m` options, the
76 + merge result may need to overwrite paths that are not
77 + tracked in the current branch. The command usually
78 + refuses to proceed with the merge to avoid losing such a
79 + path. However this safety valve sometimes gets in the
80 + way. For example, it often happens that the other
81 + branch added a file that used to be a generated file in
82 + your branch, and the safety valve triggers when you try
83 + to switch to that branch after you ran `make` but before
84 + running `make clean` to remove the generated file. This
85 + option tells the command to read per-directory exclude
86 + file (usually '.gitignore') and allows such an untracked
87 + but explicitly ignored file to be overwritten.
88
89 <tree-ish#>::
90 The id of the tree object(s) to be read/merged.
builtin-read-tree.c
+1 -1
@@ -85,7 +85,7 @@ static void prime_cache_tree(void)
85
86 }
87
88 -static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] <sha1> [<sha2> [<sha3>]])";
88 +static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] <sha1> [<sha2> [<sha3>]])";
89
90 static struct lock_file lock_file;
91