[oe-commits] [openembedded-core] 14/20: combo-layer: handle empty commits during "init --history"
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 29 17:39:40 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit bdbd545b94cc41d0dff273a069e93b4e0d96a0e8
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Mon Feb 29 12:59:09 2016 +0100
combo-layer: handle empty commits during "init --history"
When importing the components during the "combo-layer init" with full
history and relocation into a destination directory, components with
empty commits were not handled because the "mv" command was invoked
with just one parameter.
Replacing that with a find/xargs pair avoids the problem and should
also fix the handling of filenames with special characters (in
particular spaces).
Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/combo-layer | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/combo-layer b/scripts/combo-layer
index f028098..09a53a2 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -380,7 +380,7 @@ tail -c +18 $tmpname | head -c -4
if not parent:
parent = '.'
# May run outside of the current directory, so do not assume that .git exists.
- filter_branch.extend(['--tree-filter', 'mkdir -p .git/tmptree && mv $(ls -1 -a | grep -v -e ^.git$ -e ^.$ -e ^..$) .git/tmptree && mkdir -p %s && mv .git/tmptree %s' % (parent, dest_dir)])
+ filter_branch.extend(['--tree-filter', 'mkdir -p .git/tmptree && find . -mindepth 1 -maxdepth 1 ! -name .git -print0 | xargs -0 -I SOURCE mv SOURCE .git/tmptree && mkdir -p %s && mv .git/tmptree %s' % (parent, dest_dir)])
filter_branch.append('HEAD')
runcmd(filter_branch)
runcmd('git update-ref -d refs/original/refs/heads/%s' % name)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list