]> git.ipfire.org Git - thirdparty/mkosi.git/commit
rework copy_git_files() to use a git clone 123/head
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 18 Jul 2017 20:25:22 +0000 (13:25 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 20 Jul 2017 14:28:37 +0000 (07:28 -0700)
commit0c8d7d5a7c126c520a76de3f72d12a99fd489a1c
tree0302ffa7544f5b9bddd6a683f6d21c3b092e3f23
parent605e501a7be993eb61819c8d7ef6f5394dca1eee
rework copy_git_files() to use a git clone

Using a git clone allows to solve some problems:
    - It allows to copy git submodules without having to fallback to
      --use-git-files=no since git-ls-files doesn't recurse submodules
    - It allows build systems that rely on git describe or similar to
      tag the build: this is more important when projects use
      git modules and they want to tag the git revision of each
      submodule.
    - It uses less disk space when using output as directory since
      when passing a local directory git will use hard links

Some additional handling for files that were modified (or added with
git -A) was put in place to allow tests to be performed before
committing.

In addition the call to git ls-files was fixed in the following cases:
    - When mkosi is called with -C option: it was calling ls-files inside
      the caller directory, not inside the src dir.
    - When mkosi is called with --git-files=others and .gitignore
      doesn't contain an entry for '.mkosi-*': it would try to copy the
      temporary directory we created and fail
mkosi