git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Timo Funke <timoses@msn.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Weird behaviour of git diff-index in container
Date: Tue, 10 May 2022 09:47:41 -0700	[thread overview]
Message-ID: <xmqq8rr98hci.fsf@gitster.g> (raw)
In-Reply-To: <YnnRIq3kudurSq4c@google.com> (Jonathan Nieder's message of "Mon, 9 May 2022 19:42:42 -0700")

Jonathan Nieder <jrnieder@gmail.com> writes:

> I love this example.  Thanks for writing.

I guess our mails crossed ;-)

> Some places I expected to find an explanation of this:
>
> - documentation for the "git diff-index" command ("git help
>   diff-index").  It does not mention this behavior.

Yes, diff-index and diff-files should at least have a pointer to
"update-index --refresh".  Ideally they should share a write-up
based on what both of us covered in these responses.

> - documentation for the "git diff" command ("git help diff").  It also
>   doesn't mention this.  That's particularly surprising because it
>   would be a great place to document the diff.autoRefreshIndex setting
>   that affects this behavior of the "git diff" command (described in
>   Documentation/config/diff.txt).

And the autorefreshindex documentation is a tad stale (it is on by
default these days) and does not say why you would want it.  I do
not mind config/diff.txt having it, but that should eventually refer
to the same page that is designed to help the readers of the
diff-index and diff-files documentation.

I do not think anywhere else the missing info belongs to, but
stepping back a bit, it may help to have a write up on scripting
using the plumbing commands in general, not limited to "diff-*"
family of commands.  I actually am torn a bit, as we have long
neglected to give matching improvement to plumbing commands when we
add shiny new toys to commands at the Porcelain level, so Git may
have grown much more hostile to scripters over the years X-<.


      reply	other threads:[~2022-05-10 16:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 22:42 Weird behaviour of git diff-index in container Timo Funke
2022-05-09 23:18 ` Junio C Hamano
2022-05-10  2:42 ` Jonathan Nieder
2022-05-10 16:47   ` Junio C Hamano [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

  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=xmqq8rr98hci.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=timoses@msn.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.
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).