Re: [PATCH v2 01/10] ref-filter: implement %(if), %(then), and %(else) atoms

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 01/10] ref-filter: implement %(if), %(then), and %(else) atoms

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:06:48

Karthik Nayak [off-list ref] writes:
quoted hunk
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -134,9 +134,17 @@ align::
 	`<position>` is either left, right or middle, default being
 	left and `<width>` is the total length of the content with
 	alignment. If the contents length is more than the width then
-	no alignment is performed. If used with '--quote' everything
-	in between %(align:...) and %(end) is quoted, but if nested
-	then only the topmost level performs quoting.
+	no alignment is performed.
+
+if::
+	Used as %(if)..%(then)..(%end) or %(if)..%(then)..%(else)..%(end).
I guess you forgot to replace .. with ... (I think you agreed with me
that it was better).
quoted hunk
@@ -69,10 +72,16 @@ struct contents {
 	struct object_id oid;
 };
 
+struct if_then_else {
+	unsigned int then_atom : 1,
+		else_atom : 1,
Maybe "then_atom_seen" and "else_atom_seen" would be better names. Or
maybe they'd be too long, I leave it up to you.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: [PATCH v2 01/10] ref-filter: implement %(if), %(then), and %(else) atoms

From: Karthik Nayak <hidden>
Date: 2016-06-15 23:06:49

On Fri, Oct 9, 2015 at 12:49 AM, Matthieu Moy
[off-list ref] wrote:
Karthik Nayak [off-list ref] writes:
quoted
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -134,9 +134,17 @@ align::
      `<position>` is either left, right or middle, default being
      left and `<width>` is the total length of the content with
      alignment. If the contents length is more than the width then
-     no alignment is performed. If used with '--quote' everything
-     in between %(align:...) and %(end) is quoted, but if nested
-     then only the topmost level performs quoting.
+     no alignment is performed.
+
+if::
+     Used as %(if)..%(then)..(%end) or %(if)..%(then)..%(else)..%(end).
I guess you forgot to replace .. with ... (I think you agreed with me
that it was better).
Oops! I missed this.
quoted
@@ -69,10 +72,16 @@ struct contents {
      struct object_id oid;
 };

+struct if_then_else {
+     unsigned int then_atom : 1,
+             else_atom : 1,
Maybe "then_atom_seen" and "else_atom_seen" would be better names. Or
maybe they'd be too long, I leave it up to you.
They do describe the usage in a better way, so why not.

-- 
Regards,
Karthik Nayak
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help