Jeff King
cf3c635210
alternates: accept double-quoted paths
...
We read lists of alternates from objects/info/alternates
files (delimited by newline), as well as from the
GIT_ALTERNATE_OBJECT_DIRECTORIES environment variable
(delimited by colon or semi-colon, depending on the
platform).
There's no mechanism for quoting the delimiters, so it's
impossible to specify an alternate path that contains a
colon in the environment, or one that contains a newline in
a file. We've lived with that restriction for ages because
both alternates and filenames with colons are relatively
rare, and it's only a problem when the two meet. But since
722ff7f87 (receive-pack: quarantine objects until
pre-receive accepts, 2016-10-03), which builds on the
alternates system, every push causes the receiver to set
GIT_ALTERNATE_OBJECT_DIRECTORIES internally.
It would be convenient to have some way to quote the
delimiter so that we can represent arbitrary paths.
The simplest thing would be an escape character before a
quoted delimiter (e.g., "\:" as a literal colon). But that
creates a backwards compatibility problem: any path which
uses that escape character is now broken, and we've just
shifted the problem. We could choose an unlikely escape
character (e.g., something from the non-printable ASCII
range), but that's awkward to use.
Instead, let's treat names as unquoted unless they begin
with a double-quote, in which case they are interpreted via
our usual C-stylke quoting rules. This also breaks
backwards-compatibility, but in a smaller way: it only
matters if your file has a double-quote as the very _first_
character in the path (whereas an escape character is a
problem anywhere in the path). It's also consistent with
many other parts of git, which accept either a bare pathname
or a double-quoted one, and the sender can choose to quote
or not as required.
Signed-off-by: Jeff King <peff@peff.net >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2016-12-12 15:10:43 -08:00
..
2016-06-27 06:11:57 -07:00
2016-10-03 13:32:41 -07:00
2016-09-08 21:35:57 -07:00
2013-02-02 21:46:52 -08:00
2013-02-01 13:53:25 -08:00
2016-01-12 15:16:54 -08:00
2013-04-03 16:14:19 -07:00
2015-05-21 13:03:37 -07:00
2016-06-28 08:36:45 -07:00
2016-09-29 16:49:42 -07:00
2016-06-08 12:04:37 -07:00
2016-09-26 16:09:16 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2016-09-19 10:25:11 -07:00
2016-09-26 16:09:16 -07:00
2016-05-09 15:44:14 -07:00
2016-07-28 11:25:54 -07:00
2015-05-28 12:38:46 -07:00
2016-09-12 15:03:32 -07:00
2016-07-13 11:24:14 -07:00
2016-09-19 10:25:11 -07:00
2016-03-24 10:16:52 -07:00
2013-02-01 13:53:33 -08:00
2014-02-28 09:55:35 -08:00
2016-06-08 12:04:37 -07:00
2016-06-28 08:36:45 -07:00
2016-09-19 10:25:11 -07:00
2016-06-28 08:36:45 -07:00
2016-02-01 13:07:41 -08:00
2016-09-11 14:48:15 -07:00
2015-10-16 15:27:52 -07:00
2016-05-09 15:44:14 -07:00
2013-07-13 10:19:37 -07:00
2016-09-21 11:12:41 -07:00
2011-03-11 10:59:16 -05:00
2016-09-21 08:44:41 -07:00
2016-07-28 11:25:54 -07:00
2013-11-27 12:16:49 -08:00
2011-07-06 14:26:26 -07:00
2016-06-28 08:20:52 -07:00
2016-08-15 15:28:45 -07:00
2014-01-27 08:34:34 -08:00
2016-07-28 11:25:54 -07:00
2016-07-28 11:25:54 -07:00
2016-09-08 21:35:56 -07:00
2016-10-10 13:52:37 -07:00
2014-09-16 11:11:58 -07:00
2016-02-23 12:56:27 -08:00
2016-06-28 08:36:45 -07:00
2013-09-06 14:49:06 -07:00
2013-02-01 13:53:33 -08:00
2016-10-03 13:22:25 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2011-07-06 14:26:26 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2014-03-31 15:16:22 -07:00
2016-06-28 08:36:45 -07:00
2015-05-12 22:14:46 -07:00
2016-07-13 11:24:14 -07:00
2016-06-28 08:36:45 -07:00
2016-07-06 11:48:25 -07:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2016-09-21 08:58:10 -07:00
2011-07-06 14:26:26 -07:00
2016-07-18 15:15:59 -07:00
2016-06-08 12:04:55 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2016-06-08 12:04:37 -07:00
2013-02-01 13:53:33 -08:00
2016-06-28 08:36:45 -07:00
2015-03-10 15:19:05 -07:00
2016-08-24 12:31:05 -07:00
2013-02-01 13:53:33 -08:00
2016-07-06 13:06:34 -07:00
2016-06-08 12:04:55 -07:00
2016-06-28 08:36:45 -07:00
2016-07-11 10:31:08 -07:00
2016-08-25 13:38:18 -07:00
2016-01-19 10:07:56 -08:00
2016-06-28 08:36:45 -07:00
2016-05-26 13:17:14 -07:00
2016-06-06 11:14:43 -07:00
2013-10-29 13:06:08 -07:00
2015-10-29 12:10:23 -07:00
2013-04-15 11:08:37 -07:00
2011-07-06 14:26:26 -07:00
2013-09-04 15:02:56 -07:00
2016-04-21 11:58:51 -07:00
2013-02-01 13:53:33 -08:00
2014-04-24 11:29:05 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:20:52 -07:00
2016-06-28 08:20:52 -07:00
2013-09-04 15:03:03 -07:00
2016-06-28 08:20:52 -07:00
2016-07-28 11:25:54 -07:00
2016-08-10 10:55:13 -07:00
2011-07-06 14:26:26 -07:00
2013-07-18 16:23:46 -07:00
2011-07-06 14:26:26 -07:00
2015-10-16 15:27:52 -07:00
2014-10-13 13:35:18 -07:00
2015-06-29 08:48:44 -07:00
2016-03-21 13:30:36 -07:00
2016-09-08 21:35:53 -07:00
2016-06-08 12:04:37 -07:00
2014-05-21 13:57:10 -07:00
2016-07-28 11:25:54 -07:00
2016-08-24 12:31:05 -07:00
2015-07-21 14:08:14 -07:00
2011-07-06 14:26:26 -07:00
2014-11-11 14:47:04 -08:00
2016-08-11 14:35:42 -07:00
2013-02-01 14:12:34 -08:00
2013-02-07 14:41:45 -08:00
2016-06-28 08:36:45 -07:00
2016-08-12 09:47:35 -07:00
2016-06-08 12:04:37 -07:00
2015-09-14 12:50:33 -07:00
2015-03-13 22:13:46 -07:00
2014-04-08 12:00:28 -07:00
2015-10-05 12:30:13 -07:00
2015-07-15 10:30:54 -07:00
2016-06-28 08:36:45 -07:00
2014-01-07 14:34:06 -08:00
2016-07-28 11:25:54 -07:00
2016-06-28 08:36:45 -07:00
2012-03-28 11:18:35 -07:00
2011-09-11 21:52:18 -07:00
2016-06-08 12:04:37 -07:00
2016-06-28 08:20:52 -07:00
2013-04-21 23:11:02 -07:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2015-05-12 22:14:46 -07:00
2014-10-13 13:35:18 -07:00
2015-08-31 11:29:04 -07:00
2016-08-11 11:15:56 -07:00
2015-10-16 15:27:52 -07:00
2016-05-27 10:40:46 -07:00
2016-07-28 11:25:54 -07:00
2012-10-21 12:17:38 -07:00
2016-07-28 11:25:54 -07:00
2015-07-28 13:21:59 -07:00
2011-07-06 14:26:26 -07:00
2016-08-24 12:31:05 -07:00
2016-06-28 08:36:45 -07:00
2015-07-21 14:08:35 -07:00
2011-07-06 14:26:26 -07:00
2015-10-22 10:16:12 -07:00
2016-05-31 10:17:20 -07:00
2013-02-01 13:53:33 -08:00
2016-07-06 13:06:36 -07:00
2015-05-17 11:24:57 -07:00
2015-06-22 14:20:47 -07:00
2016-06-28 08:36:45 -07:00
2013-08-13 09:01:54 -07:00
2016-07-28 10:34:42 -07:00
2011-07-06 14:26:26 -07:00
2016-12-12 15:10:43 -08:00
2016-09-08 21:35:52 -07:00
2014-05-21 13:57:10 -07:00
2016-06-28 08:36:45 -07:00
2016-02-26 10:58:14 -08:00
2016-09-22 11:23:45 -07:00
2016-06-28 08:36:45 -07:00
2015-10-22 10:14:44 -07:00
2014-10-10 16:02:26 -07:00
2016-07-14 15:50:17 -07:00
2016-06-08 12:04:55 -07:00
2016-09-19 13:51:38 -07:00
2016-08-11 14:35:42 -07:00
2013-02-01 13:53:33 -08:00
2016-06-28 08:36:45 -07:00
2015-07-20 11:07:18 -07:00
2016-08-13 19:36:44 -07:00
2014-11-19 13:47:59 -08:00
2016-02-01 13:07:41 -08:00
2016-09-25 16:39:11 -07:00
2016-06-08 12:04:37 -07:00
2013-02-01 13:53:33 -08:00
2016-05-18 14:40:14 -07:00
2014-04-17 11:14:57 -07:00
2015-07-01 14:55:53 -07:00
2011-11-08 13:37:10 -08:00
2014-04-17 11:14:58 -07:00
2015-04-20 11:05:50 -07:00
2016-05-10 11:15:04 -07:00
2013-01-05 23:41:42 -08:00
2016-06-17 11:39:05 -07:00
2016-06-08 12:04:37 -07:00
2016-05-17 14:38:39 -07:00
2016-02-22 10:42:52 -08:00
2016-09-19 13:51:38 -07:00
2016-07-06 13:06:34 -07:00
2014-06-12 09:59:13 -07:00
2016-10-03 13:30:39 -07:00
2016-09-19 13:51:38 -07:00
2011-11-22 18:16:59 -08:00
2016-08-26 15:58:10 -07:00
2015-10-22 10:16:12 -07:00
2016-02-01 13:07:41 -08:00
2012-08-07 14:30:52 -07:00
2016-03-03 13:43:36 -08:00