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

Re: [PATCH v3] diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes

From
Jeff King <peff@peff.net>
Date
Jun 20, 2012, 16:06 UTC
Message-ID
<20120620160607.GA12856@sigill.intra.peff.net>
In-Reply-To
<CAFouetgXkqJPYwjr5ob5ed_ooL-D56zXyjnOAWrVPdt_eZqw7g@mail.gmail.com>
On Wed, Jun 20, 2012 at 09:38:15AM -0400, Tim Henigan wrote:
Show 12 quoted lines
> > With your patch applied, I was able to use relative paths in my tests.
> >  I also confirmed that all the t4*.sh tests pass.
> >
> > For what its worth, your patch looks correct to me.  Existing
> > consumers of 'prefix_path' should get the same results as before and
> > the one added xmalloc is paired with a free.
> 
> Jeff,
> 
> Are you planning to send this patch to the list?  If not, can I
> include it as 1 of 2 before my patch?  If we go that route, I'm not
> sure how to properly show you as the author...

I'd probably get to it eventually, but I haven't touched it since I sent it. If you want to include some tests and package it with a commit message, that would make me very happy.

You can override the author by including a "From: " header as the first line in the body of the email (which git-am will use rather than the identity in the email's From header). If you use git-send-email, it will do this automatically when the patch author does not match your identity.

I didn't sign-off the original, but please feel free to include my sign-off, as well as add your own. And note your own contributions in the commit message. So the resulting email would be something like:

   From: Tim Henigan <tim.henigan@gmail.com>
   Date: ...
   Subject: [PATCH 1/2] diff: handle relative paths in no-index
   From: Jeff King <peff@peff.net>
   ... some commit message body ...
   Tests and commit message by Tim Henigan.
   Signed-off-by: Jeff King <peff@peff.net>
   Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
   ---
   ... the actual patch ...
> Also, in an earlier email [1] you mentioned that it may be a good idea
> to rename 'found_changes' to something like 'xdiff_found_changes'.  I
> like the idea...I could submit this change as another patch in the
> series, if you have no objections.

Fine by me. I think "xdiff_found_changes" is not quite accurate; it is really "did builtin_diff find any changes?" since we might never call into xdiff (e.g., for binary files). I'm not sure what the best name is.

-Peff
Previous: Tim HeniganNext: Junio C Hamano
Message 8 of 13 in “diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes”
  1. diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changesTim Henigan, Jun 18, 2012
  2. Jeff KingJun 18, 2012
  3. Junio C HamanoJun 18, 2012
  4. Tim HeniganJun 19, 2012
  5. Jeff KingJun 19, 2012
  6. Tim HeniganJun 19, 2012
  7. Tim HeniganJun 20, 2012
  8. Jeff KingJun 20, 2012
  9. Junio C HamanoJun 20, 2012
  10. Jeff KingJun 20, 2012
  11. Junio C HamanoJun 20, 2012
  12. Tim HeniganJun 21, 2012
  13. Junio C HamanoJun 21, 2012

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.