git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: [PATCH] Describe the bug about handling non-Ascii filenames in 'git add -i'
Date: Wed, 2 Apr 2008 20:06:46 +0300	[thread overview]
Message-ID: <20080402170646.GA12711@mithlond.arda.local> (raw)
In-Reply-To: <7v63v1ccmb.fsf@gitster.siamese.dyndns.org>

The command 'git add -i' (i.e. the interactive mode) can't handle
files which have non-Ascii characters in their name unless the option
core.quotepath is set to false. This patch adds a description of the bug
to the git-add.txt manual.
---

Junio C Hamano kirjoitti (1.4.2008 klo 17.41):

> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > git-config(1):
> >
> >   core.quotepath::
> > 	The commands that output paths (e.g. `ls-files`,
> > 	`diff`), when not given the `-z` option, will quote
> > 	"unusual" characters in the pathname by enclosing the
> > 	pathname in a double-quote pair and with backslashes the
> > 	same way strings in C source code are quoted.  If this
> > 	variable is set to false, the bytes higher than 0x80 are
> > 	not quoted but output as verbatim.  Note that double
> > 	quote, backslash and control characters are always
> > 	quoted without `-z` regardless of the setting of this
> > 	variable.
> 
> Yes, but I do not think "add -i" unwraps the path quoting.  I think it
> should, but I do not think I bothered to.  Because it is trivial to do
> by any aspiring git hacker wannabes, I left it as an exercise to
> readers when I did the "interactive" as a quick-and-dirty hack (aka
> "demonstration").
> 
> Somehow nobody found an itch to improve it until now, but it seems
> that we found a volunteer with the itch ;-)

Unfortunately we found a non-programmer :) My itch (both of them)
disappeared pretty much at the moment I set core.quotepath to false
(thanks Jakub). But this patch is the kind of contribution I can do at
the present moment.


 Documentation/git-add.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index c751a17..f085b15 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -226,6 +226,13 @@ diff::
   This lets you review what will be committed (i.e. between
   HEAD and index).
 
+Bugs
+----
+Files with non-Ascii characters in their name don't work in the interactive
+mode (see above) unless option 'core.quotepath' is set to false. Setting
+'core.quotepath' to false may be a good idea anyway if you need to handle
+non-Ascii filenames. See linkgit:git-config[1] for more information about this
+option.
 
 See Also
 --------
-- 
1.5.5.rc2.15.g4db6

  parent reply	other threads:[~2008-04-02 17:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01 19:32 BUG: "git add --interactive" does not work with UTF-8 filenames Teemu Likonen
2008-04-01 20:08 ` Jakub Narebski
2008-04-01 20:29   ` BUG: "git add --interactive" does not work with UTF-8 filenames if core.quotepath=true Teemu Likonen
2008-04-02  0:41   ` BUG: "git add --interactive" does not work with UTF-8 filenames Junio C Hamano
2008-04-02 11:17     ` Jakub Narebski
2008-04-02 15:50       ` Junio C Hamano
2008-04-02 17:06     ` Teemu Likonen [this message]
2008-04-02 17:18       ` [PATCH] Describe the bug about handling non-Ascii filenames in 'git add -i' 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=20080402170646.GA12711@mithlond.arda.local \
    --to=tlikonen@iki.fi \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.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.
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).