]> git.ipfire.org Git - thirdparty/git.git/blobdiff - environment.c
Merge branch '2.16' of https://github.com/ChrisADR/git-po
[thirdparty/git.git] / environment.c
index 8289c25b44d74a0f054f9fe3eaf44c5fdcf0b3d2..63ac38a46f8f01ee3d09ed8e09bd93acba63b21a 100644 (file)
@@ -76,6 +76,7 @@ int protect_hfs = PROTECT_HFS_DEFAULT;
 #define PROTECT_NTFS_DEFAULT 0
 #endif
 int protect_ntfs = PROTECT_NTFS_DEFAULT;
+const char *core_fsmonitor;
 
 /*
  * The character that begins a commented line in user-editable file
@@ -343,3 +344,18 @@ int use_optional_locks(void)
 {
        return git_env_bool(GIT_OPTIONAL_LOCKS_ENVIRONMENT, 1);
 }
+
+int print_sha1_ellipsis(void)
+{
+       /*
+        * Determine if the calling environment contains the variable
+        * GIT_PRINT_SHA1_ELLIPSIS set to "yes".
+        */
+       static int cached_result = -1; /* unknown */
+
+       if (cached_result < 0) {
+               const char *v = getenv("GIT_PRINT_SHA1_ELLIPSIS");
+               cached_result = (v && !strcasecmp(v, "yes"));
+       }
+       return cached_result;
+}