git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: git@vger.kernel.org,
	"Martin Langhoff (CatalystIT)" <martin@catalyst.net.nz>
Subject: Re: [PATCH] git-fetch --tags: deal with tags with spaces in them.
Date: Wed, 12 Oct 2005 11:57:33 -0700	[thread overview]
Message-ID: <7vslv6ef6q.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <434D3000.5020601@zytor.com> (H. Peter Anvin's message of "Wed, 12 Oct 2005 08:47:12 -0700")

"H. Peter Anvin" <hpa@zytor.com> writes:

> H. Peter Anvin wrote:
>> We can disallow whitespace, and we *have* to disallow at least
>> newline due to the file format; I believe we should disallow all
>> control characters (0-31, 127-159.)
>
> Actually, disallowing anything 128 and above means knowing the encoding 
> system.  If we enforce UTF-8, we should presumably disallow at the very 
> least U+FFFE and U+FFFF too.

Hmph.  I think enforcing (or rather supporting preferentially)
UTF-8 in log messages was alright, but enforcing UTF-8 tagnames
imply UTF-8 host pathnames because we do not currently convert
when we fetch refs from remote and store locally.

 * git-clone-pack, git-fetch-pack and git-peek-remote run
   git-upload-pack on the other end.  Currently upload-pack
   sends a list of refs read from the remote filesystem without
   conversion, and:

   (1) clone-pack uses the names without conversion to replicate
       refs on the local filesystem.

   (2) fetch-pack sends the names given on the command line,
       and/or read from the local filesystem, to upload-pack
       without conversion.

   (3) fetch-pack and peek-remote outputs the names obtained
       from the remote without conversion to stdout.

 * over http, the encoding of the refnames client sees is what
   is stored in project.git/info/refs on the remote.  Currently,
   update-server-info reads from the filesystem and writes this
   file out without conversion.  While walking the commits,
   names are not used, so there is no refname encoding issues.

What we should do at this point is to declare that exchanging
refnames between systems is to happen after converting them to
UTF-8.  And version 1.0 just assumes pathnames are UTF-8.

If people on systems with non UTF-8 pathnames cared enough, the
tools can be made aware of local pathname encodings, and taught
how to convert what for_each_ref() read from the filesystem, the
refspecs given from the command line, etc. to UTF-8.  But that
can come later.

  reply	other threads:[~2005-10-12 18:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46a038f90510062014l7f5740e0l77fc53b50f822e8f@mail.gmail.com>
     [not found] ` <46a038f90510082014i6b296f2bvbac56e25344cbdf2@mail.gmail.com>
2005-10-10  4:26   ` Strangely broken git repo Martin Langhoff (CatalystIT)
2005-10-10  9:00     ` Junio C Hamano
2005-10-10 14:54       ` Linus Torvalds
2005-10-10 15:21         ` Linus Torvalds
2005-10-10 18:19           ` Morten Welinder
2005-10-10 18:23             ` Linus Torvalds
2005-10-10 18:30             ` Johannes Schindelin
2005-10-11  4:29       ` Quote reference names while fetching with curl Junio C Hamano
2005-10-11  5:07         ` [PATCH] git-fetch --tags: deal with tags with spaces in them Junio C Hamano
2005-10-11  6:04           ` Junio C Hamano
2005-10-12  5:29             ` Junio C Hamano
2005-10-12  8:26               ` Petr Baudis
2005-10-12 15:36               ` H. Peter Anvin
2005-10-12 15:47                 ` H. Peter Anvin
2005-10-12 18:57                   ` Junio C Hamano [this message]
2005-10-12 18:10                 ` Junio C Hamano
2005-10-12 22:01                   ` [PATCH] git-check-ref-format: reject funny ref names Junio C Hamano
2005-10-12 22:01                   ` [PATCH] Refuse to create funny refs in clone-pack, git-fetch and receive-pack Junio C Hamano
2005-10-11 19:55           ` [PATCH] git-fetch --tags: deal with tags with spaces in them Matthias Urlichs
2005-10-12  3:26       ` Strangely broken git repo Nick Hengeveld
2005-10-12  4:22         ` 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=7vslv6ef6q.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=hpa@zytor.com \
    --cc=martin@catalyst.net.nz \
    /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).