git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Leo Razoumov" <slonik.az@gmail.com>
To: git@vger.kernel.org
Subject: problems with clone and .gitattributes
Date: Mon, 27 Oct 2008 14:46:41 -0400	[thread overview]
Message-ID: <ee2a733e0810271146r5b21213eg989045e4bf42d99a@mail.gmail.com> (raw)

Hi Everyone,
I am using .gitattributes with clean/smudge filters to optimize
storage of OpenOffice binary files (zip compressed). So far it works
fine except for clone operation.
Apparently, "git clone" does not call smudge filter when checking out a branch.
I have to manually remove openoffice files and then do "git co -f" to
re-checkout them  again, this time smudge filter gets applied.

There is a little catch-22 problem here. .gitattributes are stored
in-tree and git clone does not know about these files existence until
it checks the tree out, by that time it is already too late to apply
filters.

Of course, there could be several obvious workarounds:

(1) git clone can redo checkout when it finds files affected by gitattributes

(2) before doing checkout "git clone" inspects tree-object and looks
for .gitattributes files. If found it checks them out first before all
other files. Now it can apply the attributes found as the checkout
process progresses.

IMHO, both workarounds are somewhat clumsy.
Is there anything cleaner that can be done to solve the problem?

--Leo--

             reply	other threads:[~2008-10-27 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 18:46 Leo Razoumov [this message]
2008-10-28  5:50 ` problems with clone and .gitattributes Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee2a733e0810271146r5b21213eg989045e4bf42d99a@mail.gmail.com \
    --to=slonik.az@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).