git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nazri Ramliy <ayiehere@gmail.com>
To: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] diff: bugfix: binary file permission regression
Date: Fri, 11 Jun 2010 15:06:02 +0800	[thread overview]
Message-ID: <AANLkTimwmkMnaqMY44SeHz1L8hE2Lp324PXPY4eqvTGb@mail.gmail.com> (raw)
In-Reply-To: <1276194685-28098-1-git-send-email-ayiehere@gmail.com>

On Fri, Jun 11, 2010 at 2:31 AM, Nazri Ramliy <ayiehere@gmail.com> wrote:
>              (!textconv_two && diff_filespec_is_binary(two)) )) {
>                if (fill_mmfile(&mf1, one) < 0 || fill_mmfile(&mf2, two) < 0)
>                        die("unable to read files to diff");
> +               fprintf(o->file, "%s", header.buf);
> +               strbuf_reset(&header);

 Since the fill_mmfile()s could result in a die maybe it's
 better if the header is printed before the read attempt?:

              (!textconv_two && diff_filespec_is_binary(two)) )) {
+               fprintf(o->file, "%s", header.buf);
+               strbuf_reset(&header);
                if (fill_mmfile(&mf1, one) < 0 || fill_mmfile(&mf2, two) < 0)
                        die("unable to read files to diff");

I did this on my work tree and ran 'make' in the test directory and no errors
were reported.

nazri.

  reply	other threads:[~2010-06-11  7:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 18:31 [PATCH] diff: bugfix: binary file permission regression Nazri Ramliy
2010-06-11  7:06 ` Nazri Ramliy [this message]
2010-06-11  7:24   ` Christian Couder
2010-06-11  9:45     ` Nazri Ramliy

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=AANLkTimwmkMnaqMY44SeHz1L8hE2Lp324PXPY4eqvTGb@mail.gmail.com \
    --to=ayiehere@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).