Re: git-archive --worktree-attributes (1.8.2)

2013-04-09 Thread Junio C Hamano
Amit Bakshi  writes:

> Hi,
>
>  In the help for git-archive it states:
>
>--worktree-attributes
>Look for attributes in .gitattributes in working directory too.
> ...

The worktree-attributes should read from the worktree.  It should
not pay any attention to where you are in the directory hierarchy,
i.e. your current working directory (aka $cwd).

> Would you accept a patch that either adds an option to explicitly set
> the .gitattributes file or would let --worktree-attributes look in
> $PWD.

The former, possibly, if accompanied with a good justification and
implemented cleanly.

The latter, definitely not.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


git-archive --worktree-attributes (1.8.2)

2013-04-09 Thread Amit Bakshi
Hi,

 In the help for git-archive it states:

   --worktree-attributes
   Look for attributes in .gitattributes in working directory too.

This doesn't seem to be the case. I have a use case where I need to
archive a remote I don't have write access too (via --remote=), and I
wish to ignore certain paths. When I chdir to a temp dir, create a
.gitattributes file, and call git archive --worktree-attributes, the
bevaviour I see is that it is ignoring .gitattributes. I've tried
setting GIT_WORK_TREE to my temp dir, without success. Is the
documentation wrong about 'working directory'? Did it mean to say
'working tree'? Looking at the source for archive.c, it seems to
assume a GIT_WORK_TREE.


Would you accept a patch that either adds an option to explicitly set
the .gitattributes file or would let --worktree-attributes look in
$PWD.

Thanks,
Amit
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html