git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, j sixt <j.sixt@viscovery.net>
Subject: Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields
Date: Tue, 15 Jan 2013 00:43:34 +0100 (CET)	[thread overview]
Message-ID: <1815551092.2039693.1358207014937.JavaMail.root@dewire.com> (raw)
In-Reply-To: <7vmwwb8m25.fsf@alter.siamese.dyndns.org>



----- Ursprungligt meddelande -----
> Robin Rosenberg <robin.rosenberg@dewire.com> writes:
> 
> > diff --git a/read-cache.c b/read-cache.c
> > index fda78bc..f7fe15d 100644
> > --- a/read-cache.c
> > +++ b/read-cache.c
> > @@ -197,8 +197,9 @@ static int ce_match_stat_basic(struct
> > cache_entry *ce, struct stat *st)
> >  	}
> >  	if (ce->ce_mtime.sec != (unsigned int)st->st_mtime)
> >  		changed |= MTIME_CHANGED;
> > -	if (trust_ctime && ce->ce_ctime.sec != (unsigned
> > int)st->st_ctime)
> > -		changed |= CTIME_CHANGED;
> > +	if ((trust_ctime ||
> > ((check_nonzero_stat&CHECK_NONZERO_STAT_CTIME) &&
> > ce->ce_ctime.sec)))
> 
> One SP is required on each side of a binary operator; please have
> one after check_nonzero_stat and after the & after it.
> 
> I wonder if we should lose the trust_ctime variable and use this
> check_nonzero_stat bitset exclusively, provided that this were a
> good direction to go?

Semantically they're somewhat different. My flags are for ignoring
a value when it's not used as indicated by the value zero, while
trustctime is for ignoring untrustworthy, non-zero, values.

>From 1ce4790bf5e:
    A new configuration variable 'core.trustctime' is introduced to
    allow ignoring st_ctime information when checking if paths
    in the working tree has changed, because there are situations where
    it produces too much false positives.  Like when file system crawlers
    keep changing it when scanning and using the ctime for marking scanned
    files.

(your second mail)
>Also I am getting these:
>
>config.c: In function 'git_default_core_config':
>config.c:571: error: passing argument 1 of 'git_config_string' from incompatible pointer type
>config.c:540: note: expected 'const char **' but argument is of type 'char **'
>config.c:573: error: passing argument 1 of 'strtok' discards qualifiers from pointer target type

Different compilers have different defaults. I'm on OS X (mountain lion), or am I missing
something? I do get a warning. Am I allowed to modify the value, like strtok does? Seems I
missed the opportunity to use the copy rather then the original value.

Another thing that I noticed, is that I probably wanto to be able to filter on the precision
of timestamps. Again, this i JGit-related. Current JGit has milliseconds precision (max), whereas
Git has down to nanosecond precision in timestamps. Newer JGits may get nanoseconds timestamps too,
but on current Linux versions JGit gets only integral seconds regardless of file system. 

Would the names, milli, micro, nano be good for ignoring the tail when zero, or n1..n9 (obviously
n2 would be ok too). nN = ignore all but first N nsec digits if they are zero)?

-- robin

  reply	other threads:[~2013-01-14 23:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 21:20 [PATCH] Perform minimal stat comparison when some stat fields are not set Robin Rosenberg
2012-12-05 23:43 ` Junio C Hamano
2012-12-06  1:09   ` Robin Rosenberg
2012-12-06  7:21     ` Johannes Sixt
2012-12-06 11:16       ` Robin Rosenberg
2013-01-14 21:11       ` [PATCH v2] Make git selectively and conditionally ignore certain stat fields Robin Rosenberg
2013-01-14 21:57         ` Junio C Hamano
2013-01-14 23:43           ` Robin Rosenberg [this message]
2013-01-15  0:11             ` Junio C Hamano
2013-01-15  0:43               ` Robin Rosenberg
2013-01-15  7:02               ` Johannes Sixt
2013-01-15  7:09               ` Robin Rosenberg
2013-01-15  8:12                 ` Junio C Hamano
2013-01-16 20:14                   ` Ramsay Jones
2013-01-20 19:51                   ` Robin Rosenberg
2013-01-20 20:30                     ` Junio C Hamano
2013-01-22  7:49                       ` [PATCH v3] Enable minimal stat checking Robin Rosenberg
2013-01-22  8:25                         ` Johannes Sixt
2013-01-22 17:19                         ` Torsten Bögershausen
2013-01-22 17:21                         ` Junio C Hamano
2013-01-22 20:38                           ` Robin Rosenberg
2013-05-06 23:22                         ` Jeff King
2013-05-07  4:54                           ` Junio C Hamano
2013-05-07  5:31                             ` [PATCH] deprecate core.statinfo at Git 2.0 boundary Junio C Hamano
2013-05-07  6:38                               ` Junio C Hamano
2013-05-07 14:09                               ` Jeff King
2013-05-07 20:29                                 ` Robin Rosenberg
2013-01-14 23:51           ` [PATCH v3] Make git selectively and conditionally ignore certain stat fields Robin Rosenberg
2013-01-14 22:08         ` [PATCH v2] " Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=1815551092.2039693.1358207014937.JavaMail.root@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).