Re: [PATCH 1/4] Add history graph API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 06, 2008 at 10:06:24PM +0100, Johannes Schindelin wrote:
> 
> On Sun, 6 Apr 2008, Adam Simpkins wrote:
> 
> > +/* Defined in commit.h */
> > +struct commit;
> > +/* Defined in strbuf.h */
> > +struct strbuf;
> 
> You do not need those.

I added them so that graph.h can be included without including any
other header files first.  They can be taken out if we assume that all
users of graph.h will include commit.h and strbuf.h first.

> Apart from that, it looks very, very clean to me.  (Except maybe the 
> prefix ++ that could have been a postfix ++ in the line before, but that 
> is just me.)

Sorry, force of habit.  I tried to remember to use postfix in most
places, but I guess I forgot in that place.

I do most of my programming in C++, which allows crazy things like
defining prefix and postfix ++ and -- operators on classes.  When
using these on classes, the prefix operator is normally more efficient
than the postfix version, so I'm just in the habit of using prefix
increment everywhere.  This can easily be changed if postfix is
preferred for the git coding style.

-- 
Adam Simpkins
adam@xxxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux