author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 01:30:37 +0000 (20:30 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 01:30:37 +0000 (20:30 -0500) | ||
commit | 6c3aac1c69ea0bcb2896bec96a01fdf8aa6176fa | |
tree | d4e97e98f2e35c3bab930fae3d5112bf02919320 | tree | snapshot |
parent | 10831c551323121bdab06c3eaf2f52c6658fd6b8 | commit | diff |
Don't support shell-quoted refnames in fast-import.
The current implementation of shell-style quoted refnames and
SHA-1 expressions within fast-import contains a bad memory leak.
We leak the unquoted strings used by the `from` and `merge`
commands, maybe others. Its also just muddling up the docs.
Since Git refnames cannot contain LF, and that is our delimiter
for the end of the refname, and we accept any other character
as-is, there is no reason for these strings to support quoting,
except to be nice to frontends. But frontends shouldn't be
expecting to use funny refs in Git, and its just as simple to
never quote them as it is to always pass them through the same
quoting filter as pathnames. So frontends should never quote
refs, or ref expressions.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
The current implementation of shell-style quoted refnames and
SHA-1 expressions within fast-import contains a bad memory leak.
We leak the unquoted strings used by the `from` and `merge`
commands, maybe others. Its also just muddling up the docs.
Since Git refnames cannot contain LF, and that is our delimiter
for the end of the refname, and we accept any other character
as-is, there is no reason for these strings to support quoting,
except to be nice to frontends. But frontends shouldn't be
expecting to use funny refs in Git, and its just as simple to
never quote them as it is to always pass them through the same
quoting filter as pathnames. So frontends should never quote
refs, or ref expressions.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | diff | blob | history |