{"thread":{"id":"2943","subject":"local git push bug wrt GIT_OBJECT_DIRECTORY","startedAt":"2005-12-30T06:08:20Z","lastAt":"2006-01-06T22:36:58Z","messageCount":2,"participants":["Matt Draisey","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14098","messageId":"1135922900.2103.37.camel@della.draisey.ca","threadId":"2943","inReplyTo":null,"subject":"local git push bug wrt GIT_OBJECT_DIRECTORY","fromName":"Matt Draisey","fromEmail":"matt@draisey.ca","sentAt":"2005-12-30T06:08:20Z","receivedAt":"2005-12-30T06:08:20Z","isPatch":false,"sender":{"key":"matt@draisey.ca","avatar":null},"body":"Using git-send-pack to push to a local repository will propagate the\nenvironment variable GIT_OBJECT_DIRECTORY to git-receive-pack.\ngit-receive-pack correctly ignores GIT_DIR (as opposed to what the\ndocumentation says) but, unfortunately, honours GIT_OBJECT_DIRECTORY.\n\nIt's not clear to me whether the correct behaviour is for git-send-pack\nto clean up its environment before it execs or for git-receive-pack to\nignore most GIT variables.\n\nInterposing a short script with env -i or env -uGIT_OBJECT_DIRECTORY is\nthe easiest workaround.\n"},{"id":"14206","messageId":"7vbqypt245.fsf@assigned-by-dhcp.cox.net","threadId":"2943","inReplyTo":"1135922900.2103.37.camel@della.draisey.ca","subject":"Re: local git push bug wrt GIT_OBJECT_DIRECTORY","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-06T22:36:58Z","receivedAt":"2006-01-06T22:36:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt Draisey <matt@draisey.ca> writes:\n\n> Using git-send-pack to push to a local repository will propagate the\n> environment variable GIT_OBJECT_DIRECTORY to git-receive-pack.\n> git-receive-pack correctly ignores GIT_DIR (as opposed to what the\n> documentation says) but, unfortunately, honours GIT_OBJECT_DIRECTORY.\n\nThanks for noticing.\n\nTrue; receive-pack does not \"ignore\", but is explicitly told to\nuse the other repository by invoking send-pack.  \n\n> It's not clear to me whether the correct behaviour is for git-send-pack\n> to clean up its environment before it execs or for git-receive-pack to\n> ignore most GIT variables.\n\nProbably GIT_OBJECT_DIRECTORY should not be propagated;\nGIT_ALTERNATE_OBJECT_DIRECTORIES neither.\n"}]}