git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-archive: ignore prefix when checking file attribute

From
USUlrik Sverdrup <ulrik.sverdrup@gmail.com>
Date
Apr 9, 2008, 22:58 UTC
Message-ID
<a1b6cb1b0804091558r42b365cbjf216b3a5167588cf@mail.gmail.com>
In-Reply-To
<47FD31C3.8070001@lsrfire.ath.cx>
2008/4/9, René Scharfe <rene.scharfe@lsrfire.ath.cx>:
Show 15 quoted lines
> Ulrik Sverdrup noticed that git-archive doesn't correctly apply the attribute
>  export-subst when the option --prefix is given, too.
>
>  When it checked if a file has the attribute turned on, git-archive would try
>  to look up the full path -- including the prefix -- in .gitattributes.  That's
>  wrong, as the prefix doesn't need to have any relation to any existing
>  directories, tracked or not.
>
>  This patch makes git-archive ignore the prefix when looking up if value of the
>  attribute export-subst for a file.
>
>  Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
>  ---
>  Ulrik, does this patch fix the problem for you?  It applies to v1.5.4.4 and
>  v1.5.5 equally.
Thanks for the patch René!

First I reproduced my problem on vanilla git v1.5.5, and it is still there as in v.1.5.4.4. I applied this patch and that fixed my issue, testing both tar and zip.

Ulrik Sverdrup
Previous: René ScharfeNext: Junio C Hamano
Message 3 of 4 in “Bug: git archive not doing export-subst when using --prefix= option”
  1. Ulrik SverdrupApr 8, 2008
  2. git-archive: ignore prefix when checking file attributeRené Scharfe, Apr 9, 2008
  3. Ulrik SverdrupApr 9, 2008
  4. Junio C HamanoApr 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.