This is just to illustrate that we _could_ do this; I think it is
better to leave these places as they are.  The primary thing we
wanted to do with the automatic addition of LF to an incomplete line
was to make it easier to write a caller that creates a single-liner
file.  For callers that want to fully create a multi-line input, the
resulting code is easier to see if we let them continue to do so.

Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
 builtin/am.c     | 1 -
 builtin/branch.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/builtin/am.c b/builtin/am.c
index 486ff59..c544091 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -381,7 +381,6 @@ static void write_author_script(const struct am_state 
*state)
 
        strbuf_addstr(&sb, "GIT_AUTHOR_DATE=");
        sq_quote_buf(&sb, state->author_date);
-       strbuf_addch(&sb, '\n');
 
        write_state_text(state, "author-script", sb.buf);
 
diff --git a/builtin/branch.c b/builtin/branch.c
index ff05869..cdf7f13 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -774,7 +774,7 @@ static int edit_branch_description(const char *branch_name)
        strbuf_commented_addf(&buf,
                    "Please edit the description for the branch\n"
                    "  %s\n"
-                   "Lines starting with '%c' will be stripped.\n",
+                   "Lines starting with '%c' will be stripped.",
                    branch_name, comment_line_char);
        if (write_file_gently(git_path(edit_description), "%s", buf.buf)) {
                strbuf_release(&buf);
-- 
2.5.0-568-g53a3e28

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to