summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 13:02:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-11 00:14:17 (GMT)
commit069c053222bfc62a6522430a137e9b2c7ff36e4c (patch)
tree6c86c32582176d17f7ddd31ff24f7ced1f890dc0 /cache.h
parent5dbd767601812209273ae007a97b7c9305dc6cfd (diff)
downloadgit-069c053222bfc62a6522430a137e9b2c7ff36e4c.zip
git-069c053222bfc62a6522430a137e9b2c7ff36e4c.tar.gz
git-069c053222bfc62a6522430a137e9b2c7ff36e4c.tar.bz2
add GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses
This may be needed when a hook is run after a new shallow pack is received, but .git/shallow is not settled yet. A temporary shallow file to plug all loose ends should be used instead. GIT_SHALLOW_FILE is overriden by --shallow-file. --shallow-file does not work in this case because the hook may spawn many git subprocesses and the launch commands do not have --shallow-file as it's a recent addition. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 55dd4e3..8b13287 100644
--- a/cache.h
+++ b/cache.h
@@ -354,6 +354,7 @@ static inline enum object_type object_type(unsigned int mode)
#define DB_ENVIRONMENT "GIT_OBJECT_DIRECTORY"
#define INDEX_ENVIRONMENT "GIT_INDEX_FILE"
#define GRAFT_ENVIRONMENT "GIT_GRAFT_FILE"
+#define GIT_SHALLOW_FILE_ENVIRONMENT "GIT_SHALLOW_FILE"
#define TEMPLATE_DIR_ENVIRONMENT "GIT_TEMPLATE_DIR"
#define CONFIG_ENVIRONMENT "GIT_CONFIG"
#define CONFIG_DATA_ENVIRONMENT "GIT_CONFIG_PARAMETERS"