phpbuildphing

phing untar task ignores .gitignore files


I have a .tar.gz file that I want to extract with the untar task of phing. In the phing docu there is this commans listed:

<untar file="testtar.tar.gz" todir="dest">
  <fileset dir=".">
    <include name="*.tar.gz"/>
    <include name="*.tar"/>
  </fileset>
</untar>

But the resulting folder is not the same then it is in the compressed file.
The untar command compleatly ignores the .gitignore files. But these are also files I want to extract. I want to extract all files that are contained in the compressed file.

Am I missing a parameter or something?
(The forceExtract parameter does nothing.)

Thanks for any help.


Solution

  • According to the docs it has to be like that:

    <untar file="testtar.tar.gz" todir="dest">
      <fileset dir="." defaultexcludes="false">
        <include name="*.tar.gz"/>
        <include name="*.tar"/>
      </fileset>
    </untar>
    

    Docs: https://www.phing.info/docs/guide/trunk/FileSet.html at D.3