git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: git@vger.kernel.org, jnareb@gmail.com, kzak@redhat.com
Subject: Re: [PATCH 1/1] Import git-forest
Date: Wed, 02 Apr 2008 14:49:00 -0700	[thread overview]
Message-ID: <7vve3053n7.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <9aca54e6e106be3f26ae289606b9a47a91806d54.1207169779.git.jengelh@computergmbh.de> (Jan Engelhardt's message of "Wed, 2 Apr 2008 22:58:15 +0200")

Jan Engelhardt <jengelh@computergmbh.de> 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?

  reply	other threads:[~2008-04-02 22:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02 20:58 [announce+patch] git-forest 20080402 Jan Engelhardt
2008-04-02 20:58 ` [PATCH 1/1] Import git-forest Jan Engelhardt
2008-04-02 21:49   ` Junio C Hamano [this message]
2008-04-03  7:27     ` [PATCH] Import git-forest (20080403) Jan Engelhardt
2008-04-03  8:39       ` Junio C Hamano
2008-04-03  9:03         ` Jan Engelhardt
2008-04-03 10:03         ` Jeff King
2008-04-03 10:14 ` [announce+patch] git-forest 20080402 Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vve3053n7.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jengelh@computergmbh.de \
    --cc=jnareb@gmail.com \
    --cc=kzak@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).