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

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

 



Junio C Hamano schrieb:
> 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@xxxxxxxxx>
> ---
...
> +# Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec"
> +# available.  This automatically turns USE_NSEC off.
> +#
...
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]

  Powered by Linux