mirror of
https://github.com/git/git.git
synced 2024-11-06 17:23:00 +01:00
8 lines
244 B
Text
8 lines
244 B
Text
|
#!/bin/sh
|
||
|
|
||
|
. git-sh-setup-script || die "Not a git archive"
|
||
|
|
||
|
[ -f "$1" ] || [ -h "$1" ] || die "git rename: bad source"
|
||
|
[ -e "$2" ] && die "git rename: destination already exists"
|
||
|
mv -- "$1" "$2" && git-update-cache --add --remove -- "$1" "$2"
|