#466912 git-buildpackage: allow to pass options to git-archive (such as --exclude=.gitignore)

#466912#5
Date:
2008-02-21 19:37:49 UTC
From:
To:
really sorry for me bugging your again... I hope that this one is not
bogus

git-archive takes care about excluding .git/ from the archive while
generating .orig.tar.gz, but some times some other files better be
excluded (like .gitignore). I understand that I could file a bugreport
against git-archive but I think it is better to allow to add additional
arguments to git-archive call (which later serve as args to tar call
which is used as a back end)

Thank you in advance!

#466912#10
Date:
2008-02-22 17:17:33 UTC
From:
To:
Sounds reasonable. Care to send in a patch?
 -- Guido

#466912#15
Date:
2008-02-22 17:34:31 UTC
From:
To:
might take me a while (too many things spin around) but ok...
#466912#22
Date:
2008-09-26 11:17:51 UTC
From:
To:
git 1.6.0 has such a feature. You can use .gitattributes for that. Just add it
to your git project directory:

cat << EOF > .gitattributes
.gitignore      export-ignore
.gitattributes  export-ignore
EOF

#466912#27
Date:
2009-07-20 19:01:22 UTC
From:
To:
user pkg-fso-maint@lists.alioth.debian.org
usertags 466912 + package-creation
thanks

Hi there!

I would say that this is the wrong way to do that:

- I do not want to specify stuff for each package I maintain with gbp.

- is .gitattributes shipped with `git clone`?  In that case, well, I do
  not want to modify upstream files...

- what is the rationale to include .git* files in the .orig.tar.gz?  I
  cannot find any, thus I expect the tool to create the archive does not
  take them into the account.  Think about `dpkg-source -i` WRT CVS
  folder, for example.

However, it seems that .gitattributes is the only way to specify files
to be excluded from `git archive`: really, why the latter does not have
any option to tar/zip?  :-(

BTW, the problem exists for .mailmap as well...

Thx, bye,
Gismo / Luca

#466912#32
Date:
2009-07-20 19:24:06 UTC
From:
To:
Hm, maybe other people also want to build your package (backport for example).
If they don't have that information then they will end up with a different
package (even if it looks quite trivial at the moment).
Yes, that is why it was added to export-ignore in my example. And yes, it
isn't nice to change upstream files in this way. This is a good reason to
introduce a feature for that to gbp.
Don't understand what you mean. `git archive --format=tar` and `git archive --
format=zip`

#466912#37
Date:
2011-08-17 22:53:01 UTC
From:
To:
Hi Robert.

I think what Luca meant was something like:

$ git archive --format=tar \
    --archiver-options "--exclude-vcs --exclude=foo"

That is, giving options to tar.  If that's not what was meant, that's
something I'd like to see.

Greetings.

#466912#42
Date:
2011-08-17 23:00:25 UTC
From:
To:
On the other hand, as stated on:

http://comments.gmane.org/gmane.comp.version-control.git/177092

It seems that this is impossible, since the tar command is not called.

Greetings.