git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add column layout skeleton and git-column

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 21, 2012, 04:18 UTC
Message-ID
<xmqqlilpzpiz.fsf@junio.mtv.corp.google.com>
In-Reply-To
<1334977648-872-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>  Thanks. I'll go with the simple way: error out.
OK.
Show 29 quoted lines
> 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???

Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 7 of 17 in “Column display”
  1. 0/9 Column displayNguyễn Thái Ngọc Duy, Apr 13, 2012
  2. 1/9 Add column layout skeleton and git-columnNguyễn Thái Ngọc Duy, Apr 13, 2012
  3. Junio C HamanoApr 16, 2012
  4. Add column layout skeleton and git-columnNguyễn Thái Ngọc Duy, Apr 16, 2012
  5. Junio C HamanoApr 16, 2012
  6. Add column layout skeleton and git-columnNguyễn Thái Ngọc Duy, Apr 21, 2012
  7. Junio C HamanoApr 21, 2012
  8. Add column layout skeleton and git-columnNguyễn Thái Ngọc Duy, Apr 21, 2012
  9. Junio C HamanoApr 21, 2012
  10. 2/9 Stop starting pager recursivelyNguyễn Thái Ngọc Duy, Apr 13, 2012
  11. 3/9 column: add columnar layoutNguyễn Thái Ngọc Duy, Apr 13, 2012
  12. 4/9 column: add dense layout supportNguyễn Thái Ngọc Duy, Apr 13, 2012
  13. 5/9 help: reuse print_columns() for help -aNguyễn Thái Ngọc Duy, Apr 13, 2012
  14. 6/9 branch: add --columnNguyễn Thái Ngọc Duy, Apr 13, 2012
  15. 7/9 status: add --columnNguyễn Thái Ngọc Duy, Apr 13, 2012
  16. 8/9 column: support piping stdout to external git-column processNguyễn Thái Ngọc Duy, Apr 13, 2012
  17. 9/9 tag: add --columnNguyễn Thái Ngọc Duy, Apr 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.