git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sean <seanlkml@sympatico.ca>
Cc: Benoit SIGOURE <tsuna@lrde.epita.fr>, git@vger.kernel.org
Subject: [PATCH 2/3] symbolic-ref, update-ref: do not refuse reflog message with LF
Date: Sat, 28 Jul 2007 18:10:51 -0700	[thread overview]
Message-ID: <7vps2cnhes.fsf_-_@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vzm1gnhin.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Sat, 28 Jul 2007 18:08:32 -0700")

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>
---
 builtin-symbolic-ref.c |    2 --
 builtin-update-ref.c   |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/builtin-symbolic-ref.c b/builtin-symbolic-ref.c
index d41b406..9eb95e5 100644
--- a/builtin-symbolic-ref.c
+++ b/builtin-symbolic-ref.c
@@ -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--;
diff --git a/builtin-update-ref.c b/builtin-update-ref.c
index feac2ed..8339cf1 100644
--- a/builtin-update-ref.c
+++ b/builtin-update-ref.c
@@ -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])) {
-- 
1.5.3.rc3.24.g83b3d

  parent reply	other threads:[~2007-07-29  1:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-28 10:07 git-svn rebase screwing up commit messages Benoit SIGOURE
2007-07-28 12:14 ` Junio C Hamano
2007-07-28 12:35   ` Sean
2007-07-28 13:10     ` Junio C Hamano
2007-07-28 13:29       ` Sean
2007-07-28 13:38         ` Junio C Hamano
2007-07-28 14:11           ` Sean
2007-07-28 20:41             ` Junio C Hamano
2007-07-29  1:08               ` Junio C Hamano
2007-07-29  1:10                 ` [PATCH 1/3] log_ref_write() -- do not chomp reflog message at the first LF Junio C Hamano
2007-07-29 11:57                   ` Johannes Schindelin
2007-07-29 18:47                     ` Junio C Hamano
2007-07-29 19:02                       ` Johannes Schindelin
2007-07-29  1:10                 ` Junio C Hamano [this message]
2007-07-29  1:11                 ` [PATCH 3/3] rebase: try not to munge commit log message Junio C Hamano
2007-07-28 14:32           ` git-svn rebase screwing up commit messages Jakub Narebski
2007-07-28 19:48           ` Robin Rosenberg
2007-07-28 17:33       ` Benoit SIGOURE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vps2cnhes.fsf_-_@assigned-by-dhcp.cox.net \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=seanlkml@sympatico.ca \
    --cc=tsuna@lrde.epita.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).