chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Optimise the merge operation
[stgit]
/
stgit
/
commands
/
common.py
diff --git
a/stgit/commands/common.py
b/stgit/commands/common.py
index 293bd2e21f84641212634baff589da422d77d236..86f62fb032f41e1ef5527536a29a41f786a05e2b 100644
(file)
--- a/
stgit/commands/common.py
+++ b/
stgit/commands/common.py
@@
-31,7
+31,7
@@
class CmdException(Exception):
# Utility functions
# Utility functions
-def git_id(string):
+def git_id(string
, strict = False
):
"""Return the GIT id
"""
if not string:
"""Return the GIT id
"""
if not string:
@@
-53,6
+53,10
@@
def git_id(string):
id_file = os.path.join(path, git_id)
if os.path.isfile(id_file):
return read_string(id_file)
id_file = os.path.join(path, git_id)
if os.path.isfile(id_file):
return read_string(id_file)
+
+ # maybe GIT knows more about this id
+ if not strict:
+ return git_id
elif len(string_list) == 2:
patch_name = string_list[0]
if patch_name == '':
elif len(string_list) == 2:
patch_name = string_list[0]
if patch_name == '':
@@
-96,7
+100,7
@@
def print_crt_patch():
print 'No patches applied'
def resolved(filename):
print 'No patches applied'
def resolved(filename):
- git.update_cache([filename])
+ git.update_cache([filename]
, force = True
)
for ext in ['.local', '.older', '.remote']:
fn = filename + ext
if os.path.isfile(fn):
for ext in ['.local', '.older', '.remote']:
fn = filename + ext
if os.path.isfile(fn):