From: Robert Luberda <robert@debian.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Robert Luberda <robert@debian.org>,
Eric Wong <normalperson@yhbt.net>,
git@vger.kernel.org
Subject: Re: [PATCH/RFC] git svn: optionally trim imported log messages
Date: Sat, 25 Aug 2012 00:38:51 +0200 [thread overview]
Message-ID: <5038027B.4090208@debian.org> (raw)
In-Reply-To: <7vsjbio2ky.fsf@alter.siamese.dyndns.org>
Junio C Hamano writes:
Hi,
Junio, for some reason I don't get mails from you, I've just discovered
your e-mails on gmane news list. Anyway many thanks for your comments,
I'll fix them and send updated patch next week.
>> +When committing to svn from git (as part of 'commit-diff', 'set-tree'
>> +or 'dcommit') and '--add-author-from' is in effect, a new line character
>> +is not added before the `From: ` line if the log message ends with
>> +a pseudo-headers section.
>
> I think it would be saner to call them "trailers" to avoid
> confusion.
Thanks, I haven't got any idea how to call them, especially because
existing git documentation refers to them just by using the word `line',
e.g.:
git-am.txt: Add a `Signed-off-by:` line to the commit message,
git-cherry-pick.txt: Add Signed-off-by line at the end of the
(The "trailer" keyword appears once in SubmittingPatches and - in a bit
different meaning in technical/pack-format.txt)
>
> I've seen S-o-b, Cc and Change-Id there, but does anybody actually
> put "From: " there?
Yes, `git svn dcommit --add-author-from' adds such a trailer to the svn
log message, and then resets or rebases the git index against svn, so
that the message with the trailer appears in git.
>
> There needs an explanation to the reader why this is an optional
> feature.
OK, I'll add some explanation. Basically it is optional, per Eric
request, for backward compatibility to make it possible to work on a
centralized clone of svn repository by people using both old and new
versions of git svn.
>
> The prerequisite mechanism is to allow some tests in an environment
> where they cannot be run (e.g. no SVN available on the platform);
> any code that uses set_prereq unconditionally looks extremely
> strange. It is OK while the patch is in RFC stage under active
> debugging, but they would want to go away before the polishing is
> done.
OK, I used it merely for checking that the tests work on older version
of git svn, and I didn't break the backward compatibility by accident.
Will be dropped from next version of the patch.
>
> What does En-El stand for? We often see (but not in Git where we
> prefer LF for that purpose)
>
> NL='
> ' ;# newline
>
> and using $NL to mean "empty" may be misleading to the readers.
NL means newline. The new line characters implicitly added after each
commit message line, that's why the value is empty. But, yes, this can
be misleading. I'd prefer to keep it short, so would EL (i.e.
`empty-line') be an acceptable name?
>> + N=$((N + 1)) &&
>
Sorry, it was a typo, I meant to use $(($N + 1)). Thanks for catching this.
>
> next_N () {
> N=$(($N + 1)) &&
> ...
> }
>
> (the above also has two style fixes).
Just to be sure: shall the `...' line start a new level of indentation
or is it a typo? (I guess that the two style fixes are just after the
function name.)
Thanks a lot,
robert
next prev parent reply other threads:[~2012-08-24 23:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 21:23 [PATCH/RFC] git svn: don't introduce new paragraph for git-svn-id Robert Luberda
2012-08-01 21:43 ` Eric Wong
2012-08-01 22:27 ` Robert Luberda
2012-08-01 23:01 ` Eric Wong
2012-08-19 21:46 ` Robert Luberda
2012-08-19 21:52 ` [PATCH/RFC] git svn: optionally trim imported log messages Robert Luberda
2012-08-19 23:59 ` Junio C Hamano
2012-08-24 22:38 ` Robert Luberda [this message]
2012-08-24 23:38 ` Junio C Hamano
2012-08-21 21:45 ` [PATCH/RFC] git svn: don't introduce new paragraph for git-svn-id Eric Wong
2012-08-21 22:35 ` Junio C Hamano
2012-08-24 23:14 ` Robert Luberda
2012-08-26 0:36 ` Eric Wong
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=5038027B.4090208@debian.org \
--to=robert@debian.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=normalperson@yhbt.net \
/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).