From: "Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org,
"Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
Subject: [PATCH] checkout-index doc: use --work-dir in the export example
Date: Sat, 11 Aug 2007 20:15:19 +0200 [thread overview]
Message-ID: <1186856119985-git-send-email-ukleinek@informatik.uni-freiburg.de> (raw)
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
prev parent reply other threads:[~2007-08-11 18:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-04 22:20 [PATCH] checkout-index needs a working tree Johannes Schindelin
2007-08-04 22:50 ` Junio C Hamano
2007-08-05 1:33 ` Johannes Schindelin
2007-08-09 22:35 ` Uwe Kleine-König
2007-08-10 0:31 ` Johannes Schindelin
2007-08-10 0:55 ` Junio C Hamano
2007-08-10 1:11 ` Johannes Schindelin
2007-08-10 7:57 ` [PATCH] Reinstate the old behaviour when GIT_DIR is set and GIT_WORK_TREE is unset Junio C Hamano
2007-08-10 11:28 ` Uwe Kleine-König
2007-08-10 19:26 ` Junio C Hamano
2007-08-11 5:17 ` Junio C Hamano
2007-08-11 18:15 ` Uwe Kleine-König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1186856119985-git-send-email-ukleinek@informatik.uni-freiburg.de \
--to=ukleinek@informatik.uni-freiburg.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).