git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Buchacher <drizzd@aon.at>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: update-index --really-refresh unsets assume-unchanged bit
Date: Tue, 4 May 2010 10:57:22 +0200	[thread overview]
Message-ID: <20100504085722.GA32217@localhost> (raw)
In-Reply-To: <20100501092720.GB15941@localhost>

On Sat, May 01, 2010 at 11:27:20AM +0200, Clemens Buchacher wrote:

>  --really-refresh::
>  	Like '--refresh', but checks stat information unconditionally,
> -	without regard to the "assume unchanged" setting.
> +	without regard to the "assume unchanged" setting. The "assume
> +	unchanged" bit is unset for all paths.

Scratch that latter part, please. I just noticed the bit is unset only for
modified files. If the file matches the index, or even if it has been
deleted in the work tree, the bit is _not_ unset.

So the current behavior is quite strange. I see several possible
interpretations of --really-refresh:

 Update index for specified paths, disregarding the assume-unchanged bit,

 a) ... and do not ignore work tree changes for tracked files any more.
    I.e., unset the assume-unchanged bit for all files.

 b) ... and do not ignore work tree changes for the specified paths any more.
    I.e., unset assume-unchanged bit only for specified paths.

 c) ... but continue ignoring work tree changes as before.
    I.e., do not unset the assume-unchanged bit for any paths.

(and the current behavior)

 d) ... and do not ignore work tree changes for modified files any more.
    I.e., unset assume-unchanged bit for modified paths.

I believe c) is the most useful, since it allows the user to deactivate the
assume-unchanged bit temporarily. All other options potentially change the
assume-unchanged bit, which the user may or may not want. In my opinion, it
makes no sense to bundle the two operations "update index disregarding the
assume-unchanged bit" and "(conditionally) unset assume-unchanged bit."

Clemens

  reply	other threads:[~2010-05-04  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-01  9:25 [PATCH 1/2] do not overwrite files marked "assume unchanged" Clemens Buchacher
2010-05-01  9:27 ` [PATCH 2/2] Documentation: git-add does not update " Clemens Buchacher
2010-05-04  8:57   ` Clemens Buchacher [this message]
2010-05-04 16:41     ` update-index --really-refresh unsets assume-unchanged bit Avery Pennarun
2010-05-04 19:41       ` Clemens Buchacher
2010-05-04 22:45         ` Junio C Hamano
2010-05-05 15:44           ` Clemens Buchacher

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=20100504085722.GA32217@localhost \
    --to=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).