All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "Francis Moreau" <francis.moro@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-am failed, what's next ?
Date: Thu, 22 Feb 2007 11:30:22 -0800	[thread overview]
Message-ID: <7virduf0s1.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <38b2ab8a0702220238l14628f54s3165f050f6af5447@mail.gmail.com> (Francis Moreau's message of "Thu, 22 Feb 2007 11:38:51 +0100")

"Francis Moreau" <francis.moro@gmail.com> writes:

>> Applying by hand
>> ----------------
>>
>> If you (as most people) are not comfortable editing the patch
>> text you can update your working tree to pretend that the patch
>> applied cleanly.  You can do number of things:
>>
>>  * Use "git apply --index -C<n> .dotest/patch" to attempt
>>    applying the patch with reduced context.
>>
>>  * Use "git apply --reject .dotest/patch" to get apply only
>>    hunks that apply cleanly, while getting *.rej files.
>>
>>  * Use "GNU patch" with less strict options, perhaps like
>>
>> 	$ patch -p1 --fuzz=<n> --ignore-whitespace
>
> why using 'patch' ? couldn't this be done by using 'git-apply' ?

The default operationg mode of 'patch' is less strict than
git-apply is, and it can be told to be much less strict, so some
people seem to like it.  You do not have to use it unless your
patch text is based on too far away version.  I usually don't.

Also the above is not an exhaustive list.  If you are handy with
other tools to make patches that do not cleanly apply apply
(e.g. wiggle), they can be used instead.

> Maybe these several choices could be proposed to the user when using
> the interactive mode ?

I do not think so.  As far as I remember, interactive mode
helps the "Fixing patch text" strategy but not "Applying by
hand" strategy.  When a patch does not apply, you fix the text
and re-apply, and [v]iew command is to review how you fixed the
patch, for example.

  reply	other threads:[~2007-02-22 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22  8:22 git-am failed, what's next ? Francis Moreau
2007-02-22  8:48 ` Andy Parkins
2007-02-22 10:09   ` Francis Moreau
2007-02-22  9:47 ` Junio C Hamano
2007-02-22 10:38   ` Francis Moreau
2007-02-22 19:30     ` Junio C Hamano [this message]
2007-02-22 10:50   ` Francis Moreau
2007-02-22 11:13   ` Andy Parkins
2007-02-22 20:02     ` Junio C Hamano
2007-02-22 19:11 ` Johannes Schindelin

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=7virduf0s1.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=francis.moro@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.