Git development
 help / color / mirror / Atom feed
* [PATCH] Make git-mv work in subdirectories, too
@ 2005-11-25 11:36 Johannes Schindelin
  2005-11-26  2:45 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2005-11-25 11:36 UTC (permalink / raw)
  To: git, junkio


Turns out, all git programs git-mv uses are capable of operating in
a subdirectory just fine. So don't complain about it.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

	I am no Perl guru, so this might not be the best way to go
	about it. Also, if people agree, I would like to remove the
	extra check for GIT_DIR validity, since git-rev-parse --git-dir
	does that already.

 git-mv.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

applies-to: 6b942d45a420cf8f4064f77713d9b218e7fa53cb
fa750ba9ea3a27b39c8931b18cf0e60a89bf9fd7
diff --git a/git-mv.perl b/git-mv.perl
index bf54c38..bb61add 100755
--- a/git-mv.perl
+++ b/git-mv.perl
@@ -34,7 +34,8 @@ EOT
 }
 
 # Sanity checks:
-my $GIT_DIR = $ENV{'GIT_DIR'} || ".git";
+my $GIT_DIR = `git-rev-parse --git-dir`;
+$GIT_DIR =~ s/\n$//;
 
 unless ( -d $GIT_DIR && -d $GIT_DIR . "/objects" && 
 	-d $GIT_DIR . "/objects/" && -d $GIT_DIR . "/refs") {
---
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-30 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-25 11:36 [PATCH] Make git-mv work in subdirectories, too Johannes Schindelin
2005-11-26  2:45 ` Junio C Hamano
2005-11-29 22:10   ` Alex Riesen
2005-11-30 14:50     ` Josef Weidendorfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox