Re: [JGIT PATCH] Create a debugging tool "jgit rebuild-commitgraph"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg <robin.rosenberg.lists@xxxxxxxxxx> wrote:
> måndag 16 mars 2009 15:44:50 skrev "Shawn O. Pearce" <spearce@xxxxxxxxxxx>:
> > Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux