From: Junio C Hamano Date: Sat, 21 Apr 2012 04:18:12 GMT Subject: Re: [PATCH] Add column layout skeleton and git-column Message-ID: In-Reply-To: <1334977648-872-1-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > Thanks. I'll go with the simple way: error out. OK. > diff --git a/column.c b/column.c > new file mode 100644 > index 0000000..416a440 > --- /dev/null > +++ b/column.c > @@ -0,0 +1,169 @@ > +#include "cache.h" > +#include "column.h" > +#include "string-list.h" > +#include "parse-options.h" > + > +/* Display without layout when not enabled */ > +static void display_plain(const struct string_list *list, > + const char *indent, const char *nl) > +{ > + int i; > + > + for (i = 0; i < list->nr; i++) > + printf("%s%s%s", indent, list->items[i].string, nl); > +} > + > +void print_columns(const struct string_list *list, unsigned int colopts, > + const struct column_options *opts) > +{ > + struct column_options nopts; > + > + if (!list->nr) > + return; > + assert(COL_ENABLE(colopts) != COL_AUTO); Am I looking at the correct version? Somehow I thought you eliminated this confusingly named macro in the previous round. Two steps forward, one step backward???