From afac3d107d7a12e6a6e425a446787d817fd2fe25 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 2 Feb 2016 14:23:24 -0500 Subject: [PATCH 1/3] update-third-party: remove empty directories as well The `git ls-files | xargs rm` removes only files; directories which are empty are left laying around. This later chokes the `mv` which puts the "reduced" directory into place. Remove the empty directories as well. --- Utilities/Scripts/update-third-party.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash index 8925296cb..d4d346c96 100644 --- a/Utilities/Scripts/update-third-party.bash +++ b/Utilities/Scripts/update-third-party.bash @@ -85,6 +85,7 @@ if [ -n "$basehash" ]; then # Clear out the working tree pushd "$extractdir" git ls-files | xargs rm -v + find . -type d -empty -delete popd else # Create a repo to hold this package's history From a35f4be61ff49e39152d63e4a8b56ee820d4c5fe Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 5 Feb 2016 13:37:45 -0500 Subject: [PATCH 2/3] update-third-party: Add license notice Our Git infrastructure scripts use the "Apache License 2.0". --- Utilities/Scripts/update-third-party.bash | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash index d4d346c96..d9736719a 100644 --- a/Utilities/Scripts/update-third-party.bash +++ b/Utilities/Scripts/update-third-party.bash @@ -1,3 +1,19 @@ +#============================================================================= +# Copyright 2015-2016 Kitware, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + ######################################################################## # Script for updating third party packages. # From 97149ff8db660c4cb49b5061157f3d0b34adcacb Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 8 Feb 2016 13:37:01 -0500 Subject: [PATCH 3/3] update-third-party: read attributes from the worktree This should be done so that any attributes for ignoring certain files when exporting can be appended to the file during the extraction step, but ignored in the actual import. Necessary for importing the gitsetup repository. --- Utilities/Scripts/update-third-party.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash index d9736719a..6aeeccd1b 100644 --- a/Utilities/Scripts/update-third-party.bash +++ b/Utilities/Scripts/update-third-party.bash @@ -48,7 +48,7 @@ # Utility functions ######################################################################## git_archive () { - git archive --prefix="$name-reduced/" HEAD -- $paths | \ + git archive --worktree-attributes --prefix="$name-reduced/" HEAD -- $paths | \ tar -C "$extractdir" -x }