git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Federico Cuello <fedux@lugmen.org.ar>, git@vger.kernel.org
Subject: Re: [PATCH] Fix git-apply with -p greater than 1
Date: Fri, 22 Oct 2010 00:31:40 -0500	[thread overview]
Message-ID: <20101022053140.GB786@burratino> (raw)
In-Reply-To: <7viq0urfbz.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:

> +test_expect_success 'apply (-p2) diff, mode change only' '
> +	cat >patch.chmod <<-\EOF &&
> +	diff --git a/sub/file1 b/sub/file1
> +	old mode 100644
> +	new mode 100755
> +	EOF
> +	chmod 644 file1 &&
> +	git apply -p2 patch.chmod &&
> +	test -x file1

I had thought -p was only supposed to apply to traditional patches.
Maybe a documentation update would avoid confusion?

	-p<n>
	   Remove <n> leading slashes from traditional diff paths.
	   The default is 1.

  reply	other threads:[~2010-10-22  5:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 22:12 [PATCH] Fix git-apply with -p greater than 1 Federico Cuello
2010-10-22  5:01 ` Junio C Hamano
2010-10-22  5:31   ` Jonathan Nieder [this message]
2010-10-22 13:42     ` Fede
2010-10-22 15:38       ` Jonathan Nieder
2010-10-22 18:41       ` Junio C Hamano
2010-10-22 18:51         ` Federico Cuello
2010-10-25 14:11         ` Federico Cuello
2010-10-22 18:40     ` Junio C Hamano

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=20101022053140.GB786@burratino \
    --to=jrnieder@gmail.com \
    --cc=fedux@lugmen.org.ar \
    --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.
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).