git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG 1.7.9: git-update-ref strange behavior with ref with trailing newline
@ 2012-02-02 22:09 Mark Jason Dominus
  2012-02-02 22:32 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Jason Dominus @ 2012-02-02 22:09 UTC (permalink / raw)
  To: git


Here I use git symbolic-ref to update HEAD with a ref whose name
contains trailing newlines:

        $ git symbolic-ref -m "this message does not appear" HEAD 'refs/heads/master
        >
        >
        > '

The newlines are inserted into .git/HEAD, but are innocuous, because
other git commands ignore them.  The bug is that the -m option is
completely ignored:

        $ git reflog HEAD | grep 'message does not appear'
        $

If trailing newlines are considered acceptable, the -m option should
be honored.  If not, an error message should be printed and thecommand
should exit with a nonzero exit status.

I will prepare a patch if you will say which behavior would be
preferable.

Mark Jason Dominus 	  			                 mjd@plover.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-04  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-02 22:09 BUG 1.7.9: git-update-ref strange behavior with ref with trailing newline Mark Jason Dominus
2012-02-02 22:32 ` Jeff King
2012-02-04  8:11   ` Junio C Hamano

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).