~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gitmergeonefile.py should use git.get_base_dir()
[stgit]
/
gitmergeonefile.py
diff --git
a/gitmergeonefile.py
b/gitmergeonefile.py
index
2f327a3
..
99882c8
100755
(executable)
--- a/
gitmergeonefile.py
+++ b/
gitmergeonefile.py
@@
-35,6
+35,7
@@
if bin == 'bin' and prefix != sys.prefix:
from stgit.config import config
from stgit.utils import append_string
from stgit.config import config
from stgit.utils import append_string
+from stgit.git import get_base_dir
#
#
@@
-53,15
+54,6
@@
else:
#
#
-# Global variables
-#
-if 'GIT_DIR' in os.environ:
- base_dir = os.environ['GIT_DIR']
-else:
- base_dir = '.git'
-
-
-#
# Utility functions
#
def __str2none(x):
# Utility functions
#
def __str2none(x):
@@
-113,7
+105,7
@@
def __remove_files():
def __conflict():
"""Write the conflict file for the 'path' variable and exit
"""
def __conflict():
"""Write the conflict file for the 'path' variable and exit
"""
- append_string(os.path.join(
base_dir
, 'conflicts'), path)
+ append_string(os.path.join(
get_base_dir()
, 'conflicts'), path)
sys.exit(1)
sys.exit(1)