All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: git@vger.kernel.org
Subject: PostScript files: textconv and "git add -p"
Date: Tue, 04 Jan 2011 16:50:44 +0100	[thread overview]
Message-ID: <vpqy670brcb.fsf@bauges.imag.fr> (raw)

Hi (and happy new year everybody !),

I have trouble setting up a comfortable configuration to version
PostScript files. The particularity they have is that they are "text
files" (i.e. git does not detect them as binary files by default, and
neither do tools like less, diff, ...), but not meant to be
human-readable.

If I do this:

,----[ .gitattributes ]
| *.ps diff=ps
`----

,----[ .gitconfig ]
| [diff "ps"]
|       textconv=ps2ascii
`----

then I get the textconv niceness when running "git diff", which is
cool, but "git add -p" still proposes me to stage hunks one by one,
which isn't.

If I set "*.ps binary" in .gitattributes, "git add -p" becomes quiet,
but textconv is disabled.

I want "git diff" to run the textconv filter, and "git add -p" to
consider the file as binary. Is there a way to do this?

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

             reply	other threads:[~2011-01-04 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 15:50 Matthieu Moy [this message]
2011-01-05  5:18 ` PostScript files: textconv and "git add -p" Jeff King
2011-01-09 18:55   ` Matthieu Moy
2011-01-09 20:10     ` [PATCH] docs: explain diff.*.binary option Jeff King
2011-01-09 20:31       ` Matthieu Moy
2011-01-10 17:59       ` Junio C Hamano
2011-01-11  6:11         ` 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=vpqy670brcb.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --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 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.