summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-11-18 07:50:58 +0100
committerJunio C Hamano <gitster@pobox.com>2009-11-20 22:08:10 -0800
commit6476b38b1f3d258006566c3c9c6c80cc07fda354 (patch)
treeaa87937dc0da79a66512825ead214bf84deeadae /connect.c
parente36e6c00cd60130f8792319a5aa0f56d2da68e14 (diff)
downloadgit-6476b38b1f3d258006566c3c9c6c80cc07fda354.tar.gz
replace: use a GIT_NO_REPLACE_OBJECTS env variable
This has the same effect as --no-replace-objects option; git ignores the replace refs. When --no-replace-objects option is passed to git, this environment variable is set to "1" and exported to subprocesses in order to propagate the same setting. It is useful for example for scripts, as the git commands used in them can now be aware that they must not read replace refs. Tested-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index 7945e38ac1..c4f134f07a 100644
--- a/connect.c
+++ b/connect.c
@@ -630,6 +630,7 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
GIT_WORK_TREE_ENVIRONMENT,
GRAFT_ENVIRONMENT,
INDEX_ENVIRONMENT,
+ NO_REPLACE_OBJECTS_ENVIRONMENT,
NULL
};
conn->env = env;