Staging
v0.5.2
https://github.com/git/git
Revision c63777c0d7687a1edff2c0da307ad8ac1d75c8f6 authored by Junio C Hamano on 06 May 2007, 04:18:57 UTC, committed by Junio C Hamano on 06 May 2007, 05:40:27 UTC
When you do this, existing "blame -C -C" would not find that the
latter half of the file2 came from the existing file1:

	... both file1 and file2 are tracked ...
	$ cat file1 >>file2
	$ git add file1 file2
	$ git commit

This is because we avoid the expensive find-copies-harder code
that makes unchanged file (in this case, file1) as a candidate
for copy & paste source when annotating an existing file
(file2).  The third -C now allows it.  However, this obviously
makes the process very expensive.  We've actually seen this
patch before, but I dismissed it because it covers such a narrow
(and arguably stupid) corner case.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent dd166aa
Raw File
Tip revision: c63777c0d7687a1edff2c0da307ad8ac1d75c8f6 authored by Junio C Hamano on 06 May 2007, 04:18:57 UTC
blame: -C -C -C
Tip revision: c63777c
git-verify-tag.sh
#!/bin/sh

USAGE='<tag>'
SUBDIRECTORY_OK='Yes'
. git-sh-setup

verbose=
while case $# in 0) break;; esac
do
	case "$1" in
	-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
		verbose=t ;;
	*)
		break ;;
	esac
	shift
done

if [ "$#" != "1" ]
then
	usage
fi

type="$(git-cat-file -t "$1" 2>/dev/null)" ||
	die "$1: no such object."

test "$type" = tag ||
	die "$1: cannot verify a non-tag object of type $type."

case "$verbose" in
t)
	git-cat-file -p "$1" |
	sed -n -e '/^-----BEGIN PGP SIGNATURE-----/q' -e p
	;;
esac

trap 'rm -f "$GIT_DIR/.tmp-vtag"' 0

git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1

cat "$GIT_DIR/.tmp-vtag" |
sed '/-----BEGIN PGP/Q' |
gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1
rm -f "$GIT_DIR/.tmp-vtag"

back to top