git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Raible <raible@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
	Daniel Barkalow <barkalow@iabervon.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Schrödinger's diff
Date: Tue, 7 Jul 2009 13:30:47 -0700	[thread overview]
Message-ID: <279b37b20907071330y732fad4dxe4e21edeab9ff179@mail.gmail.com> (raw)
In-Reply-To: <7vtz1o9sv6.fsf@alter.siamese.dyndns.org>

On Tue, Jul 7, 2009 at 12:48 PM, Junio C Hamano<gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>
>> .... But even that might have holes,
>> I'm afraid -- we don't always look at all of the config in every
>> command, though perhaps we do for such core functionality.
>
> I personally do not think it is worth it.  If you change the crlf,
> clean/smudge, or anything of that sort, just doing a "rm .git/index"
> followed by "git reset --hard" would restore sanity to your work tree, no?

Is there any technical reason why "git reset --hard" shouldn't repopulate
the index by doing a "git read-tree" or equivalent [1]?  After all the
docs claim it
"Matches the working tree and index to that of the tree being switched to".

Except in this case it doesn't.  The resulting .index is an invalid
representation
of the tree.  Sanity can be restored with "git read-tree HEAD" (as
Jeff suggested),
but that's hardly intuitive.

- Eric

[1] For instance anything at all (possibly involving time stamps) such that
the index will truly match the tree.

  parent reply	other threads:[~2009-07-07 20:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07  6:53 Schrödinger's diff Eric Raible
2009-07-07  7:28 ` Johannes Sixt
2009-07-07  7:52 ` Andreas Ericsson
2009-07-07 17:36 ` Daniel Barkalow
2009-07-07 19:36   ` Jeff King
2009-07-07 19:48     ` Junio C Hamano
2009-07-07 19:54       ` Jeff King
2009-07-07 22:22         ` Junio C Hamano
2009-07-08  0:17           ` Eric Raible
2009-07-08  2:54             ` Junio C Hamano
2009-07-08  6:13               ` Eric Raible
2009-07-07 20:30       ` Eric Raible [this message]
2009-07-07 20:48         ` Jeff King

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=279b37b20907071330y732fad4dxe4e21edeab9ff179@mail.gmail.com \
    --to=raible@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).