Home Home > GIT Browse > scripts
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@suse.com>2019-08-30 16:00:54 +0900
committerBenjamin Poirier <bpoirier@suse.com>2019-08-30 16:07:24 +0900
commit1eef4e745aaaf96c5cb2e00d75b9e2d4a9dd090b (patch)
tree7b33b82eedf1c6103ea4c678b5ec47d443ee6924
parent398394fe5ff169dc9b36c637d21460d5c91bd048 (diff)
git-sort: merge_tool: Catch parsing errors of patches from remote branch
Avoids unsightly python backtraces for problems such as a Git-commit id which is not in LINUX_GIT. Reported-by: Michal Hocko <mhocko@suse.com>
-rwxr-xr-xscripts/git_sort/merge_tool.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/git_sort/merge_tool.py b/scripts/git_sort/merge_tool.py
index 60433fcbba..933fe3d204 100755
--- a/scripts/git_sort/merge_tool.py
+++ b/scripts/git_sort/merge_tool.py
@@ -94,13 +94,13 @@ if __name__ == "__main__":
inside = [line for line in local[1] if not line.strip() in filter_set]
try:
input_entries = lib.parse_inside(index, inside, False)
+ for name in added - local[3] | moved:
+ entry = lib.InputEntry("\t%s\n" % (name,))
+ entry.from_patch(index, name, lib.git_sort.oot, True)
+ input_entries.append(entry)
except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
- for name in added - local[3] | moved:
- entry = lib.InputEntry("\t%s\n" % (name,))
- entry.from_patch(index, name, lib.git_sort.oot, True)
- input_entries.append(entry)
try:
sorted_entries = lib.series_sort(index, input_entries)