git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 6, 2009, 07:56 UTC
Message-ID
<49B0D739.3050105@viscovery.net>
In-Reply-To
<7vd4cvzqkl.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 17 quoted lines
> Record ns-timestamps if possible, but do not use it without USE_NSEC
> 
> Traditionally, the lack of USE_NSEC meant "do not record nor use the
> nanosecond resolution part of the file timestamps".  To avoid problems on
> filesystems that lose the ns part when the metadata is flushed to the disk
> and then later read back in, disabling USE_NSEC has been a good idea in
> general.
> 
> If you are on a filesystem without such an issue, it does not hurt to read
> and store them in the cached stat data in the index entries even if your
> git is compiled without USE_NSEC.  The index left with such a version of
> git can be read by git compiled with USE_NSEC and it can make use of the
> nanosecond part to optimize the check to see if the path on the filesystem
> hsa been modified since we last looked at.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
...
> +# Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec"
> +# available.  This automatically turns USE_NSEC off.
> +#
...
Show 8 quoted lines
> @@ -802,6 +805,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>  	RUNTIME_PREFIX = YesPlease
>  	NO_POSIX_ONLY_PROGRAMS = YesPlease
>  	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
> +	NO_NSEC = YesPlease
>  	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch
>  	COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
>  	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"

Thanks, with this the build no longer breaks on Windows. But I need this option on AIX as well:

diff --git a/Makefile b/Makefile
index 137a3ff..b974978 100644
--- a/Makefile
+++ b/Makefile
@@ -737,6 +737,7 @@ ifeq ($(uname_S),AIX)
 	NO_MEMMEM = YesPlease
 	NO_MKDTEMP = YesPlease
 	NO_STRLCPY = YesPlease
+	NO_NSEC = YesPlease
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	INTERNAL_QSORT = UnfortunatelyYes
 	NEEDS_LIBICONV=YesPlease

-- Hannes
Previous: Junio C Hamano
Message 11 of 11 in “some few more 'git checkout' improvements”
  1. 0/2 some few more 'git checkout' improvementsKjetil Barvik, Mar 4, 2009
  2. 1/2 stat_tracking_info(): only count real commitsKjetil Barvik, Mar 4, 2009
  3. 2/2 better introduction of GIT with USE_NSEC definedKjetil Barvik, Mar 4, 2009
  4. Junio C HamanoMar 5, 2009
  5. Kjetil BarvikMar 5, 2009
  6. Junio C HamanoMar 5, 2009
  7. Johannes SixtMar 5, 2009
  8. Johannes SixtMar 5, 2009
  9. Junio C HamanoMar 5, 2009
  10. Junio C HamanoMar 5, 2009
  11. Johannes SixtMar 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.