aosp-merger: Run git diff with --no-ext-diff
* In case one is using an external diff program such as difftastic, this won't work as expected * thread 'main' panicked at 'Hunk lines should be present in matched lines', /home/$USER/.cargo/registry/src/github.com-1ecc6299db9ec823/difftastic-0.37.0/src/display/hunks.rs:637:31 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace fatal: external diff died, stopping at core/Makefile Change-Id: Ie455016fa24b6e00ea021088cc5fc1e4bca3bf94
This commit is contained in:
@@ -80,7 +80,7 @@ chmod +x .git/hooks/prepare-commit-msg
|
|||||||
|
|
||||||
if [ ! -z "${OLDTAG}" ]; then
|
if [ ! -z "${OLDTAG}" ]; then
|
||||||
# Was there any change upstream? Skip if not.
|
# Was there any change upstream? Skip if not.
|
||||||
if [[ -z "$(git diff ${OLDTAG} ${NEWTAG})" ]]; then
|
if [[ -z "$(git diff --no-ext-diff ${OLDTAG} ${NEWTAG})" ]]; then
|
||||||
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
||||||
repo abandon "${STAGINGBRANCH}" .
|
repo abandon "${STAGINGBRANCH}" .
|
||||||
exit 0
|
exit 0
|
||||||
@@ -102,7 +102,7 @@ if [[ "${OPERATION}" == "merge" ]]; then
|
|||||||
|
|
||||||
# Check if we've actually changed anything after the merge
|
# Check if we've actually changed anything after the merge
|
||||||
# If we haven't, just abandon the branch
|
# If we haven't, just abandon the branch
|
||||||
if [[ -z "$(git diff HEAD m/${os_branch})" && -z "$(git status --porcelain)" ]]; then
|
if [[ -z "$(git diff --no-ext-diff HEAD m/${os_branch})" && -z "$(git status --porcelain)" ]]; then
|
||||||
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
||||||
repo abandon "${STAGINGBRANCH}" .
|
repo abandon "${STAGINGBRANCH}" .
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ chmod +x .git/hooks/prepare-commit-msg
|
|||||||
|
|
||||||
if [ ! -z "${OLDTAG}" ]; then
|
if [ ! -z "${OLDTAG}" ]; then
|
||||||
# Was there any change upstream? Skip if not.
|
# Was there any change upstream? Skip if not.
|
||||||
if [[ -z "$(git diff ${OLDTAG} ${NEWTAG})" ]]; then
|
if [[ -z "$(git diff --no-ext-diff ${OLDTAG} ${NEWTAG})" ]]; then
|
||||||
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
||||||
repo abandon "${STAGINGBRANCH}" .
|
repo abandon "${STAGINGBRANCH}" .
|
||||||
exit 0
|
exit 0
|
||||||
@@ -101,7 +101,7 @@ CONFLICT=""
|
|||||||
echo "#### Merging ${NEWTAG} into ${PROJECTPATH} ####"
|
echo "#### Merging ${NEWTAG} into ${PROJECTPATH} ####"
|
||||||
git merge --no-commit --log "${NEWTAG}"
|
git merge --no-commit --log "${NEWTAG}"
|
||||||
|
|
||||||
if [[ -z "$(git diff HEAD)" ]]; then
|
if [[ -z "$(git diff --no-ext-diff HEAD)" ]]; then
|
||||||
echo "#### Skipping empty merge ####"
|
echo "#### Skipping empty merge ####"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
else
|
else
|
||||||
@@ -119,7 +119,7 @@ for subtree in `find -mindepth 2 -type f -name .gitupstream | cut -d / -f 2- | s
|
|||||||
git fetch -q --force --tags "$(cat ${gitupstream})" "${NEWTAG}"
|
git fetch -q --force --tags "$(cat ${gitupstream})" "${NEWTAG}"
|
||||||
git merge -X subtree="$subtree" --no-commit --log "${NEWTAG}"
|
git merge -X subtree="$subtree" --no-commit --log "${NEWTAG}"
|
||||||
|
|
||||||
if [[ -z "$(git diff HEAD)" ]]; then
|
if [[ -z "$(git diff --no-ext-diff HEAD)" ]]; then
|
||||||
echo "#### Skipping empty merge on ${subtree} ####"
|
echo "#### Skipping empty merge on ${subtree} ####"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
continue
|
continue
|
||||||
@@ -138,7 +138,7 @@ done
|
|||||||
|
|
||||||
# Check if we've actually changed anything after the merge
|
# Check if we've actually changed anything after the merge
|
||||||
# If we haven't, just abandon the branch
|
# If we haven't, just abandon the branch
|
||||||
if [[ -z "$(git diff HEAD m/${os_branch})" && -z "$(git status --porcelain)" ]]; then
|
if [[ -z "$(git diff --no-ext-diff HEAD m/${os_branch})" && -z "$(git status --porcelain)" ]]; then
|
||||||
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
echo -e "nochange\t\t${PROJECTPATH}" | tee -a "${MERGEDREPOS}"
|
||||||
repo abandon "${STAGINGBRANCH}" .
|
repo abandon "${STAGINGBRANCH}" .
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user