view move-if-change @ 109261:5f75bdff36e4

Fix vc-annotate for renamed files when using Git. * lisp/vc-git.el (vc-git-find-revision): Deal with empty results from ls-files. Doe not pass the object as a file name to cat-file, it is not a file name. (vc-git-annotate-command): Pass the file name using -- to avoid ambiguity with the revision. (vc-git-previous-revision): Pass a relative file name.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 22 Jun 2010 12:25:17 -0700
parents 354e0c45cedf
children 14a97ab281d5
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi