From: Steffen Prohaska Date: Sun, 28 Oct 2007 08:03:16 GMT Subject: Re: [PATCH 5/8] push, send-pack: support pushing HEAD to real ref name Message-ID: In-Reply-To: <7vwst7wvdr.fsf@gitster.siamese.dyndns.org> On Oct 28, 2007, at 8:28 AM, Junio C Hamano wrote: > Steffen Prohaska writes: > >> This teaches "push 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. >> + 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