[PATCH] checkout-index doc: use --work-dir in the export example
- From
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
- Date
- Aug 11, 2007, 18:15 UTC
- Message-ID
- <1186856119985-git-send-email-ukleinek@informatik.uni-freiburg.de>
- In-Reply-To
- <7vhcn6ps4j.fsf@assigned-by-dhcp.cox.net>
The old example used --prefix=.../ to teach the reader that the trailing slash is important. This lesson just moved down to the next example, without a real example though.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> --- Hello Junio,
even if you revert 4465f410 (and add the tests) I'd prefer using --work-tree.
Best regards Uwe
Documentation/git-checkout-index.txt | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt index b1a8ce1..7c19351 100644 --- a/Documentation/git-checkout-index.txt +++ b/Documentation/git-checkout-index.txt @@ -143,21 +143,16 @@ $ git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh ---------------- Using `git-checkout-index` to "export an entire tree":: - The prefix ability basically makes it trivial to use - `git-checkout-index` as an "export as tree" function. - Just read the desired tree into the index, and do: + Just read the desired tree into the index, make sure + git-export-dir exists, and do: + ---------------- -$ git-checkout-index --prefix=git-export-dir/ -a +$ git --work-dir=git-export-dir checkout-index -a ---------------- + `git-checkout-index` will "export" the index into the specified directory. + -The final "/" is important. The exported name is literally just -prefixed with the specified string. Contrast this with the -following example. - Export files with a prefix:: + ---------------- @@ -165,7 +160,9 @@ $ git-checkout-index --prefix=.merged- Makefile ---------------- + This will check out the currently cached copy of `Makefile` -into the file `.merged-Makefile`. +into the file `.merged-Makefile`. The argument of --prefix is +literally just prefixed with the specified string, so if you want to +export to a directory you must end the prefix with a slash. Author
-- 1.5.3.rc4.857.ge22ff