git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm
Date: Thu, 22 Jun 2017 19:18:44 -0400	[thread overview]
Message-ID: <20170622231844.d3fdo6c367h3ldve@sigill.intra.peff.net> (raw)
In-Reply-To: <20170622102622.26147-1-phillip.wood@talktalk.net>

On Thu, Jun 22, 2017 at 11:26:17AM +0100, Phillip Wood wrote:

> From: Phillip Wood <phillip.wood@dunelm.org.uk>
> 
> I'm using this in some scripts and it would be more convenient to have
> it available from Git.pm rather than copying and pasting it each time
> I need it. I think it should be useful to other people using Git.pm as
> well. It is not uncommon to get a quoted path back from a command that
> needs to be passed on the commandline of another command. While one
> can use -z in many cases, that leaves the problem of having to quote
> the path when printing it in error messages etc.

Grepping around the calls to unquote_path in add--interactive, I
definitely think many of them ought to be using "-z". But I don't think
that's a reason not to make unquote_path() more widely available. It
_is_ generally useful.

The changes look sane to me. My biggest question is how add--interactive
handles the exceptions thrown by the refactored function on error. Since
these paths are coming from Git, it should be something never comes up,
right? So failing hard is probably the best thing to do.

-Peff

  parent reply	other threads:[~2017-06-22 23:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 10:26 [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm Phillip Wood
2017-06-22 10:26 ` [PATCH 1/5] Git.pm Add unquote_path() Phillip Wood
2017-06-22 19:26   ` Junio C Hamano
2017-06-22 10:26 ` [PATCH 2/5] Git::unquote_path() Handle '\a' Phillip Wood
2017-06-22 10:26 ` [PATCH 3/5] Git::unquote_path() throw an exception on bad path Phillip Wood
2017-06-22 19:37   ` Junio C Hamano
2017-06-22 10:26 ` [PATCH 4/5] Add tests for Git::unquote_path() Phillip Wood
2017-06-22 10:26 ` [PATCH 5/5] git-add--interactive.perl: Use unquote_path() from Git.pm Phillip Wood
2017-06-22 19:38 ` [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm Junio C Hamano
2017-06-22 23:18 ` Jeff King [this message]
2017-06-30  9:53   ` Phillip Wood
2017-06-30  9:49 ` [PATCH 0/4] Move unquote_path " Phillip Wood
2017-06-30  9:49   ` [PATCH 1/4] add -i move unquote_path() " Phillip Wood
2017-06-30  9:49   ` [PATCH 2/4] Git::unquote_path() Handle '\a' Phillip Wood
2017-06-30  9:49   ` [PATCH 3/4] Git::unquote_path() throw an exception on bad path Phillip Wood
2017-06-30  9:49   ` [PATCH 4/4] Add tests for Git::unquote_path() Phillip Wood
2017-06-30 15:06   ` [PATCH 0/4] Move unquote_path from git-add--interactive.perl to Git.pm 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170622231844.d3fdo6c367h3ldve@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).