DESCRIPTION

Optimize GitScopeOperation by replacing |= with ||.

The use of compound assignment operators such as |= may result in
cleaner code but it's not lazy as the || operator. This patch replaces
|= with proper use of || in order to avoid unnecessary execution time.

Change-Id: If3fb180a170a8e8e0585484024569b5ef8705427
Signed-off-by: Hamza Perez xxx@xxx.xxx

COMMENTS

author: Kade Schaefer
date: 2012-08-06 08:43:10.000000000

Patch Set 1:

As a self-employed freelance I'm the sole writer and owner of this code, and hereby donate it to eclipse under EPL.

-------------------------------------
author: Danika Greer
date: 2012-08-06 08:46:12.000000000

Patch Set 1: (1 inline comment)

One suggestion, otherwise looks good.

Line:76, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/GitScopeOperation.java -> Could you please extract that block into a separate method, e.g. shouldShowPrompt? Then you don't have to use break but can just `return true`.

-------------------------------------
author: Juliet Cantu
date: 2012-08-06 16:06:41.000000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)



Line:76, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/GitScopeOperation.java -> or just return super.prompt... when hasChanged is true
and return false when he comes out of the loop. In either case
avoid the unneeded extra boolean and shorter logic

-------------------------------------
author: Juliet Cantu
date: 2012-08-06 16:12:14.000000000

Patch Set 1:

Change the title to something that is easier to understand

-------------------------------------
