Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In SVN, the author is being stored as an unversioned revision property svn:author. Every time a Subversion user makes a commit, SVN creates a new revision and sets this revision svn:author property to that exact user's name, for example example, johndoe:

Code Block
languagetext
themeFadeToGrey
titleSVN revision
------------------------------------------------------------------------
r163 | johndoe | 2017-06-07 20:22:15 +0500 (Wed, 07 Jun 2017) | 1 line
Changed paths:
   A /project
   A /project/branches
   A /project/tags
   A /project/trunk

initial layout for the project
------------------------------------------------------------------------

????

$ svn proplist -v --revprop --revision 163

Unversioned properties on revision 163:
  svn:author
    johndoe
  svn:date
    2017-06-07T15:22:15.655243Z
  svn:log
    initial layout for the project

Git also stores author name along with commits, but this name differs from that in SVN: whereas SVN stores actual username, Git author name user identity consists of a name and email:

No Format
Git User <gituser@domain.com>

Git stores a name that's set by user.name Git directive, e.g., by global setting:

...

Those name and email don't relate to an actual username that is used to login to Git repository, they are being set in Git configuration, for example then may be set by the commands below:

Code Block
languagetext
themeFadeToGrey
titlegot config
$ git config --global user.name "John Doe"

...

and in addition to the user.name Git relies upon user.email that can be set as:


$ git config --global user.email johndoe@example.com

Actually, both user.name and user.email are parts of Git user identity, i.e. a Git user is being mentioned as

Git User <gituser@domain.com>

everywhere; e.g. the user John Doe we've set above will be referred as:

...

The Git user John Doe is then referred as

No Format
John Doe <johndoe@example.com>

and this  This exact line will appear then appears as the author name when the user makes some commit in Git. Still, it in every commit John Doe makes.

It worth to mention for completeness sake that Git stores holds not only author name, but also a committer name along with every commit and they may differ in some cases::

Code Block
languagetext
themeFadeToGrey
titleGit commit example
$ git cat-file commit HEAD
    tree 905df23db37b33320483fc6676bfc684078ed248
    parent 4a0cf06baa9aefaa20a13820265ef401d7b1c2b6
    author John Doe <johndoe@example.com> 1496849115 +0000
    committer Jane Doe <janedoe@example.com> 1496849115 +0000

Pro Git book

...

 describes the difference between those names as follows: the author is the person who originally wrote the work, whereas the committer is the person who last applied the work. So, if you send in a patch to a project and one of the core members applies the patch, both of you get credit – you as the author, and the core member as the committer.

Most often though, author and committer names are the same since most of the programmers commit their work by themselves. Also, SubGit works with Git author name, so committer name SubGit translates Git author name, so committer name doesn't mean much for the SVN-to-Git translation process.

Authors Mapping and SubGit Licensing

Authors names don't affect the projects themselves much, neither in SVN nor in Git: it's just part of the project history reflecting who did the job and who committed it and this is what authors mapping feature is intended for - keeping history clean and consistent both on SVN and Git sides. However, if that information doesn't worth to be preserved you can leave it untouched - in such case, SubGit will try to guess authors names using automatic authors mapping. Most probably the project's history won't be exactly the same since authors names will differ in SVN and Git, but the rest commits and revisions information - date and time, revision number, commit message and so on - still the same so it will work well for that matter.

And it works perfectly for one-time import as the import is free and doesn't require a license in contrast to the mirror which does. There are few different kinds of licenses which differ in licensed user number, both SVN and Git users in case of the free license for small teams or only Git users in case of commercial licenses, see the pricing for details. And the fact that the license relies upon users number may cause some troubles if the authors mapping is not set.

Say, you have obtained a free license for up to 10 SVN and Git users. You have mirrored one of your SVN projects to Git repository and you have users committing to SVN and to Git. One of your users, John Doe, makes commits both to SVN project and to the Git repository. In such case SubGit will generate automatic authors mapping that works as follows:

  • when John makes a commit to Git, the commit's author name and email are being set to his Git user.name and user.email - say, John Doe and &lt;johndoe@example.com>.
  • SubGit then translates this commit into SVN revision; since authors mapping is not set, SVN revision author is set to John Doe.
  • when then he commits to SVN project, the new revision author name sets to his SVN username - say, johndoe.
  • SubGit now translates SVN revision into Git commit and, since no authors mapping provided, sets commit's author to johndoe and email to &lt;johndoe@example.com>.

Eventually, John Doe will be counted twice instead of one time since there are different author names in SVN and Git.

Such situation is not possible in case of commercial licenses since they limit the number of Git users only. But there can be another situation when one actual user is being counted twice or even more. The matter is that SubGit counts a number of Git users that make pushes to the mirrored Git repository and it distinguishes users by their names and email addresses - both Git user.name and user.email matter for SubGit in this context. If either of them differs SubGit considers that Git user as new and increases licensed users counter by one. Say, one user has laptop and desktop computers and makes commits from both of them. If there's any difference between Git user.name and user.email settings on those computers, it will lead this particular user will be counted twice. E.g., a user named John Doe works on two workstations and has set Git settings like this:

  • workstation 1:

    [user] name=John Doe email=johndoe@example.com

  • workstation 2:

    [user] name=John M. Doe email=johndoe@example.com

When John pushes to the mirrored Git repository from the first workstation, SubGit increases licensed users counter by one; when then he pushes from the second workstation SubGit counts him as a new user and increases the counter once more since user.name differs. Thus now there are two committers instead of one.

The same applies to the situation when user.name gets changed with time: when new user.name appears, SubGit treats this as if the commits are made by a new user and increases licensed users counter by one. That's why it's especially important to set correct user.name and user.email prior to establish SVN to Git mirror.

...

Info
titleAuthors mapping affects licensing

Note, that SubGit uses authors names to count licensed users, see Licensing manual for details.

Configuration options



There are two configuration options that relate to authors:

...