Skip to content

Commit

Permalink
symbolic-ref, update-ref: do not refuse reflog message with LF
Browse files Browse the repository at this point in the history
Earlier these tools refused to create a reflog entry when the
message given by the calling Porcelain had a LF in it, partially
to keep the file format integrity of reflog file, which is
one-entry-per-line.  These tools should not be dictating such a
policy.

Instead, let the codepath to write out the reflog entry worry
about the format integrity and allow messages with LF in them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jul 30, 2007
1 parent 0ec29a4 commit 2838844
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions builtin-symbolic-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)
msg = argv[1];
if (!*msg)
die("Refusing to perform update with empty message");
if (strchr(msg, '\n'))
die("Refusing to perform update with \\n in message");
}
else if (!strcmp("--", arg)) {
argc--;
Expand Down
2 changes: 0 additions & 2 deletions builtin-update-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
msg = argv[++i];
if (!*msg)
die("Refusing to perform update with empty message.");
if (strchr(msg, '\n'))
die("Refusing to perform update with \\n in message.");
continue;
}
if (!strcmp("-d", argv[i])) {
Expand Down

0 comments on commit 2838844

Please sign in to comment.