Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Be more careful with objects directory permissions on clone

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:34

Mark Hills [off-list ref] writes:
quoted hunk
diff --git a/git-clone.sh b/git-clone.sh
index 8c7fc7f..9d88d1c 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -334,7 +334,10 @@ yes)
 			fi
 		fi &&
 		cd "$repo" &&
-		find objects -depth -print | cpio $cpio_quiet_flag -pumd$l "$GIT_DIR/" || \
+		# Create dirs using umask and permissions and destination
+		find objects -type d -print | (cd "$GIT_DIR" && xargs mkdir -p) &&
+		# Copy existing 0444 permissions on content
+		find objects ! -type d -print | cpio $cpio_quiet_flag -pumd$l "$GIT_DIR/" || \
 			exit 1
Looks much better.  Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help