Re: [PATCH 5/8] push, send-pack: support pushing HEAD to real ref name
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Oct 28, 2007, 08:03 UTC
- Message-ID
- <C83C1B1F-99A9-4F47-9C1A-55170CF61338@zib.de>
- In-Reply-To
- <7vwst7wvdr.fsf@gitster.siamese.dyndns.org>
On Oct 28, 2007, at 8:28 AM, Junio C Hamano wrote:
Show 8 quoted lines
> Steffen Prohaska <prohaska@zib.de> writes: > >> This teaches "push <remote> HEAD" to resolve HEAD on the local >> side to its real ref name, e.g. refs/heads/master, and then >> use the real ref name on the remote side to search a matching >> remote ref. > > This probably is a good idea.
I'll think about Daniel's suggestion of implementing it differently.
Show 5 quoted lines
>> + if (real_name) {
>> + free(real_name);
>> + }
>
> Excess and unnecessary brace pair.When are excess and unnecessary braces acceptable? Is
if (something) {
printf("text %d"
"more text %d"
"and even more %d\n"
, a, b, c);
}ok? Or should I avoid braces there, too?
Steffen