path: root/Makefile
diff options
authorLinus Torvalds <>2005-07-24 01:52:22 (GMT)
committerLinus Torvalds <>2005-07-24 01:52:22 (GMT)
commit399144f21c1b3bcd4c9dadd4f534118475de840d (patch)
treeb8a2ac7f44f605bb446a2cf67a6604417b83c120 /Makefile
parentfd1fcd9f57406cd5f278adb6b3ceeb1b7637062a (diff)
Add a "git rename" to help with - surprise surprise - renames
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..
Diffstat (limited to 'Makefile')
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f87225d..e92518f 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \
gitk git-cherry git-rebase-script git-relink-script git-repack-script \
git-format-patch-script git-sh-setup-script git-push-script \
git-branch-script git-parse-remote git-verify-tag-script \
- git-ls-remote-script git-clone-dumb-http
+ git-ls-remote-script git-clone-dumb-http git-rename-script
PROG= git-update-cache git-diff-files git-init-db git-write-tree \
git-read-tree git-commit-tree git-cat-file git-fsck-cache \