git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: avorontsov@ru.mvista.com
Cc: Scott Wood <scottwood@freescale.com>,
	Becky Bruce <becky.bruce@freescale.com>,
	linuxppc-dev@ozlabs.org, git@vger.kernel.org
Subject: Re: git apply vs. renamed files index mismatch
Date: Tue, 09 Sep 2008 20:31:01 -0700	[thread overview]
Message-ID: <7v1vzs1xu2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080909151446.GA10395@oksana.dev.rtsoft.ru> (Anton Vorontsov's message of "Tue, 9 Sep 2008 19:14:46 +0400")

Anton Vorontsov <avorontsov@ru.mvista.com> writes:

> On Tue, Sep 09, 2008 at 07:45:19AM -0700, Junio C Hamano wrote:
> ...
>> ...  It's an interesting idea from git person's point of
>> view (i.e. "would be fun to implement"), but I doubt it would be useful in
>> practice, because:
>> 
>>  (1) You often do not have the identically matching preimage;
>> 
>>  (2) More importantly, it is not unusual for people to *edit* the patch in
>>      their MUA (think of typofixes), after getting it out of git.
>
> Not for rename patches...

a. Why not?  Even if your patch is (totally uninteresting) pure rename, it
   is natural to review the patch before you send out, and it also is
   natural to get tempted to fix typoes, just for a straight normal patch.

b. If you can expect good behaviour out of people, by declaring "Not for
   rename patches" as your guarantee, what's the point of this discussion?

> As for implementing, isn't this as simple as this pseudo code:
>
> if (index_deleted_file == index_new_file)
> 	if (deleted_file != new_file)
> 		printk("warning\n");
>
> In the git-apply?

Implementation is easy (I said "would be fun to code", didn't I? --- by the
way, how did you match "index_deleted_file" with "index_new_file"?).

My point was that it would not be reliable enough to be useful in
practice.

      reply	other threads:[~2008-09-10  3:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1220900995-11928-1-git-send-email-becky.bruce@freescale.com>
     [not found] ` <1220900995-11928-2-git-send-email-becky.bruce@freescale.com>
     [not found]   ` <48C57A92.6060608@freescale.com>
2008-09-08 21:27     ` git apply vs. renamed files index mismatch (was: Re: [PATCH 1/4] POWERPC: Rename dma_64.c to dma.c) Anton Vorontsov
2008-09-08 21:38       ` git apply vs. renamed files index mismatch Scott Wood
2008-09-08 21:54         ` Anton Vorontsov
2008-09-09  0:55           ` Junio C Hamano
2008-09-09  9:06           ` Geert Uytterhoeven
2008-09-08 21:58       ` git apply vs. renamed files index mismatch (was: Re: [PATCH 1/4] POWERPC: Rename dma_64.c to dma.c) Christoph Hellwig
2008-09-09  0:53       ` git apply vs. renamed files index mismatch Junio C Hamano
2008-09-09 10:06         ` Anton Vorontsov
2008-09-09 14:45           ` Junio C Hamano
2008-09-09 15:14             ` Anton Vorontsov
2008-09-10  3:31               ` Junio C Hamano [this message]

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=7v1vzs1xu2.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=becky.bruce@freescale.com \
    --cc=git@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.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).