Thread (1 message) 1 message, 1 author, 2022-01-05

Re: [PATCH v5 1/2] name-rev: deprecate --stdin in favor of --annotate-stdin

From: Junio C Hamano <hidden>
Date: 2022-01-05 20:07:16

"John Cai via GitGitGadget" [off-list ref] writes:
+	altogether.
++
+For example:
++
+--
+	$ cat sample.txt
+
+	An abbreviated revision 2ae0a9cb82 will not be substituted.
+	The full name after substitution is 2ae0a9cb8298185a94e5998086f380a355dd8907,
+	while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
+
+	$ git name-rev --annotate-stdin <sample.txt
+
+	An abbreviated revision 2ae0a9cb82 will not be substituted.
+	The full name after substitution is 2ae0a9cb8298185a94e5998086f380a355dd8907 (master),
+	while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
+
+	$ git name-rev --name-only --annotate-stdin <sample.txt
+
+	An abbreviated revision 2ae0a9cb82 will not be substituted.
+	The full name after substitution is master,
+	while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
+--
I compared the output from the earlier ones with this one; the way
the displayed sample was shown in the previous rounds looked better,
at least in HTML pages.  The earlier ones used "listingblock" in
which the sample is contained in a <pre>formatted <code> block, but
this one ends up in a series of one-<div>-per-paragraph.
-	if (transform_stdin) {
-		char buffer[2048];
+	if (annotate_stdin) {
+		struct strbuf sb = STRBUF_INIT;
This will break the compilation at this step.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help