Re: [PATCH 1/1] Import git-forest
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:27
Jan Engelhardt [off-list ref] writes:
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
+# git-??????
Hmmmm...
+&main();
+
+sub main ()
+{
+ &Getopt::Long::Configure(qw(bundling pass_through));
+
+ &GetOptions(
+ "all" => \$Show_all,
+ "no-color" => sub { %Color = (); },
+ "no-rebase" => sub { $Show_rebase = 0; },
+ "style=i" => \$Style,
+ "sha" => \$With_sha,
+ );
+ if ($Show_all) {
+ unshift(@ARGV, "--all", "HEAD");
+ }
+ &process();
+}This is a Perl script with a curious style. Your subroutines force the "funny" parameter semantics to their callers by using prototypes, but avoid the potential surprises and inconveniences prototypes may cause by using the &name(...) form when they themselves make subroutine calls, i.e. not eating their own dog food. Is it fashionable to make text based tree render these days? How does this compare with the git-graph in the nearby thread? Can they borrow from each other?