-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update import merge tool #271
Conversation
@mernst Any clue why the merge tool is crashing in the CI/CD pipeline? |
8b242d4
to
77f7028
Compare
@mernst The number of incorrect merges is double the previous amount. |
OK, I will investigate. |
9053e13
to
25ba568
Compare
f302562
to
b91f693
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overall looks good, but I have a couple of concerns; please see comments.
retVal=$? | ||
|
||
# report conflicts | ||
if [ "$retVal" -ne 0 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any tool that involves "imports" needs to run regardless of the return value of git merge
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mernst Is it fine in the current version where I just always call it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The default version runs annotations, imports, and version-numbers.
(Defaults are listed at https://github.com/plume-lib/merging/#features .)
# Check if there are still conflicts | ||
diffs=$(git diff --name-only --diff-filter=U) | ||
if [ -z "$diffs" ]; then | ||
git commit -m "Resolved conflicts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible that there was already a merge commit created by git merge
. In that case, this should probably amend the merge commit (or maybe create a new, additional commit).
It may be necessary to run git add
, or add a .
argument to git commit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thanks!
@@ -0,0 +1,50 @@ | |||
#!/usr/bin/env sh | |||
|
|||
# usage: ./gitmerge_ort_imports_ignorespace.sh <clone_dir> <branch-1> <branch-2> <git_strategy> <merge_strategy> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong usage message, it refers to gitmerge_ort_imports_ignorespace.sh
.
|
||
echo "git_merge_plumelib: Merging $branch1 and $branch2 with git_strategy=$git_strategy and merge_strategy=$merge_strategy" | ||
|
||
# shellcheck disable=SC2153 # "JAVA17_HOME is not a misspelling of "JAVA_HOME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing "
after JAVA17_HOME
.
fc54c17
to
03f8e15
Compare
4673058
to
c6dd35b
Compare
No description provided.