Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348318

Summary: Provide status CLI command
Product: [Technology] JGit Reporter: François Rey <eclipse.org>
Component: JGitAssignee: François Rey <eclipse.org>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: caniszczyk, fps2, tomasz.zarna
Version: unspecifiedKeywords: noteworthy
Target Milestone: 2.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 365439    
Attachments:
Description Flags
Patch adding CLI status command
none
New version of the patch, previous one had an error
none
New patch version - errors in eclipse are gone
none
ICQ submission none

Description François Rey CLA 2011-06-05 06:33:46 EDT
Provide a command similar to native 'git status'.
Comment 1 François Rey CLA 2011-06-05 06:39:13 EDT
Created attachment 197354 [details]
Patch adding CLI status command

This is a first simple implementation.
It's been helpful in the diagnostic of bug #347885.
I'm the sole writer and owner of this code, and hereby donate it to eclipse under EDL 1.0, the jgit license.
Comment 2 François Rey CLA 2011-06-05 06:49:24 EDT
Note that my changes to CLIText.properties are not mingled with other lines in order to respect alphabetical order.
If that's really important we can certainly apply sorting to my changes. However it's nice to keep them together because some padding alignment needs to be done across some of them. If later on one needs to change a label, other labels will need to be changed accordingly so that padding is respected.
I also kept my changes to CLIText.java together instead of sorting. It's less important to keep them together in that file, but did so just because I kept them together in the twin properties file.
Finally, it would be nice to also print the current branch like native 'git status'. However being new to git/egit/jgit I wasn't sure of certain corner cases (headless state, etc.) so I preferred not adding that feature. I'm sure someone else can easily add this.
Comment 3 François Rey CLA 2011-06-05 06:52:10 EDT
Reopening, not sure why this has been save as CLOSED INVALID, I did not mean that.
Comment 4 François Rey CLA 2011-06-05 07:10:13 EDT
Created attachment 197355 [details]
New version of the patch, previous one had an error
Comment 5 François Rey CLA 2011-06-05 08:35:02 EDT
Created attachment 197358 [details]
New patch version - errors in eclipse are gone

Previous patch compiled fine with mvn.
This one just removes unused imports eclipse complained about.
Comment 6 François Rey CLA 2011-06-07 20:55:00 EDT
Created Gerrit change
http://egit.eclipse.org/r/3682
Comment 7 François Rey CLA 2012-04-30 14:50:09 EDT
I've created a new version of this change, the status CLI now:
- prints the current branch
- prints unmerged count and files
Unfortunately, due to some difficulties when migrating my gerrit user to the new eclipse git/gerrit server, pushing it again gave it a new home:
https://git.eclipse.org/r/#/c/5765/
ChangeId is still the same though...
For reference, old one is still at:
http://egit.eclipse.org/r/3682
I'm the sole writer and owner of this code, and hereby donate it to eclipse under EDL 1.0,
Comment 8 Robin Rosenberg CLA 2012-09-06 18:22:34 EDT
Created attachment 220816 [details]
ICQ submission
Comment 9 Chris Aniszczyk CLA 2012-11-26 23:16:59 EST
This was merged into master.