3 # This script will check for files that were literal copies in the
4 # parents of the given commits, but are no literal copies currently
5 # (ignoring those files that do no longer exist).
9 # $0 $(git rev-list HEAD -- mingw/bin/gcc.exe)
11 # This would check that literal copies were maintained in all the commits
12 # in the current branch that touched mingw/bin/gcc.exe.
16 # Ignore initial commit
17 git rev-parse
-q --verify $rev^
> /dev
/null ||
continue
19 for f
in $
(git
diff --name-only --diff-filter=RDM
$rev^
!)
21 test -f $f ||
continue
22 sha1
=$
(git rev-parse
$rev^
:$f)
23 matches
="$(git ls-tree -r $rev^ | grep $sha1)"
24 test 1 -lt $
(echo "$matches" |
wc -l) && {
25 for f2
in $
(echo "$matches" |
sed "s/.* //")
27 test -f $f2 ||
continue
28 cmp $f $f2 ||
echo "$f != $f2"