git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robie Basak <robie.basak@canonical.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] apply: squash consecutive slashes with p_value > 0
Date: Thu, 17 Nov 2011 17:55:44 +0000	[thread overview]
Message-ID: <20111117175544.GC17472@mal.justgohome.co.uk> (raw)
In-Reply-To: <7vr516myqh.fsf@alter.siamese.dyndns.org>

On Thu, Nov 17, 2011 at 09:43:02AM -0800, Junio C Hamano wrote:
> I didn't mention this, but I suspect the code with your patch would not
> touch redundant slashes after it finds "start", either.

What is happening to me is that b//foo with -p1 gets split at the first
slash and then git apply cannot find /foo when it should be looking for
foo. But in the case of b/foo//bar and -p1, without squashing extra
slashes it would look for foo//bar which I presume that it would still
be able to find.

So in my case, I only need duplicate slashes around the -p boundary
point to be removed. I assumed that the squash_slash() later on would
eliminate the rest, but I didn't look into this; if it does it'd be a
different issue to the one that I'm seeing.

I'm now confused about what it will do (which is why I need to look at
it again to make sure), but if it turns out to be easier to just handle
that one boundary point, would you accept a patch that eliminates just
that duplicate, on the basis that in Unix-land duplicate slashes are
perfectly acceptable to be left lying around?

Thanks,

Robie

  parent reply	other threads:[~2011-11-17 17:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 12:04 [PATCH] apply: squash consecutive slashes with p_value > 0 Robie Basak
2011-11-16 17:36 ` Junio C Hamano
     [not found]   ` <20111117150409.GB17472@mal.justgohome.co.uk>
     [not found]     ` <7vr516myqh.fsf@alter.siamese.dyndns.org>
2011-11-17 17:55       ` Robie Basak [this message]
2011-11-17 18:07         ` Junio C Hamano
2011-11-17 18:57           ` Robie Basak

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=20111117175544.GC17472@mal.justgohome.co.uk \
    --to=robie.basak@canonical.com \
    --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).