git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: bugfix: binary file permission regression

From
Nazri Ramliy <ayiehere@gmail.com>
Date
Jun 11, 2010, 07:06 UTC
Message-ID
<AANLkTimwmkMnaqMY44SeHz1L8hE2Lp324PXPY4eqvTGb@mail.gmail.com>
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:
Show 5 quoted lines
>              (!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.
Previous: Nazri RamliyNext: Christian Couder
Message 2 of 4 in “diff: bugfix: binary file permission regression”
  1. diff: bugfix: binary file permission regressionNazri Ramliy, Jun 10, 2010
  2. Nazri RamliyJun 11, 2010
  3. Christian CouderJun 11, 2010
  4. Nazri RamliyJun 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.