Thread (9 messages) flat view 9 messages, 3 authors, 2016-06-15

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

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:44:34

Jakub Narebski schrieb:
Mark Hills wrote:
quoted
-               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/" || \
By the way, it is important that previous version had -depth, and
proposed one doesn't? Was it about creating directories before files?
-depth means that directory names are listed *after* their content.
Consequently, it was about setting modification times and permissions on
directories *after* all of their content is created at the destination.

The intent of the new version is to not copy permissions of directories;
and since the modification times don't matter, the absence of -depth is ok.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help