From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Nathan Neulinger <nneul@neulinger.org>,
Santiago Torres <santiago@nyu.edu>,
git@vger.kernel.org
Subject: Re: git status always modifies index?
Date: Sun, 26 Nov 2017 14:25:08 -0500 [thread overview]
Message-ID: <20171126192508.GB1501@sigill> (raw)
In-Reply-To: <alpine.DEB.2.21.1.1711252240300.6482@virtualbox>
On Sat, Nov 25, 2017 at 10:55:25PM +0100, Johannes Schindelin wrote:
> > Right, I went a little off track of your original point.
> >
> > What I was trying to get at is that naming it "status --no-lock-index"
> > would not be the same thing (even though with the current implementation
> > it would behave the same). IOW, can we improve the documentation of
> > "status" to point to make it easier to discover this use case.
>
> I had the hunch that renaming the option (and moving it away from `git
> status`, even if it is currently only affecting `git status` and even if
> it will most likely be desirable to have the option to really only prevent
> `git status` from writing .lock files) was an unfortunate decision (and
> made my life as Git for Windows quite a bit harder than really necessary,
> it cost me over one workday of a bug hunt, mainly due to a false flag
> indicating `git rebase` to be the culprit). And I hinted at it, too.
I remain unconvinced that we have actually uncovered a serious problem.
Somebody asked if Git could do a thing, and people pointed him to the
right option. That option is new in the latest release. So it is
entirely plausible to me that the new option is just fine and:
1. We could adjust the documentation to cross-reference from
git-status.
2. Now that the new option exists, informal documentation will start
to mention it. Including this thread in the mailing list archive,
and the stack overflow thread that was linked.
> I really never understood why --no-optional-locks had to be introduced
> when it did exactly the same as --no-lock-index, and when the latter has a
> right to exist in the first place, even in the purely hypothetical case
> that we teach --no-optional-locks to handle more cases than just `git
> status`' writing of the index (and in essence, it looks like premature
> optimization): it is a very concrete use case that a user may want `git
> status` to refrain from even trying to write any file, as this thread
> shows very eloquently.
Besides potentially handling more than just "git status", it differs in
one other way: it can be triggered via and is carried through the
environment.
> Maybe it is time to reintroduce --no-lock-index, and make
> --no-optional-locks' functionality a true superset of --no-lock-index'.
I'm not against having a separate option for "never write to the
repository". I think it's potentially different than "don't lock", as I
mentioned earlier. Frankly I don't see much value in "--no-lock-index"
if we already have "--no-optional-locks". But I figured you would carry
"status --no-lock-index" forever in Git for Windows anyway (after all,
if you remove it now, you're breaking compatibility for existing users).
-Peff
next prev parent reply other threads:[~2017-11-26 19:25 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 15:19 git status always modifies index? Nathan Neulinger
2017-11-22 15:30 ` Santiago Torres
2017-11-22 15:37 ` Nathan Neulinger
2017-11-22 16:10 ` Santiago Torres
2017-11-22 16:20 ` Nathan Neulinger
2017-11-22 16:24 ` Santiago Torres
2017-11-22 20:27 ` Jonathan Nieder
2017-11-22 21:17 ` Jeff King
2017-11-22 21:56 ` Jonathan Nieder
2017-11-22 22:06 ` Jeff King
2017-11-25 21:55 ` Johannes Schindelin
2017-11-26 19:25 ` Jeff King [this message]
2017-11-26 21:55 ` Johannes Schindelin
2017-11-27 5:24 ` Jeff King
2017-11-27 6:03 ` Junio C Hamano
2017-11-27 20:50 ` Johannes Schindelin
2017-11-27 6:04 ` [PATCH] git-status.txt: mention --no-optional-locks Jeff King
2017-11-27 6:07 ` Junio C Hamano
2017-11-27 10:22 ` Kaartic Sivaraam
2017-11-27 20:54 ` Johannes Schindelin
2017-11-27 20:44 ` git status always modifies index? Johannes Schindelin
2017-11-27 20:49 ` Jonathan Nieder
2017-11-26 3:32 ` Junio C Hamano
2017-11-26 9:35 ` Junio C Hamano
2017-11-27 4:43 ` Jeff King
2017-11-27 4:56 ` Junio C Hamano
2017-11-27 5:00 ` Jeff King
2017-11-27 20:57 ` Jonathan Nieder
2017-11-27 22:50 ` Jeff King
2017-12-03 0:37 ` Junio C Hamano
2017-11-26 19:27 ` Jeff King
2017-11-27 0:47 ` Junio C Hamano
2017-11-27 6:12 ` 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=20171126192508.GB1501@sigill \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=nneul@neulinger.org \
--cc=santiago@nyu.edu \
/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).