Skip to content

Instantly share code, notes, and snippets.

@jamesob
Created June 28, 2019 17:32
Show Gist options
  • Save jamesob/fea5597b189e899154e1e9a9bdca0d94 to your computer and use it in GitHub Desktop.
Save jamesob/fea5597b189e899154e1e9a9bdca0d94 to your computer and use it in GitHub Desktop.
$ interdiff pr/mergeset.9 pr/mergeset.10
Interdiff between pr/mergeset.9 and pr/mergeset.10
diff <(git diff --no-color pr/mergeset.9~3..pr/mergeset.9) <(git diff --no-color pr/mergeset.10~3..pr/mergeset.10)
513c513
< index fca29a9f31..8aca1a7168 100644
---
> index 87ff6e62ba..bf61808235 100644
872c872
< @@ -844,13 +735,14 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, const std::string& file
---
> @@ -838,13 +729,14 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, const std::string& file
891c891
< @@ -870,7 +762,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
---
> @@ -864,7 +756,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
900c900
< @@ -887,25 +779,31 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
---
> @@ -881,25 +773,31 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
946c946
< @@ -921,15 +819,14 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
---
> @@ -915,15 +813,14 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
966c966
< @@ -949,9 +846,13 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
---
> @@ -943,9 +840,13 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
984c984
< index 1a83cb67b1..ffecf56cdf 100644
---
> index 15d7b1b402..c1e8496170 100644
987,988c987,988
< @@ -23,6 +23,7 @@
< #include <util/threadnames.h>
---
> @@ -22,6 +22,7 @@
> #include <sync.h>
991a992
> #include <util/threadnames.h>
994,995c995
< #include <atomic>
< @@ -151,8 +152,7 @@ protected:
---
> @@ -150,8 +151,7 @@ protected:
# Show the interdiff between tags $1 and $2
interdiff() {
BASE_IDX_1=0
while [ $(git cat-file -p ${1}~${BASE_IDX_1} | grep ^parent | wc -l) -lt 2 ]; do
BASE_IDX_1=$((BASE_IDX_1 + 1))
done
BASE_IDX_2=0
while [ $(git cat-file -p ${2}~${BASE_IDX_2} | grep ^parent | wc -l) -lt 2 ]; do
BASE_IDX_2=$((BASE_IDX_2 + 1))
done
echo "Interdiff between ${1} and ${2}"
echo "diff <(git diff --no-color ${1}~${BASE_IDX_1}..${1}) <(git diff --no-color ${2}~${BASE_IDX_2}..${2})"
diff \
<(git diff --no-color ${1}~${BASE_IDX_1}..${1}) <(git diff --no-color ${2}~${BASE_IDX_2}..${2})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment