summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0c698a)
raw | patch | inline | side by side (parent: b0c698a)
author | Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | |
Sun, 13 Nov 2005 14:08:00 +0000 (15:08 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 14 Nov 2005 08:50:18 +0000 (00:50 -0800) |
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
.gitignore | patch | blob | history | |
Documentation/git-rename.txt | [deleted file] | patch | blob | history |
Documentation/git.txt | patch | blob | history | |
Makefile | patch | blob | history | |
git-rename.perl | [deleted file] | patch | blob | history |
diff --git a/.gitignore b/.gitignore
index 16a8af63f0523cec82faa23f29cee579ac224e82..0dd7b9c7b4ab6f02fc0b73d0c92cd2520bfa032f 100644 (file)
--- a/.gitignore
+++ b/.gitignore
git-rebase
git-receive-pack
git-relink
-git-rename
git-repack
git-request-pull
git-reset
diff --git a/Documentation/git-rename.txt b/Documentation/git-rename.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-git-rename(1)
-=============
-
-NAME
-----
-git-rename - Script used to rename a file, directory or symlink.
-
-
-SYNOPSIS
---------
-'git-rename' <source> <destination>
-
-DESCRIPTION
------------
-This script is used to rename a file, directory or symlink.
-
-The index is updated after successful completion, but the change must still be
-committed.
-
-Author
-------
-Written by Linus Torvalds <torvalds@osdl.org>
-Rewritten by Ryan Anderson <ryan@michonline.com>
-
-Documentation
---------------
-Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
-
-GIT
----
-Part of the gitlink:git[7] suite
-
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 1c32dd5be7156ae0e1142523fe50d84745964793..7045f3f97e1e1219a63f84792c1d68ae5884740d 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
gitlink:git-rebase[1]::
Rebase local commits to new upstream head.
-gitlink:git-rename[1]::
- Rename files and directories.
-
gitlink:git-repack[1]::
Pack unpacked objects in a repository.
diff --git a/Makefile b/Makefile
index eeedf8ceb9627d2bb6ee8188ca9161acae825bf9..63cb99847f00f30e2e3a9e64ef408c9f41e1c03d 100644 (file)
--- a/Makefile
+++ b/Makefile
SCRIPT_PERL = \
git-archimport.perl git-cvsimport.perl git-relink.perl \
- git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \
+ git-shortlog.perl git-fmt-merge-msg.perl \
git-svnimport.perl git-mv.perl git-cvsexportcommit.perl
SCRIPT_PYTHON = \
diff --git a/git-rename.perl b/git-rename.perl
--- a/git-rename.perl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright 2005, Ryan Anderson <ryan@michonline.com>
-#
-# This file is licensed under the GPL v2, or a later version
-# at the discretion of Linus Torvalds.
-
-
-use warnings;
-use strict;
-
-sub usage($);
-
-# Sanity checks:
-my $GIT_DIR = $ENV{'GIT_DIR'} || ".git";
-
-unless ( -d $GIT_DIR && -d $GIT_DIR . "/objects" &&
- -d $GIT_DIR . "/objects/" && -d $GIT_DIR . "/refs") {
- usage("Git repository not found.");
-}
-
-usage("") if scalar @ARGV != 2;
-
-my ($src,$dst) = @ARGV;
-
-unless (-f $src || -l $src || -d $src) {
- usage("git rename: bad source '$src'");
-}
-
-if (-e $dst) {
- usage("git rename: destinations '$dst' already exists");
-}
-
-my (@allfiles,@srcfiles,@dstfiles);
-
-$/ = "\0";
-open(F,"-|","git-ls-files","-z")
- or die "Failed to open pipe from git-ls-files: " . $!;
-
-@allfiles = map { chomp; $_; } <F>;
-close(F);
-
-my $safesrc = quotemeta($src);
-@srcfiles = grep /^$safesrc/, @allfiles;
-@dstfiles = @srcfiles;
-s#^$safesrc(/|$)#$dst$1# for @dstfiles;
-
-rename($src,$dst)
- or die "rename failed: $!";
-
-my $rc = system("git-update-index","--add","--",@dstfiles);
-die "git-update-index failed to add new name with code $?\n" if $rc;
-
-$rc = system("git-update-index","--remove","--",@srcfiles);
-die "git-update-index failed to remove old name with code $?\n" if $rc;
-
-
-sub usage($) {
- my $s = shift;
- print $s, "\n" if (length $s != 0);
- print <<EOT;
-$0 <source> <dest>
-source must exist and be either a file, symlink or directory.
-dest must NOT exist.
-
-Renames source to dest, and updates the git cache to reflect the change.
-Use "git commit" to make record the change permanently.
-EOT
- exit(1);
-}