All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Dirk Süsserott" <newsletter@dirk.my1.cc>
Cc: Git Mailing List <git@vger.kernel.org>, Junio C Hamano <junio@pobox.com>
Subject: Re: How to prevent Git from compressing certain files?
Date: Wed, 22 Jul 2009 13:46:07 -0700 (PDT)	[thread overview]
Message-ID: <m3r5w8bg69.fsf@localhost.localdomain> (raw)
In-Reply-To: <4A676D4B.7040004@dirk.my1.cc>

Dirk Süsserott <newsletter@dirk.my1.cc> writes:

> I'm (ab)using Git to store my media files, i.e. digicam pictures (*.jpg)
> and the like. This way I can e.g. comment a series of pictures without
> installing and learning a special purpose "Photo Archiving" tool. Gitk
> shows the roadmap!
> 
> Somewhere I read that Git isn't supposed to efficiently handle binary
> files. Of course, I don't want to merge my files, just store them with
> their history and git-push them to some "safe place".
> 
> I figured that pushing and git gc'ing both try to compress those files
> (or differences) really hard. Works great for "regular" files, but is
> pointless with jpegs.
> 
> Question: Is there a way to prevent Git from trying to compress certain
> files based on their extension?

There is _undocumented_ "delta" gitattribute, introduced by Junio C Hamano
in a74db82 (Teach "delta" attribute to pack-objects., 2007-05-19), which
you would have to unset.

Like this:

  == .gitattributes ==
  *.jpg   -delta

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2009-07-22 20:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 19:49 How to prevent Git from compressing certain files? Dirk Süsserott
2009-07-22 20:44 ` Jakub Narebski
2009-07-22 20:46 ` Jakub Narebski [this message]
2009-07-23 10:12 ` Jeff King
2009-07-23 18:51   ` Dirk Süsserott

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=m3r5w8bg69.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junio@pobox.com \
    --cc=newsletter@dirk.my1.cc \
    /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 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.