X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/1e78b00609d4d284f6316a328aa9b25c1cf2a254..170f576bb9eac1dafc139de7b51226d78d31cbbe:/stgit/gitmergeonefile.py diff --git a/stgit/gitmergeonefile.py b/stgit/gitmergeonefile.py index 3b3175b..c603ff8 100644 --- a/stgit/gitmergeonefile.py +++ b/stgit/gitmergeonefile.py @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ import sys, os +from stgit import basedir from stgit.config import config from stgit.utils import append_string @@ -87,21 +88,10 @@ def __remove_files(orig_hash, file1_hash, file2_hash): os.remove(src2) pass -# GIT_DIR value cached -__base_dir = None - def __conflict(path): """Write the conflict file for the 'path' variable and exit """ - global __base_dir - - if not __base_dir: - if 'GIT_DIR' in os.environ: - __base_dir = os.environ['GIT_DIR'] - else: - __base_dir = __output('git-rev-parse --git-dir') - - append_string(os.path.join(__base_dir, 'conflicts'), path) + append_string(os.path.join(basedir.get(), 'conflicts'), path) #