Thread (1 message) 1 message, 1 author, 2018-08-22

Re: [PATCH] rev-list: make empty --stdin not an error

From: Junio C Hamano <hidden>
Date: 2018-08-22 21:41:31

Junio C Hamano [off-list ref] writes:
I think this makes sense, but if we were to give a dedicated field
in the revs structure, can we lose the local variable at the same
time, I wonder?

Thanks.
Well, the answer to "can we" is always "yes"; what I was truly
wondering was if it makes sense to do so.  I am on the fence.
quoted
diff --git a/revision.c b/revision.c
index de4dce600d..4d53102cf4 100644
--- a/revision.c
+++ b/revision.c
@@ -2369,6 +2369,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
 				}
 				if (read_from_stdin++)
 					die("--stdin given twice?");
+				revs->read_from_stdin = 1;
 				read_revisions_from_stdin(revs, &prune_data);
 				continue;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help