Re: [PATCH v2 2/2] git-svn: allow empty email-address in authors-prog and authors-file

2018-03-20 Thread Eric Wong
Andreas Heiduk  wrote:
> Am 19.03.2018 um 00:04 schrieb Eric Wong:
> > Andreas Heiduk  wrote:
> >> The email address in --authors-file and --authors-prog can be empty but
> >> git-svn translated it into a syntethic email address in the form
> >> $USERNAME@$REPO_UUID. Now git-svn behaves like git-commit: If the email
> >> is explicitly set to the empty string, the commit does not contain
> >> an email address.
> > 
> > What is missing is WHY "<>" is preferable to "<$USERNAME@$REPO_UUID>".
> >
> > $USERNAME is good anyways since projects/organizations tie their
> > SVN usernames to email usernames via LDAP, making it easy to
> > infer their email address from $USERNAME.  The latter can also
> > be used to disambiguate authors if they happen to have the same
> > real name.
> 
> That's still available and it's even still the default.

OK.

> But: If the user of git-svn takes the burden of writing an authors
> script or maintaining an authors file then he should have full control
> over the result as long as git can handle the output reasonably.
> Currently that's the case for git but not for git-svn.

Fair enough.

> jondoe <>
> 
> just means: "There is intentionally no email address." For an
> internal, ephemeral repository that can be OK. It has the advantage,
> that no automatic system (Jira, Jenkins, ...) will try to send emails to 
> 
> jondoe 

OK, that's a good reason to allow "<>" and should be in the
commit message.

> Further steps: Eric Sunshine mentioned [1] that you might have concerns about
> the change of behavior per se. For me the patch is not so much a new feature 
> but
> a bugfix bringing git-svn in sync with git itself. Adding an option parameter 
> to enable the new behavior seems strange to me. But there might be other ways
> to achieve the same effect:

New options are not desirable, either, as they increase
testing/maintenance overhead.  So I'm inclined to take your
patch with only an updated commit message...

No rush, though; will wait another bit for others to comment and
I expect to be preoccupied this week with other projects and
weather problems on the forecast :<


Re: [PATCH v2 2/2] git-svn: allow empty email-address in authors-prog and authors-file

2018-03-19 Thread Andreas Heiduk
Am 19.03.2018 um 00:04 schrieb Eric Wong:
> Andreas Heiduk  wrote:
>> The email address in --authors-file and --authors-prog can be empty but
>> git-svn translated it into a syntethic email address in the form
>> $USERNAME@$REPO_UUID. Now git-svn behaves like git-commit: If the email
>> is explicitly set to the empty string, the commit does not contain
>> an email address.
> 
> What is missing is WHY "<>" is preferable to "<$USERNAME@$REPO_UUID>".
>
> $USERNAME is good anyways since projects/organizations tie their
> SVN usernames to email usernames via LDAP, making it easy to
> infer their email address from $USERNAME.  The latter can also
> be used to disambiguate authors if they happen to have the same
> real name.

That's still available and it's even still the default.

But: If the user of git-svn takes the burden of writing an authors
script or maintaining an authors file then he should have full control
over the result as long as git can handle the output reasonably.
Currently that's the case for git but not for git-svn.

Git can handle empty emails quite nicely:

> git -c user.email= commit --allow-empty -m "foo"
> git show --format=raw HEAD | egrep "author|committer"
author jondoe <> 1521495217 +0100
committer jondoe <> 1521495217 +0100

Doing the same with current git-svn requires a filter-branch followed
by `rm -r .git/svn/`  followed by `git svn fetch` to recreate the
rev_map files. That would be feasible for a one-time conversion but
not in a situation where SVN is live and the master repository.

>
> "<>" is completely meaningless.
>

Not quite. The "<>" is not the only information - there is still the
mandatory "name" part. So the commit id

jondoe <>

just means: "There is intentionally no email address." For an
internal, ephemeral repository that can be OK. It has the advantage,
that no automatic system (Jira, Jenkins, ...) will try to send emails to 

jondoe 

Additionally the log output isn't cluttered with irrelevant stuff. :-)

And last but not least we don't have to hunt down names long gone by and
already deleted in LDAP. In that case the UUID doesn't help either.


Further steps: Eric Sunshine mentioned [1] that you might have concerns about
the change of behavior per se. For me the patch is not so much a new feature but
a bugfix bringing git-svn in sync with git itself. Adding an option parameter 
to enable the new behavior seems strange to me. But there might be other ways
to achieve the same effect:

- changing the output format of the file and prog: empty emails could be 
  marked by a syntax which is invalid so far.

- OR (if some change of behaviour is acceptable) the script could evaluate
  a new environment variable like GIT_SVN_UUID to compose the 
  `<$user@$uuid>` part itself.

- OR just mention it in the relaese notes ;-)

- OR [please insert ideas here]


[1] 
https://public-inbox.org/git/capig+cq1si-avazf_1kf4yx9+egd9tgudvp7npj3uyxy1pl...@mail.gmail.com/


Re: [PATCH v2 2/2] git-svn: allow empty email-address in authors-prog and authors-file

2018-03-18 Thread Eric Wong
Andreas Heiduk  wrote:
> The email address in --authors-file and --authors-prog can be empty but
> git-svn translated it into a syntethic email address in the form
> $USERNAME@$REPO_UUID. Now git-svn behaves like git-commit: If the email
> is explicitly set to the empty string, the commit does not contain
> an email address.

What is missing is WHY "<>" is preferable to "<$USERNAME@$REPO_UUID>".

$USERNAME is good anyways since projects/organizations tie their
SVN usernames to email usernames via LDAP, making it easy to
infer their email address from $USERNAME.  The latter can also
be used to disambiguate authors if they happen to have the same
real name.

"<>" is completely meaningless.