git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Import git-forest

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2008, 21:49 UTC
Message-ID
<7vve3053n7.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<9aca54e6e106be3f26ae289606b9a47a91806d54.1207169779.git.jengelh@computergmbh.de>
Jan Engelhardt <jengelh@computergmbh.de> writes:
    Content-Type: TEXT/PLAIN; charset=ISO-8859-1
> +#	git-??????
Hmmmm...
Show 18 quoted lines
> +&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?

Previous: Jan EngelhardtNext: Jan Engelhardt
Message 3 of 8 in “git-forest 20080402”
  1. git-forest 20080402Jan Engelhardt, Apr 2, 2008
  2. 1/1 Import git-forestJan Engelhardt, Apr 2, 2008
  3. Junio C HamanoApr 2, 2008
  4. Jan EngelhardtApr 3, 2008
  5. Junio C HamanoApr 3, 2008
  6. Jan EngelhardtApr 3, 2008
  7. Jeff KingApr 3, 2008
  8. Jeff KingApr 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.