Untitled
unknown
plain_text
a year ago
1.3 kB
6
Indexable
diff --git "a/D:\\Gleb\\chromiumembedded-cef-f061c231e6a9\\chromiumembedded-cef-f061c231e6a9\\tools\\git_util.py" "b/C:\\Users\\clarityad\\Desktop\\Gleb\\patches\\cef\\tools\\git_util.py"
index b6aa0fa..8f95203 100644
--- "a/D:\\Gleb\\chromiumembedded-cef-f061c231e6a9\\chromiumembedded-cef-f061c231e6a9\\tools\\git_util.py"
+++ "b/C:\\Users\\clarityad\\Desktop\\Gleb\\patches\\cef\\tools\\git_util.py"
@@ -89,10 +89,15 @@ def git_apply_patch_file(patch_path, patch_dir):
# whitespace errors with git apply.
patch_string = patch_string.replace('\r\n', '\n')
- # Git apply fails silently if not run relative to a respository root.
- if not is_checkout(patch_dir):
- sys.stdout.write('... patch directory is not a repository root.\n')
- return 'fail'
+ # Do not assume we are always working with a repository
+ if os.environ.get('CEF_GIT_ASSUME_HASH') is None:
+ assert os.environ.get('CEF_GIT_ASSUME_COMMIT_NUMBER') is None
+ # Git apply fails silently if not run relative to a respository root.
+ if not is_checkout(patch_dir):
+ sys.stdout.write('... patch directory is not a repository root.\n')
+ return 'fail'
+ else:
+ assert os.environ.get('CEF_GIT_ASSUME_HASH') is not None
# Output patch contents.
cmd = '%s apply -p0 --numstat' % git_exe
Editor is loading...
Leave a Comment