git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: "Roger C. Soares" <rogersoares@intelinet.com.br>
Cc: git@vger.kernel.org
Subject: Re: [EGIT PATCH] showing commiter and parent commit(s) on the revision detail viewer
Date: Sun, 27 Jan 2008 01:34:10 +0100	[thread overview]
Message-ID: <200801270134.11892.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <1201262529-3306-1-git-send-email-rogersoares@intelinet.com.br>

Hi Roger,

The general idea is ok. Some minor coments though.

>Re: [EGIT PATCH] showing commiter and parent commit(s) on the revision detail viewer
"Show" and final period.

fredagen den 25 januari 2008 skrev Roger C. Soares:
> @@ -221,14 +223,16 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,
>  				if(selection2.length == 1) {
>  					// if the table item is not visible in the UI and it's selected via keyboard
>  					// this listener is called before the listener that sets the item data.
> -					if(selection2[0] == null) {
> +					GitCommitFileRevision revision = (GitCommitFileRevision) selection2[0];
> +					if(revision == null) {
>  						int ix = table.getSelectionIndex();
> -						GitFileRevision revision = (GitFileRevision) fileRevisions.get(ix);
> +						revision = (GitCommitFileRevision) fileRevisions.get(ix);
>  						selection2[0] = revision;
>  					}
> -					setRevisionInfoTextViewers(selection2[0]);
> +					setRevisionInfoTextViewers(revision);
I'm rather allergic to casts, so if we could have only one I'd feel better. Something like

					IFileRevision revision = selection2[0];
					if(revision == null) {
 						int ix = table.getSelectionIndex();
						revision = fileRevisions.get(ix);
 						selection2[0] = revision;
 					}
					setRevisionInfoTextViewers((GitCommitFileRevision)revision);

>  				}
>  
> +
two lines of whitepspace

>  		if (revisionInfo.length() == 0) {
> -			revisionInfo.append("Commit: ");
> +			revisionInfo.append("Commit ID: ");
I prefer just commit. It's shorter and that it is the id is obvious.

> +		revisionInfo.append(formatPersonIdentForRevInfo(commit.getAuthor()));
> +		revisionInfo.append("\nCommiter: ");
Two t's in "Committer"

> +				} catch (IOException e) {
> +					e.printStackTrace();
We should start doing error handling better. But that's a separate chapter. Add a // TODO for now. 
I'll address them one all one one go later, unless someone does it for me.

-- robin

      reply	other threads:[~2008-01-27  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 12:02 [EGIT PATCH] showing commiter and parent commit(s) on the revision detail viewer Roger C. Soares
2008-01-27  0:34 ` Robin Rosenberg [this message]

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=200801270134.11892.robin.rosenberg.lists@dewire.com \
    --to=robin.rosenberg.lists@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=rogersoares@intelinet.com.br \
    /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).