* Forcing re-reading files with unchanged stats
@ 2011-01-12 14:07 Maaartin
2011-01-13 3:12 ` Tomas Carnecky
0 siblings, 1 reply; 5+ messages in thread
From: Maaartin @ 2011-01-12 14:07 UTC (permalink / raw)
To: git
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-
read them all, so it recognizes the change? Ideally, using a configuration
variable. The repo is fairly small, so speed is no issue here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Forcing re-reading files with unchanged stats
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
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Carnecky @ 2011-01-13 3:12 UTC (permalink / raw)
To: Maaartin; +Cc: git
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?
> 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.
tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Forcing re-reading files with unchanged stats
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
0 siblings, 2 replies; 5+ messages in thread
From: Jeff King @ 2011-01-13 3:32 UTC (permalink / raw)
To: Tomas Carnecky; +Cc: Maaartin, git
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?
>
> >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.
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.
-Peff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Forcing re-reading files with unchanged stats
2011-01-13 3:32 ` Jeff King
@ 2011-01-13 7:26 ` Junio C Hamano
2011-01-14 21:03 ` Maaartin-1
1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2011-01-13 7:26 UTC (permalink / raw)
To: Jeff King; +Cc: Tomas Carnecky, Maaartin, git
Jeff King <peff@peff.net> writes:
> 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.
Changing crlf-related attributes (or filter/smudge) after the fact,
perhaps?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Forcing re-reading files with unchanged stats
2011-01-13 3:32 ` Jeff King
2011-01-13 7:26 ` Junio C Hamano
@ 2011-01-14 21:03 ` Maaartin-1
1 sibling, 0 replies; 5+ messages in thread
From: Maaartin-1 @ 2011-01-14 21:03 UTC (permalink / raw)
To: Jeff King; +Cc: Tomas Carnecky, git
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-14 21:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).