HomePhabricator

Specify HOME when invoking Git commands

Description

Specify HOME when invoking Git commands

Summary: Fixes T2965, see that task for discussion. This is dumb but seems like our best bet.

Test Plan:

  • Installed newish version of Git.
  • Set HOME on the websever to /var/root (or any other unreadable directory).
  • Hit the error described in T2965 when viewing Diffusion.
  • Applied this patch.
  • Diffusion works.

Reviewers: btrahan, joel

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T2965

Differential Revision: https://secure.phabricator.com/D5994

Details

Provenance
epriestleyAuthored on May 21 2013, 9:14 PM
Reviewer
btrahan
Differential Revision
Restricted Differential Revision
Parents
rP88fec4908b19: Diffusion - double check these sub objects exist before toDictionary'ing them
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task

Event Timeline

Somewhat orthogonal. Was looking at github just now... To fix

https://github.com/facebook/phabricator/issues/295

Could we start specifying LANG ? Otherwise, we'd need to detect LANG and be able to change all the regex based on LANG, which seems really hard. Or maybe there's a way to specify each git command such that no regex is needed?

I actually poked at that during this diff -- I couldn't get LANG to do anything, so I didn't want to add it. I googled for this a bunch but couldn't figure it out, and LANG doesn't do anything on multiple machines I tested on.

If you can repro LANG actually doing something, the LANG=en_US.utf8 or whatever next to HOME is likely correct here.

In this case, I don't know of a non-regexp way to get the information.