git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH] Create a debugging tool "jgit rebuild-commitgraph"
Date: Mon, 16 Mar 2009 13:13:33 -0700	[thread overview]
Message-ID: <20090316201333.GR22920@spearce.org> (raw)
In-Reply-To: <200903162109.46653.robin.rosenberg.lists@dewire.com>

Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> måndag 16 mars 2009 15:44:50 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> > Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> > > 
> > > I'd hate to put such a dangerous thing in the list of normal tools. If the user
> > > want to shoot him/her-self in the foot they should get a license first.
> > 
> > How about squashing this in?
> 
> Does it have to be a utility accessible through the pgm interface? Why not 
> just run ut as java org.spearce.jgit.pgm.debug.RebuildCommitGraph ? 

Yea, that's fine too.  Then its "debug-rebuildcommitgraph" I think,
but that's still a reasonable name for it.
 
> >  	@Override
> >  	protected void run() throws Exception {
> > +		if (!really && !db.getAllRefs().isEmpty()) {
> > +			final StringBuilder m = new StringBuilder();
> > +			m.append("fatal: ");
...
> > +			System.err.println(m);
> > +			throw die("Need approval to destroy current repository");
> 
> What's wrong with old fashioned '+' ? (which just translated to exactly this series
> of StringBuilder calls anyway?

Nothing, other than formatting.  + line wraps somewhat ugly sometimes
under the Eclipse formatter.  Using StringBuilder with one append per
line and a short name for the StringBuilder variable makes it easier
to format.

-- 
Shawn.

  reply	other threads:[~2009-03-16 20:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 14:35 [JGIT PATCH] Create a debugging tool "jgit rebuild-commitgraph" Shawn O. Pearce
2009-03-13 14:49 ` Johannes Schindelin
2009-03-13 14:52   ` Shawn O. Pearce
2009-03-15 11:34 ` Robin Rosenberg
2009-03-16 14:44   ` Shawn O. Pearce
2009-03-16 20:09     ` Robin Rosenberg
2009-03-16 20:13       ` Shawn O. Pearce [this message]
2009-03-16 23:58         ` [JGIT PATCH v3] Create a debugging tool "jgit debug-rebuild-commitgraph" 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=20090316201333.GR22920@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.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).