git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-svn: doublecheck if really file or dir
@ 2014-07-18  4:20 Andrej Manduch
  2014-07-23 22:04 ` Eric Wong
  0 siblings, 1 reply; 9+ messages in thread
From: Andrej Manduch @ 2014-07-18  4:20 UTC (permalink / raw)
  To: git; +Cc: Andrej Manduch

* this fixes 'git svn info `pwd`' buggy behaviour

Signed-off-by: Andrej Manduch <amanduch@gmail.com>
---
 git-svn.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-svn.perl b/git-svn.perl
index 0a32372..5bbfecf 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2029,7 +2029,7 @@ sub find_file_type_and_diff_status {
 	my $mode = (split(' ', $ls_tree))[0] || "";
 
 	return ("link", $diff_status) if $mode eq "120000";
-	return ("dir", $diff_status) if $mode eq "040000";
+	return ("dir", $diff_status) if $mode eq "040000" or -d $path;
 	return ("file", $diff_status);
 }
 
-- 
2.0.0.GIT

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] git-svn: doublecheck if really file or dir
@ 2014-07-18  4:05 Andrej Manduch
  2014-07-18  4:22 ` Andrej Manduch
  0 siblings, 1 reply; 9+ messages in thread
From: Andrej Manduch @ 2014-07-18  4:05 UTC (permalink / raw)
  To: git; +Cc: Andrej Manduch

* this fixes 'git svn info `pwd`' buggy behaviour

Signed-off-by: Andrej Manduch <amanduch@gmail.com>
---
 git-svn.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-svn.perl b/git-svn.perl
index 0a32372..c3d893e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2029,7 +2029,7 @@ sub find_file_type_and_diff_status {
 	my $mode = (split(' ', $ls_tree))[0] || "";
 
 	return ("link", $diff_status) if $mode eq "120000";
-	return ("dir", $diff_status) if $mode eq "040000";
+	return ("dir", $diff_status) if $mode eq "040000" od -d $path;
 	return ("file", $diff_status);
 }
 
-- 
2.0.0.GIT

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

end of thread, other threads:[~2014-08-04  4:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <53DE31E8.3070405@gmail.com>
2014-08-03 13:12 ` [PATCH] git-svn: doublecheck if really file or dir Andrej Manduch
2014-08-04  4:02   ` Eric Wong
2014-07-18  4:20 Andrej Manduch
2014-07-23 22:04 ` Eric Wong
2014-07-27  2:46   ` Andrej Manduch
2014-08-03  2:45     ` Eric Wong
2014-08-03 12:22       ` Andrej Manduch
  -- strict thread matches above, loose matches on Subject: below --
2014-07-18  4:05 Andrej Manduch
2014-07-18  4:22 ` Andrej Manduch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).