All of lore.kernel.org
 help / color / mirror / Atom feed
* git-archive and unwanted .gitattributes
@ 2008-06-07 15:21 Nguyen Thai Ngoc Duy
  2008-06-07 15:47 ` Jakub Narebski
  2008-06-08 15:16 ` [PATCH] fix attribute handling in bare repositories René Scharfe
  0 siblings, 2 replies; 8+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2008-06-07 15:21 UTC (permalink / raw)
  To: Git Mailing List

Hi,

Currently attr.c will read .gitattributes on disk no matter there is a
real worktree or not. This can lead to strange behavior. For example
when I do

mkdir a && cd a
git init
echo '$Format:%s$' > a
git add a && git commit -m initial
cd ..
echo 'a export-subst' > .gitattributes # let's assume this is an accident.
git --git-dir=a/.git archive --format=tar HEAD|tar xO a

I expect it to show '$Format:%s$', not "initial". git-archive should
not bother reading that .gitattributes. I thought an
is_inside_work_tree() check would be enough. Unfortunately, setting
--git-dir will automatically set worktree too. Any ideas?
-- 
Duy

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-06-09  4:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-07 15:21 git-archive and unwanted .gitattributes Nguyen Thai Ngoc Duy
2008-06-07 15:47 ` Jakub Narebski
2008-06-07 16:19   ` Nguyen Thai Ngoc Duy
2008-06-08 15:24   ` René Scharfe
2008-06-08 15:16 ` [PATCH] fix attribute handling in bare repositories René Scharfe
2008-06-08 20:46   ` Junio C Hamano
2008-06-08 21:31     ` René Scharfe
2008-06-09  4:24     ` Nguyen Thai Ngoc Duy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.