except (IOError, shell.CallError): # hack
continue
if theirs_nl != ours_nl:
- if ours_nl == None:
+ if ours_nl is None:
logging.debug("File had no newlines, ignoring newline style")
else:
logging.info("Converting our file (3) from %s to %s newlines", repr(ours_nl), repr(theirs_nl))
prepare_config() # for Wizard, this usually genericizes config files
ours_tree = shell.eval("git", "write-tree")
logging.info("Merge wrote virtual tree for ours: %s", ours_tree)
- # operations on the common tree
+ # operations on the common tree (pretty duplicate with the above)
shell.call("git", "reset", "--hard", common_id)
for file in git_diff_text(common_id, theirs_id):
try:
except (IOError, shell.CallError): # hack
continue
if theirs_nl != common_nl:
- logging.info("Converting common file (1) from %s to %s newlines", repr(common_nl), repr(theirs_nl))
- convert_newline(file, theirs_nl)
- shell.eval("git", "add", file)
+ if common_nl is None:
+ logging.debug("File had no newlines, ignoring newline style")
+ else:
+ logging.info("Converting common file (1) from %s to %s newlines", repr(common_nl), repr(theirs_nl))
+ convert_newline(file, theirs_nl)
+ shell.eval("git", "add", file)
common_tree = shell.eval("git", "write-tree")
logging.info("Merge wrote virtual tree for common: %s", common_tree)
# construct merge commit graph