Re: Refreshing index timestamps without reading content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 09, 2017 at 01:17:24PM +0100, Quentin Casasnovas wrote:
> On Mon, Jan 09, 2017 at 07:02:45PM +0700, Duy Nguyen wrote:
> > On Thu, Jan 5, 2017 at 6:23 PM, Quentin Casasnovas
> > <quentin.casasnovas@xxxxxxxxxx> wrote:
> > 
> > > If not, I am willing to implement a --assume-content-unchanged to the git
> > > update-index if you guys don't see something fundamentally wrong with this
> > > approach.
> > 
> > If you do that, I think you should go with either of the following options
> > 
> > - Extend git-update-index --index-info to take stat info as well (or
> > maybe make a new option instead). Then you can feed stat info directly
> > to git without a use-case-specific "assume-content-unchanged".
> > 
> > - Add "git update-index --touch" that does what "touch" does. In this
> > case, it blindly updates stat info to latest. But like touch, we can
> > also specify  mtime from command line if we need to. It's a bit less
> > generic than the above option, but easier to use.
> > 
> > Caveat: The options I'm proposing can be rejected. So maybe wait a bit
> > to see how people feel and perhaps send an RFC patch, again to gauge
> > the reception.
> 
> 
> Hey Duy,
> 
> Thanks for your answer.
> 
> I've played with this a bit last week and added an extra command, which I
> called --refresh-stat, which works like your suggested --index.  It works
                                                         ^^^^^^^

Whoops, sorry!

[...] *a bit* like your suggested *--touch*. [...]

I don't really need it to support specific mtime from the CLI for my
different use cases, but if someone has some ideas in how that would be
useful, I can try implementing your --index-info change to support stat
information to be passed around instead of my current simple
implementation.

Q

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]