git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nazri Ramliy <ayiehere@gmail.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de
Subject: Re: [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header in $GIT_EDITOR
Date: Sun, 11 Jul 2010 23:05:56 -0700	[thread overview]
Message-ID: <7vbpadfd4r.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1278764821-32647-2-git-send-email-ayiehere@gmail.com> (Nazri Ramliy's message of "Sat\, 10 Jul 2010 20\:27\:01 +0800")

Nazri Ramliy <ayiehere@gmail.com> writes:

> During "git rebase -i", when the commit headers are shown in the editor
> for action (pick/squash/etc), the whitespace (if any) at the beginning
> of commit headers are stripped out due to the use of "read shortsha1 rest"
> for reading the output of "git rev-list".
>
> The missing beginning whitespace do not pose any harm but this could be

If the current code removes whitespaces at the beginning, I would actually
say that it is cleaning up the mess while preparing the instruction sheet
for you to edit, i.e. it is a good thing, and the patch might be making
things worse.

I find it difficult to come up with good reasons to convince myself that I
should be interested in what this patch tries to do.  Here are some of the
things that came to my mind while doing so.

What happens if you have trailing whitespaces, excess whitespaces in the
middle, etc. with or without this patch?  What _should_ happen in an ideal
world?

What happens if you have a malformed commit object whose first line is
blank (i.e. no "Subject" line), or there is _no_ commit log message
whatsoever with or without this patch?  What _should_ happen in an ideal
world?

  parent reply	other threads:[~2010-07-12  6:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-10 12:27 [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of commit header(s) in $GIT_EDITOR Nazri Ramliy
2010-07-10 12:27 ` [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header " Nazri Ramliy
2010-07-10 16:35   ` Nazri Ramliy
2010-07-12  6:05   ` Junio C Hamano [this message]
2010-07-13  1:46     ` Nazri Ramliy
2010-07-13  5:06       ` Junio C Hamano
2010-07-13  5:19         ` Nazri Ramliy
2010-07-12  6:08 ` [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of commit header(s) " Junio C Hamano
2010-07-13  0:36   ` Nazri Ramliy
2010-07-13  1:39     ` Jay Soffian
2010-07-13  1:58       ` Nazri Ramliy
2010-07-13  5:13         ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2010-07-12  1:04 Nazri Ramliy
2010-07-12  1:04 ` [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header " Nazri Ramliy
2010-07-09  5:20 [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of non-comment lines " Nazri Ramliy
2010-07-09  5:20 ` [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header " Nazri Ramliy
2010-07-09 22:37   ` Junio C Hamano
2010-07-10 12:22     ` Nazri Ramliy

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=7vbpadfd4r.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=ayiehere@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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).