Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:38

Possibly related (same subject, not in this thread)

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
 Thanks. I'll go with the simple way: error out.
OK.
quoted hunk
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???
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help