@matheusbsbs / matheus-bagliano / commits / 283884422f
Fork 0

symbolic-ref, update-ref: do not refuse reflog message with LF

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>

Junio C Hamano committed Jul 28, 2007 at 17:20 UTC 283884422f35594db9eab491d3f8c91e49f9d62f
2 files changed -4
builtin-symbolic-ref.c
-2
@@ -43,8 +43,6 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)
43 msg = argv[1];
44 if (!*msg)
45 die("Refusing to perform update with empty message");
46 - if (strchr(msg, '\n'))
47 - die("Refusing to perform update with \\n in message");
46 }
47 else if (!strcmp("--", arg)) {
48 argc--;
builtin-update-ref.c
-2
@@ -23,8 +23,6 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
23 msg = argv[++i];
24 if (!*msg)
25 die("Refusing to perform update with empty message.");
26 - if (strchr(msg, '\n'))
27 - die("Refusing to perform update with \\n in message.");
26 continue;
27 }
28 if (!strcmp("-d", argv[i])) {