~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Create stgit/basedir.py for determining the .git directory
[stgit]
/
stgit
/
gitmergeonefile.py
diff --git
a/stgit/gitmergeonefile.py
b/stgit/gitmergeonefile.py
index
3b3175b
..
c603ff8
100644
(file)
--- 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
"""
import sys, os
+from stgit import basedir
from stgit.config import config
from stgit.utils import append_string
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
os.remove(src2)
pass
-# GIT_DIR value cached
-__base_dir = None
-
def __conflict(path):
"""Write the conflict file for the 'path' variable and exit
"""
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)
#
#