summaryrefslogtreecommitdiff
path: root/git-rename-script
AgeCommit message (Collapse)AuthorFilesLines
2005-07-27[PATCH] Add support for directories to git-rename-script.Libravatar Ryan Anderson1-5/+68
Oh, and in the process, rewrite it in Perl. Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-23Add a "git rename" to help with - surprise surprise - renamesLibravatar Linus Torvalds1-0/+7
It's stupid. We'd want to rename directories too, but this doesn't do that yet - easy enough to do per se, we just need to carefully list all the pathnames that got moved (and remember to ignore the files that weren't tracked but are in the subdirectory that got moved). Doing the directory case will require a bit more scripting.. Something like oldfiles=($(git-ls-files | grep '^$src')) newfiles=($(git-ls-files | sed ':^$src: s:^$src:$dst:')) mv $src $dst && git-update-cache --add --remove -- "${oldfiles[@]}" "${newfiles[@]}" might do it, except it needs to be done right, and carefully. Methinks perl is probably better at this. Hint hint..