From: "Shawn O. Pearce" <spearce@spearce•org>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>
Cc: Yann Simon <yann.simon.fr@gmail•com>,
Robin Rosenberg <robin.rosenberg.lists@dewire•com>,
git <git@vger•kernel.org>
Subject: Re: [PATCH JGIT] Compute the author/commiter name and email from the git configuration
Date: Tue, 3 Feb 2009 16:59:07 -0800 [thread overview]
Message-ID: <20090204005907.GA23383@spearce.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0902040019030.9822@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx•de> wrote:
> On Tue, 3 Feb 2009, Shawn O. Pearce wrote:
> > Yann Simon <yann.simon.fr@gmail•com> wrote:
> > > + username = System.getProperty(gitVariableKey);
> >
> > Shouldn't that be System.getenv()?
>
> According to
>
> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#getenv(java.lang.String)
>
> getenv() is deprecated. However, in later editions (Java5 and later, to
> be precise), that deprecation seems to be lifted...
Yea, funny thing about that. In 1.3 getenv() worked. In 1.4 they
not only marked it deprecated, they changed the method to always
throw a RuntimeException. Java developers were outraged, so in 1.5
(aka Java 5) they added it back in as a supported method.
JGit only runs on Java 5 and later. So we're safe, we don't have
to worry about this #@(!@(! method and the 1.4 mistake.
Hell, Java 6 added an executable flag to java.io.File. This is
a rather funny concept on Windows where executablity is based on
file name and not a "mode bit", but its in the Java 6 S2SE API.
At least even on Windows getenv makes sense and provides data.
--
Shawn.
next prev parent reply other threads:[~2009-02-04 1:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 21:13 [PATCH JGIT] Compute the author/commiter name and email from the git configuration Yann Simon
2009-02-03 23:13 ` Shawn O. Pearce
2009-02-03 23:20 ` Johannes Schindelin
2009-02-04 0:55 ` Robin Rosenberg
2009-02-04 1:01 ` Shawn O. Pearce
2009-02-04 0:59 ` Shawn O. Pearce [this message]
2009-02-04 1:04 ` Robin Rosenberg
2009-02-04 8:14 ` Yann Simon
2009-02-04 8:42 ` Yann Simon
2009-02-04 8:08 ` Yann Simon
-- strict thread matches above, loose matches on Subject: below --
2009-02-04 12:28 Yann Simon
2009-02-04 17:36 ` Shawn O. Pearce
2009-02-05 9:27 Yann Simon
2009-02-05 10:44 Yann Simon
2009-02-05 15:38 ` Shawn O. Pearce
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=20090204005907.GA23383@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=robin.rosenberg.lists@dewire$(echo .)com \
--cc=yann.simon.fr@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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