DESCRIPTION

Update tracking branch when using "Push..." wizard

Bug: 317411
Change-Id: I5bd91de15770ac63767605f0162fa4d9f3a96300


COMMENTS

author: Brenden Conley
date: 2012-12-09 12:44:01.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3815/ 

-------------------------------------
author: Brenden Conley
date: 2012-12-09 13:01:02.000000000

Patch Set 1: I would prefer that you didn't submit this

Build Unstable 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3815/ : UNSTABLE

-------------------------------------
author: Juliet Cantu
date: 2012-12-09 14:14:05.000000000

Patch Set 1: I would prefer that you didn't submit this

Isn't this a bit more complicated? If defined you should use and update the push spec, but if there is not push spec we use the fetch spec? I.e. our fetch spec could be refs/heads/master but our push spec would be refs/for/master.

-------------------------------------
author: Juliet Cantu
date: 2012-12-09 14:17:27.000000000

Patch Set 1:

s/i.e/e.g/

-------------------------------------
author: Danika Greer
date: 2012-12-09 14:41:58.000000000

Patch Set 1:

It's not about the push specs, it's about the third argument to findRemoteRefUpdatesFor, which is used for this:

	 xxx@xxx.xxx fetchSpecs
	 *            fetch specifications used for finding localtracking refs. May
	 *            be null or empty collection.

They are only used for calculating the tracking refs to update, i.e. in a typical configuration the fetch refspec is defined like this:

[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*

Which results in e.g. refs/remotes/origin/master being updated when pushing to refs/heads/master.

Or maybe I misunderstood your question?

-------------------------------------
author: Juliet Cantu
date: 2012-12-09 19:21:44.000000000

Patch Set 1:

I'm not sure who misunderstood, but I just want to make
sure that when the push refspec is used, there should be no update of tracking refs, e.g:

[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*
  push = +refs/heads/*:refs/remotes/origin/q/*

-------------------------------------
author: Danika Greer
date: 2012-12-10 10:13:02.000000000

Patch Set 1:

With this change, tracking refs will only be updated when the right part of a push spec matches the left part of a fetch spec.

In your example, e.g. when the local refs/heads/master is pushed to refs/remotes/origin/q/master on the remote (because of the push spec), transport checks if refs/remotes/origin/q/master is contained in the left part of the passed fetch spec. In this case, it isn't, so no tracking ref is updated.

The push spec in the example is a bit strange as the right part is a funny ref to push to on the remote. Another example would be a push spec of "refs/heads/*:refs/heads/q/*". So when pushing "master" to "q/master", the tracking ref "origin/q/master" would be updated, which is correct.

Basically it should behave the same way as if a fetch was executed right afterward the push.

-------------------------------------
author: Juliet Cantu
date: 2012-12-15 13:34:04.000000000

Patch Set 1: Looks good to me, but someone else must approve; IP review completed



-------------------------------------
author: Juliet Cantu
date: 2012-12-16 09:25:43.000000000

Patch Set 1: Looks good to me, approved



-------------------------------------
author: Brenden Conley
date: 2012-12-16 09:36:23.000000000

Patch Set 1: No score

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3842/ 

-------------------------------------
author: Brenden Conley
date: 2012-12-16 09:49:37.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3842/ : SUCCESS

-------------------------------------
author: Juliet Cantu
date: 2012-12-16 12:58:26.000000000

Change has been successfully merged into the git repository.

-------------------------------------
