Hi Steven,

I think this is the way it's supposed to work. In Git terms, when I do
a "push", I'm not implying that I am the author of any commits that
I'm pushing. I may have gotten all the commits from somewhere else
entirely.

For example, when I clone the gitorious mainline repository into my
own personal clone, most of the commits are authored by Marius,
Christian, Thomas, etc, even though it's my personal clone. I like to
periodically keep my clone in sync with the upstream mainline, so I
periodically do a pull from the upstream remote, and then push to my
personal clone. When I push, the authorships don't change. So what
you're discussing really works against the idea of how Git is designed
to work - in effect, you'd be rewriting the historical authorship of
any commits that weren't directly authored by these freelancers.

(A follow-up question might be: "If I can set *any* value in my
"user.email" git configuration, what prevents me from completely
faking the authorship of some of my commits?" The reality is that for
normal Git commits, you could put anyone's email address as the
author. However, Git does provide the ability to GPG-sign commits. If
Git authorship is ever in question, it's important to only really rely
on the GPG-signed information, and never on what names appear to have
been pushed to some random Git repo.)

In your freelancing situation, you might be able to set up set up
repository hooks to enforce that users can only push commits where the
"Author" value only matches their Gitorious username. Technically this
would meet your request, but here are the problems with it:

This has the same problem with rewriting historical authorship as I
mentioned above. For example, what happens when they try to import
some open-source code from a public open-source project? Unless you
use git submodules, your devs would have to rewrite every commit to
make it appear as though they've authored each one. You'd lose the
valuable Git authorship metadata, and if your code ever went public
(intentionally or otherwise ;) the original upstream developers might
be sad to see that you're rewriting the authorship on their commits.

This also has problems when your devs simply cherry-pick a fellow
co-worker's commit onto another branch. The original Git cherry-pick
mechanism preserves authorship, but when you enforce something like
what you're describing, the cherry-picking developer must mangle the
commit to appear to be come from a different author. This will become
more confusing as the projects grow and you have more branches to
maintain.

If at all possible, I would try to enforce this via social norms
(talking to the devs who are doing the multiple-email thing) rather
than reaching for technical norms. Git's user.email is available to
configure per-repository, and maybe these particular developers just
don't know how to do that?

- Ken


On Thu, Apr 11, 2013 at 8:48 AM, Steven Deal <stevend...@gmail.com> wrote:
> I feel this may be more a git issue and outside the role of gitorious. Does
> gitorious support any enforcement that a user's git user.email configuration
> matches the email address associated with their account? I certainly
> understand a 'why would anyone care?' But from what I've seen just
> experimenting with my new install of gitorious, if I set my user.email to
> match my gitorious account, it identifies the commit with my account (shows
> the avatar etc.); but, if I change the email address and push a new change,
> it treats it as a commit by another user (who happens to have the same name
> I suppose). Given I work with freelance developers who may at anytime be
> working for multiple clients and have as many email addresses, I wish there
> was a way to use the name/email address that has been setup in gitorious for
> the ssh key that's pushing a change.
>
> --
> --
> To post to this group, send email to gitorious@googlegroups.com
> To unsubscribe from this group, send email to
> gitorious+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Gitorious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gitorious+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitorious+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to