<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/push.c, branch v2.33.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.33.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.33.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-06-02T01:12:03Z</updated>
<entry>
<title>push: don't get a full remote object</title>
<updated>2021-06-02T01:12:03Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7088ce71918a0f9fde2ceb421d4b332888a202c7'/>
<id>urn:sha1:7088ce71918a0f9fde2ceb421d4b332888a202c7</id>
<content type='text'>
All we need to know is that their names are the same.

Additionally this might be easier to parse for some since
remote_for_branch is more descriptive than remote_get(NULL).

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: only check same_remote when needed</title>
<updated>2021-06-02T01:12:02Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0c91cffde8477ababb5163180f08e29da54db3e'/>
<id>urn:sha1:e0c91cffde8477ababb5163180f08e29da54db3e</id>
<content type='text'>
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: remove trivial function</title>
<updated>2021-06-02T01:12:02Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5b09cf771ea3c340335aeff501ebec342f78aa4'/>
<id>urn:sha1:c5b09cf771ea3c340335aeff501ebec342f78aa4</id>
<content type='text'>
It's a single line that is used in a single place, and the variable has
the same name as the function.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: remove redundant check</title>
<updated>2021-06-02T01:12:02Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1afd78fb5c29b8ad95de072bb8a0edacc69db61a'/>
<id>urn:sha1:1afd78fb5c29b8ad95de072bb8a0edacc69db61a</id>
<content type='text'>
If fetch_remote is NULL (i.e. the branch remote is invalid), then it
can't possibly be same as remote, which can't be NULL.

The check is redundant, and so is the extra variable.

Also, fix the Yoda condition: we want to check if remote is the same as
the branch remote, not the other way around.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: factor out the typical case</title>
<updated>2021-06-02T01:12:02Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f934725f7597366c981b72be6597124e2c21a77'/>
<id>urn:sha1:1f934725f7597366c981b72be6597124e2c21a77</id>
<content type='text'>
Only override dst on the odd case.

This allows a preemptive break on the `simple` case.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: get rid of all the setup_push_* functions</title>
<updated>2021-06-02T01:12:02Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0add899baf5a9ee478659821327db719ce74454a'/>
<id>urn:sha1:0add899baf5a9ee478659821327db719ce74454a</id>
<content type='text'>
Their code is much simpler now and can move into the parent function.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: trivial simplifications</title>
<updated>2021-06-02T01:12:01Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d371a9ef4cfc4610989b0a3d71c79cbe19e0073a'/>
<id>urn:sha1:d371a9ef4cfc4610989b0a3d71c79cbe19e0073a</id>
<content type='text'>
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: make setup_push_* return the dst</title>
<updated>2021-06-02T01:12:01Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=00458dc5f191f52ef965ca7185b739e8c800b7cb'/>
<id>urn:sha1:00458dc5f191f52ef965ca7185b739e8c800b7cb</id>
<content type='text'>
All of the setup_push_* functions are appending a refspec. Do this only
once on the parent function.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: only get the branch when needed</title>
<updated>2021-06-02T01:12:01Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65c63a005434306e7c064eb463ff1f61de56d38e'/>
<id>urn:sha1:65c63a005434306e7c064eb463ff1f61de56d38e</id>
<content type='text'>
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: factor out null branch check</title>
<updated>2021-06-02T01:12:01Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-31T19:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cc16f95d212d8e0bba07ddfb82aaf416dc4df1c2'/>
<id>urn:sha1:cc16f95d212d8e0bba07ddfb82aaf416dc4df1c2</id>
<content type='text'>
No need to do it in every single function.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
