DESCRIPTION

Add support for git variables in launchers

This adds git_dir, git_work_tree, git_repo_relative_path and
git_branch. The all work on the selected or named resource, i.e.
$|git_branch] would return the current branch in the (first)
selected project. $|git_branch:org.eclipse.jgit/.project] would
return the current branch of the main jgit repository in the
workbspace.

The code to pick the selected resource is stolen from Chris
Aniszczyk's commit on a similar topic.

Change-Id: Idad98f57440eb3b083ffd1be0f382bdac33963e3
Signed-off-by: Juliet Cantu xxx@xxx.xxx


COMMENTS

author: Juliet Cantu
date: 2011-06-14 22:15:48.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2011-06-14 22:15:51.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/1057/ 

-------------------------------------
author: Juliet Cantu
date: 2011-06-14 22:16:27.000000000

Patch Set 2:

Rebased and reformatted

-------------------------------------
author: Brenden Conley
date: 2011-06-14 22:27:20.000000000

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

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1057/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2011-06-16 19:13:16.000000000

Patch Set 2: No score

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/1081/ 

-------------------------------------
author: Brenden Conley
date: 2011-06-16 19:21:07.000000000

Patch Set 2: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1081/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2011-06-16 22:08:38.000000000

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

(6 inline comments)



Line:85, org.eclipse.egit.ui/src/org/eclipse/egit/ui/variables/GitVariableResolver.java -> style nit: no braces here

Line:130, org.eclipse.egit.ui/src/org/eclipse/egit/ui/variables/GitVariableResolver.java -> typo : s/selectd/selected resource/

Line:1299, org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties -> is the trailing ":" a typo ? 
${git_dir:

Shouldn't we better use a parameter here:
... non-existing resource : {0}

Line:10, /COMMIT_MSG -> should also mention index_path

Do you have a use case in mind why to expose index_path as a variable ?

typo: s/The all work/They all work/

Line:11, /COMMIT_MSG -> where does this funny syntax come from : $|git_branch]

I expected to see curly braces instead : ${git_branch}

Line:14, /COMMIT_MSG -> typo: s/workbspace/workspace/

-------------------------------------
author: Juliet Cantu
date: 2011-06-16 22:53:15.000000000

Patch Set 2: (4 inline comments)



Line:85, org.eclipse.egit.ui/src/org/eclipse/egit/ui/variables/GitVariableResolver.java -> Done

Line:130, org.eclipse.egit.ui/src/org/eclipse/egit/ui/variables/GitVariableResolver.java -> Done

Line:1299, org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties -> Yes, there should be a parameter here. Done.

Line:10, /COMMIT_MSG -> Done. 
The index_path was an idea that sounded better at the time. Dropped.

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