git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc: fix location of index in worktree scenatio
@ 2017-06-10  9:07 Andreas Heiduk
  2017-06-10 11:17 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Andreas Heiduk @ 2017-06-10  9:07 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk, Torsten Bögershausen

When setting `.gitattributes` in a second worktree, a plain `rm .git/index`
does not actually delete the index.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
---
 Documentation/gitattributes.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 473648386..4c6b74fa6 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -229,7 +229,7 @@ From a clean working directory:
 
 -------------------------------------------------
 $ echo "* text=auto" >.gitattributes
-$ rm .git/index     # Remove the index to re-scan the working directory
+$ rm "$(git rev-parse --git-path index)"  # Remove the index to re-scan the working directory
 $ git add .
 $ git status        # Show files that will be normalized
 $ git commit -m "Introduce end-of-line normalization"
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-06-14  6:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-10  9:07 [PATCH] doc: fix location of index in worktree scenatio Andreas Heiduk
2017-06-10 11:17 ` Junio C Hamano
2017-06-10 17:24   ` Andreas Heiduk
2017-06-10 17:38 ` [PATCH v2] " Andreas Heiduk
2017-06-12 10:03   ` Torsten Bögershausen
2017-06-12 10:48     ` Andreas Heiduk
2017-06-12 16:06     ` Junio C Hamano
2017-06-13  4:29       ` Torsten Bögershausen
2017-06-13 13:07         ` Junio C Hamano
2017-06-13 22:15 ` [PATCH v3] doc: do not use `rm .git/index` when normalizing line endings Andreas Heiduk
2017-06-14  4:06   ` Torsten Bögershausen
2017-06-14  6:51   ` [PATCH v4] " Andreas Heiduk

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).