From: "Caio Marcelo" <cmarcelo@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Binary files in format-patch
Date: Mon, 5 May 2008 19:55:06 -0300 [thread overview]
Message-ID: <d280d7f10805051555x67bd7e87o999a2c9e19663b92@mail.gmail.com> (raw)
Hello,
I'm using "git format-patch" to generate messages for a code review
mailing list. It work fine except when we have binary files involved.
Their contents are not relevant for us, and doesn't help much in a
mailing list. Taking a peek at the code I've found out this:
In commit e47f306d4bf964def1a0b29e8f7cea419471dffd (short name: "git
format-patch: make --binary on by default"), we add a new restriction
on the possible options to format-patch: if you don't specify --text,
it enables --binary. But looking at today's code, we have a path that
is never taken for format-patch, in function builtin_diff (diff.c), at
lines 1423 to 1433. The fprintf doesn't ever happen, because if it's
TEXT, it dumps the contents verbatim, if it's BINARY, it encodes (to
some baseXX) the files/diff.
Wouldn't be nice to allow this code path to happen via some
--omit-binary / --no-binary option to be checked in cmd_format_patch?
(I could provide a patch for this, if you think it's a good idea).
Or should I try to solve my problem by other means (post-processing
the patches, building my own with git-diff)?
Cheers,
Caio Marcelo
next reply other threads:[~2008-05-05 22:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-05 22:55 Caio Marcelo [this message]
2008-05-05 23:01 ` Binary files in format-patch Shawn O. Pearce
2008-05-05 23:10 ` Caio Marcelo
2008-05-06 9:19 ` Robin Rosenberg
2008-05-08 20:21 ` Caio Marcelo
2008-05-08 20:25 ` Caio Marcelo
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=d280d7f10805051555x67bd7e87o999a2c9e19663b92@mail.gmail.com \
--to=cmarcelo@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).