Skip to contentSkip to conversation

git-svn: doublecheck if really file or dir

PATCH In review Andrej Manduch 1 participant 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-svn: doublecheck if really file or dir

* this fixes 'git svn info pwd' buggy behaviour

---
 git-svn.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
git-svn.perl +1 -1
index 0a32372..c3d893e 100755
@@ -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);
 }
 
Signature · 1 line
2.0.0.GIT
#1 lore raw

I'm sorry, i've made mistake in this one. Please ingnore it. Correct patch is on the way.

kind regards,
b.

Quoted 23 lines · Andrej Manduch

* this fixes 'git svn info pwd' buggy behaviour

---
 git-svn.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
git-svn.perl +1 -2
index 0a32372..c3d893e 100755
@@ -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