Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH 2/2] better introduction of GIT with USE_NSEC defined

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:20

Kjetil Barvik [off-list ref] writes:
Change the source code such that when USE_NSEC is not defined,
possible nanosecond timestamps will still be saved in the index file,
but not used inside if-test's, and will therefore not affect the
outcome of GIT commands, other than the saved nanosecond timestamps in
the index file.

This will make it easier to use a system with 2 versions of GIT, one
with and one without USE_NSEC defined.
I take it that you are responding to my earlier question with this patch?

    From: Junio C Hamano [off-list ref]
    Subject: Re: [PATCH/RFC v2 2/3] make USE_NSEC work as expected
    Date: Fri, 20 Feb 2009 00:35:35 -0800
    Message-ID: [ref]

    Kjetil Barvik [off-list ref] writes:

    > diff --git a/read-cache.c b/read-cache.c
    > index 940ec76..ca4bec2 100644
    > --- a/read-cache.c
    > +++ b/read-cache.c
    > @@ -67,8 +67,15 @@ void rename_index_entry_at(struct index_state *istate,..
    >   */
    >  void fill_stat_cache_info(struct cache_entry *ce, struct stat *st)
    >  {
    > -	ce->ce_ctime = st->st_ctime;
    > -	ce->ce_mtime = st->st_mtime;
    > +	ce->ce_ctime.sec = (unsigned int)st->st_ctime;
    > +	ce->ce_mtime.sec = (unsigned int)st->st_mtime;
    > +#ifdef USE_NSEC
    > +	ce->ce_ctime.nsec = (unsigned int)st->st_ctim.tv_nsec;
    > +	ce->ce_mtime.nsec = (unsigned int)st->st_mtim.tv_nsec;
    > +#else
    > +	ce->ce_ctime.nsec = 0;
    > +	ce->ce_mtime.nsec = 0;
    > +#endif

    How does this affect a use case where the same index file used with two 
    instances of git (one compiled with and another without USE_NSEC)?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help