Thread (1 message) 1 message, 1 author, 2016-06-15

Re: BUG 1.7.9: git-update-ref strange behavior with ref with trailing newline

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:56

Jeff King [off-list ref] writes:
As far as the newlines go, I'm surprised we don't reject that.  We should
probably run check_refname_format on the proposed contents of the
symbolic-ref.
Historically the plumbing commands were deliberately left loose on the
input side in the beginning, for the explicit purpose of allowing us to
more easily experiment, tweaking the low level data structures and file
formats.  It's like being able to use a disk editor to experiment with the
filesystem.  You feed good data, and you will see expected results.  You
perform something other parts of the system does not yet expect, and you
find places that need further adjusting if you were to extend the format
you are futzing with the "bare metal manipulation tool" ;-)

It is not surprising at all that we haven't tightened the ones that normal
users would not use, and symbolic-ref is one of them.  You needed to write
scripts that would use symbolic-ref yourself more often in the early days
of Git, but back in those days, (1) people who wrote scripts with plumbing
commands tended to know what they were doing and (2) we did not have that
much interaction between subsystems, like reflogs vs symrefs.

Now, those days are long gone, and we are done with experiments pretty
much.  We should tighten remaining holes as we find them.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help