tags 704005 + upstream
clone 704005 -1
reassign -1 git 1:1.7.10.4-2
retitle -1 "git hash-object -w /tmp/path" reads /tmp/.gitattributes
quit

Hi Helmut,

Helmut Grohne wrote:

> I noticed that when running git-cvsimport it would invoke git
> hash-object in a way that causes it to read /tmp/.gitattributes.
> Normally this files does not exist, but remember that /tmp is
> world-writeable.
[...]
> The cause is this invocation from git-cvsimport:
>                           exec("git", "hash-object", "-w", $tmpname)
>
> $tmpname refers to a file in /tmp and unless --no-filters is given to
> git hash-object it looks for a .gitattributes in the same directory.
> Possible options:
> 1) Use a temporary directory.
> 2) Pass --no-filters.

Agreed.  Probably it would make sense for hash-object and similar
commands not to pay attention to .gitattributes when operating on
paths outside the git worktree, too.

In the meantime, either of your proposed fixes for cvsimport sounds
good to me.  Care to try it out and send a patch?

Thanks,
Jonathan


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to