All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maaartin-1 <grajcar1@seznam.cz>
To: Jeff King <peff@peff.net>
Cc: Tomas Carnecky <tom@dbservice.com>, git@vger.kernel.org
Subject: Re: Forcing re-reading files with unchanged stats
Date: Fri, 14 Jan 2011 22:03:02 +0100	[thread overview]
Message-ID: <4D30BA06.3090100@seznam.cz> (raw)
In-Reply-To: <20110113033217.GA32661@sigill.intra.peff.net>

On 11-01-13 04:32, Jeff King wrote:
> On Thu, Jan 13, 2011 at 04:12:25AM +0100, Tomas Carnecky wrote:
> 
>>  On 1/12/11 3:07 PM, Maaartin wrote:
>>> There are files in my working tree which changes, but their size and mtime
>>> remains the same (I know it's strange, but it's useful). Can I make git to re-
>>
>> When can this be useful?

Well, not really. I was asked to place a line containing a version
number and a fingerprint in each file (of course the fingerprint must
ignore this line), so I did. This gets done using a script, and I didn't
like always saying "yes" to Emacs complaining about editing a file
changed on the disk, so I reset the mtime. I really don't think it was
the brightest idea ever.

>>> read them all, so it recognizes the change? Ideally, using a configuration
>>> variable. The repo is fairly small, so speed is no issue here.
>>
>> Try git update-index --refresh. I'm not aware of any config option,
>> but you might want to look through man git-config.
> 
> That won't work, as it respects the stat information. So does
> --really-refresh. AFAIK, there isn't a way to tell update-index to
> ignore start information, short of blowing away the index entirely, and
> doing a read-tree to repopulate it.

Blowing away the index could work for me. I had to check if it's clean
(equal to the HEAD or working tree) first, so I loose no work. But this
is a bit too much work for making my mtime hack work.

> I'm curious what this use case is, and whether it would be acceptable to
> update something like ctime on the files to make them stat-dirty to git.

I'd suppose, Emacs does the same checks.

      parent reply	other threads:[~2011-01-14 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12 14:07 Forcing re-reading files with unchanged stats Maaartin
2011-01-13  3:12 ` Tomas Carnecky
2011-01-13  3:32   ` Jeff King
2011-01-13  7:26     ` Junio C Hamano
2011-01-14 21:03     ` Maaartin-1 [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D30BA06.3090100@seznam.cz \
    --to=grajcar1@seznam.cz \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=tom@dbservice.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 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.