Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349844

Summary: [server][git] Allow changing Git user for a cloned repo
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Project Inbox <e4.orion-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: malgorzata.tomczyk, Szymon.Brandys, tomasz.zarna
Version: 0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2011-06-20 11:50:34 EDT
Using Orion I201106171530 on orion.eclipse.org:

1. Create a new user account in Orion.
2. Clone an existing Git repo (I used my github repo: git@github.com:mamacdon/mamacdon.github.com.git )
3. Make a change and commit. I see the author name/email as "admin (admin@localhost)".
4. Go to the profile page and change the Git name & email to something else.
5. Commit again -- the author is still "admin (admin@localhost)"

You have to clone the repository again to make it use the new user info.
I would like to be able to change the user for a repo that was already created.

Also, it might make sense to prompt for Git user info when the first repository is created/cloned, since people are more likely to discover the Repos page before the Profile page.
Comment 1 Tomasz Zarna CLA 2011-06-27 06:03:14 EDT
(In reply to comment #0)
> 1. Create a new user account in Orion.
> 2. Clone an existing Git repo (I used my github repo:
> git@github.com:mamacdon/mamacdon.github.com.git )
> 3. Make a change and commit. 

I think we could ask the user to provide the name/email here, at first commit attempt, if they're not in the profile.

> I see the author name/email as "admin (admin@localhost)".

We should not fallback to these.
Comment 2 Tomasz Zarna CLA 2011-06-27 06:10:40 EDT
Workaround: In 4. open "Repository configuration" for the clone[1] and provide user.name and user.email of your choice.

[1] Just click on the clone in Repositories page.
Comment 3 Szymon Brandys CLA 2011-06-27 06:22:03 EDT
(In reply to comment #0)
> Using Orion I201106171530 on orion.eclipse.org:
> 
> 1. Create a new user account in Orion.
> 2. Clone an existing Git repo (I used my github repo:
> git@github.com:mamacdon/mamacdon.github.com.git )
> 3. Make a change and commit. I see the author name/email as "admin
> (admin@localhost)".
> 4. Go to the profile page and change the Git name & email to something else.
> 5. Commit again -- the author is still "admin (admin@localhost)"

The name and mail in the profile are "Defaults used to configure clones". So changing them for existing clones does not make sense.

> You have to clone the repository again to make it use the new user info.
> I would like to be able to change the user for a repo that was already created.

To change name/mail you should open the clone details in the repo view and modify user.name and user.mail properties as you would do in the console.

> Also, it might make sense to prompt for Git user info when the first repository
> is created/cloned, since people are more likely to discover the Repos page
> before the Profile page.

See bug Bug 350012.
Comment 4 Szymon Brandys CLA 2011-06-27 06:38:03 EDT
Since you are able to change the clone user/mail, I'm marking this bug INVALID. I think there are two issues worth of fixing/discussing:
1) Setting the user/mail, if it is not set yet (bug 350012)
2) Setting the committer name/mail per commit (Bug 350422)