From: Andreas Heiduk <asheiduk@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Torsten Bögershausen" <tboegi@web.de>
Subject: Re: [PATCH] doc: fix location of index in worktree scenatio
Date: Sat, 10 Jun 2017 19:24:51 +0200 [thread overview]
Message-ID: <d2b21102-eb32-7061-14ee-aa8906fe9eeb@gmail.com> (raw)
In-Reply-To: <xmqqmv9g1487.fsf@gitster.mtv.corp.google.com>
Am 10.06.2017 um 13:17 schrieb Junio C Hamano:
> Andreas Heiduk <asheiduk@gmail.com> writes:
>
>> When setting `.gitattributes` in a second worktree, a plain `rm .git/index`
>> does not actually delete the index.
>>
[...]
> Right.
>
> I however have to wonder if we can do the same without futzing
> directly with the "index" file as a filesystem entity. With or
> without your update, what is taught in the document feels like
> munging a disk block with binary editor to correct a corrupted
> filesystem X-<.
IMO `rm .git/index` is like munging a disk block WITHOUT a binary
editor but with plain `dd seek=... skip=... count=...`, `hexdump`,
`ed` and back - every step is clear in principle but painful and
dangerous. :-)
> For example, can we do this "empty the index" step with things like
>
> $ git rm --cached .
That would be `git rm --cached -rq .`?
Executing this in the git repo gives me an index file with 2.1kb. I
don't know whether or not this index still contains something relevant
for this case.
> or
>
> $ git read-tree --empty
>
> instead?
Nice! The `index` file contains 46 bytes.
For me THAT one is like a nice binary editor apt for the job :-)
I'll queue that.
next prev parent reply other threads:[~2017-06-10 17:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2b21102-eb32-7061-14ee-aa8906fe9eeb@gmail.com \
--to=asheiduk@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).