Bug 348318 - Provide status CLI command
Summary: Provide status CLI command
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.2   Edit
Assignee: François Rey CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 365439
  Show dependency tree
 
Reported: 2011-06-05 06:33 EDT by François Rey CLA
Modified: 2012-11-26 23:16 EST (History)
3 users (show)

See Also:


Attachments
Patch adding CLI status command (7.24 KB, patch)
2011-06-05 06:39 EDT, François Rey CLA
no flags Details | Diff
New version of the patch, previous one had an error (7.24 KB, patch)
2011-06-05 07:10 EDT, François Rey CLA
no flags Details | Diff
New patch version - errors in eclipse are gone (7.17 KB, patch)
2011-06-05 08:35 EDT, François Rey CLA
no flags Details | Diff
ICQ submission (25.29 KB, patch)
2012-09-06 18:22 EDT, Robin Rosenberg CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.