All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Abhijeet Sonar <abhijeet.nkt@gmail.com>
Cc: phillip.wood@dunelm.org.uk,
	 Karthik Nayak <karthik.188@gmail.com>,
	git@vger.kernel.org,  Paul Millar <paul.millar@desy.de>,
	 Jeff King <peff@peff.net>
Subject: Re: [PATCH] describe: refresh the index when 'broken' flag is used
Date: Mon, 24 Jun 2024 10:58:49 -0700	[thread overview]
Message-ID: <xmqqsex2b4ti.fsf@gitster.g> (raw)
In-Reply-To: <4224c251-c6f7-4b2a-b182-b0a12ee300c8@gmail.com> (Abhijeet Sonar's message of "Mon, 24 Jun 2024 23:07:07 +0530")

Abhijeet Sonar <abhijeet.nkt@gmail.com> writes:

> Currently, `git describe --dirty --broken` reports the working tree as
> dirty if you change the owner of a file.  And as Phillip pointed out,
> calling `git update-index --unmerged -q --refresh` to update the index
> fixes this.

Starting from a clean state with a tracked file COPYING, I can do
this:

    $ git describe --dirty --broken
    v2.45.2-862-g39ba10deb2
    $ cat COPYING >RENAMING && mv RENAMING COPYING
    $ git diff-index --abbrev=8 HEAD
    :100644 100644 536e5552 00000000 M	COPYING
    $ git describe --dirty --broken
    v2.45.2-862-g39ba10deb2-dirty
    $ git describe --dirty
    v2.45.2-862-g39ba10deb2

This is with a version if Git _without_ your fix, i.e. the one whose
"describe --broken --dirty" does not do "git update-index --refresh".

In other words, the stat-only change to cause "diff-index" to report
a "suspected to be modified" does not have to be that the file is
owned by a different owner.  So I still do not understand why you
want a second user in this test.

  reply	other threads:[~2024-06-24 17:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 21:42 [PATCH] describe: refresh the index when 'broken' flag is used Abhijeet Sonar
2024-06-23 21:56 ` Abhijeet Sonar
2024-06-24 10:56 ` Karthik Nayak
2024-06-24 11:20   ` Phillip Wood
2024-06-24 12:20     ` Abhijeet Sonar
2024-06-24 13:48       ` Abhijeet Sonar
2024-06-24 16:34         ` Junio C Hamano
2024-06-24 17:37           ` Abhijeet Sonar
2024-06-24 17:58             ` Junio C Hamano [this message]
2024-06-25  6:40               ` Abhijeet Sonar
2024-06-25  6:44               ` [PATCH v2] " Abhijeet Sonar
2024-06-25 12:27                 ` Karthik Nayak
2024-06-25 13:22                   ` Abhijeet Sonar
2024-06-25 12:28     ` [PATCH] " Karthik Nayak

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=xmqqsex2b4ti.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=abhijeet.nkt@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    --cc=paul.millar@desy.de \
    --cc=peff@peff.net \
    --cc=phillip.wood@dunelm.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.