diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-01-12 10:13:55 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-01-12 21:58:06 +0300 |
commit | 98fa5b68512b9d02d8d47e726bfaec4d33598246 (patch) | |
tree | c6e28a4e7f9db8da7659ae34864002226c6d83b9 /builtin-clean.c | |
parent | 145d08248eb6076b4557005fc7b4fc0270a7a780 (diff) |
git-svn: handle leading/trailing whitespace from svnsync revprops
Repositories generated by svnsync cannot be relied on to have
properly set revprops without newlines in UUIDs and URLs. There
may be broken versions of svnsync out there that append extra
newlines to UUIDs, or the revprops could've been changed by
repository administrators at any time, too.
At least one repository we've come across has an embedded
newline erroneously set in the svnsync-uuid prop. This is bad
because the trailing newline is taken as another record by the
Git.pm library, and the wantarray detection causes tmp_config()
to return an array with an empty-but-existing second element.
We will now strip leading and trailing whitespace both before
setting and after reading the uuid and url for svnsync values.
We will also force tmp_config to return a single scalar when
reading existing values.
SVN UUIDs should never have whitespace in them, and SVN
repository URLs should be URI-escaped, so neither of those
values we ever see in git-svn should actually have whitespace
in them.
Thanks to Dennis Schridde for the bug report and Junio for
helping diagnose this.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-clean.c')
0 files changed, 0 insertions, 0 deletions