Closed ericcurtin closed 3 years ago
Never mind, I wrote a script to do it:
#!/bin/bash
git fetch > /dev/null 2>&1 &
ls_files=$(git diff --name-only --diff-filter=U)
np=$(nproc)
if [ -z "$ls_files" ]; then
echo "No conflicts here!"
exit 0
fi
task() {
for i in $(git blame $i | awk '/<<<</,/>>>>/' | awk '{print $1}' | grep -v 0000 | sort | uniq); do
if [ $(git branch -r --contains $i | grep -c "$1$\|$2$") -lt 2 ]; then
git log --no-walk --pretty=format:"%h%x09%an%x09%ad%x09%s" $i | cut -c 1-80
fi
done
}
for i in $(echo $ls_files); do
# Max 16 processes at any given time
while [ $(jobs -r -p | wc -l) -gt $np ]; do
sleep 1
done
task $1 $2&
done
wait
Sorry for bothering you, you have to pass in the two branches to this
I would like to use imerge (or git) just to identify the list of conflicting commits (excluding any common ancestors of course) without actually performing any merging. Is this possible with imerge?