Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pride status command #44

Closed
lptr opened this issue May 9, 2014 · 5 comments
Closed

Add pride status command #44

lptr opened this issue May 9, 2014 · 5 comments
Milestone

Comments

@lptr
Copy link
Contributor

lptr commented May 9, 2014

Two modes:

  • display list of modules highlighting ones with changes
  • display list of modules with individual changed files
@lptr lptr modified the milestone: 0.6.2 May 9, 2014
@fondasimone
Copy link
Contributor

tl; dr:

  1. fast and clean way to see what repos have changes and on what branches are they.
  2. fast and clean way to see what i still need to commit/push

Given:

fonda@verypro ~/work/koi-2 > pride do git -c color.status=always status -bs

/Users/fonda/work/koi-2/boxfish-editor-loader $ git -c color.status=always status -bs
## notdemoanymore...origin/notdemoanymore

/Users/fonda/work/koi-2/boxfish-koi-loader $ git -c color.status=always status -bs
## master...origin/master

/Users/fonda/work/koi-2/boxfish-koi-playground $ git -c color.status=always status -bs
## master...origin/master
 M src/main/ts/prezi/koi/playground/Playground.ts
?? src/main/ts/prezi/koi/playground/NewFile.ts

/Users/fonda/work/koi-2/boxfish-koi-widgets $ git -c color.status=always status -bs
## master...origin/master [ahead 1]

Imho it would be also useful to:

  • show a synthetic view of changes across all modules (useful when you have a ton of lions in your pride):
fonda@verypro ~/work/koi-2 > pride status
boxfish-editor-loader on branch: notdemoanymore...origin/notdemoanymore
boxfish-koi-loader on branch: master...origin/master
boxfish-koi-playground on branch: master...origin/master
    M src/main/ts/prezi/koi/playground/Playground.ts
    ?? src/main/ts/prezi/koi/playground/NewFile.ts
boxfish-koi-widgets on branch: master...origin/master [ahead 1]

From this i can see im on a branch on one mod, i need to commit stuff on another (maybe branch before?), push a third.

  • have a mode where you list only not committed changed modules (and use your fav client/cli to commit them, and iteratively see what's left to commit)
fonda@verypro ~/work/koi-2 > pride changes
boxfish-koi-playground on branch: master...origin/master
 M src/main/ts/prezi/koi/playground/Playground.ts
?? src/main/ts/prezi/koi/playground/NewFile.ts

@lptr
Copy link
Contributor Author

lptr commented Sep 2, 2014

I would split them differently.

pride list now only shows the list of modules. It could add module level information, such as:

  • are there any uncommitted changes?
  • are there any unpushed changes? (only for Git/Mercurial)
  • are there any incoming changes? (maybe)
  • which branch are we on?
  • what is the remote? (only for Git/Mercurial)

Then you could have pride status which would give you the raw git status / svn status from the modules that have any changes. Modules with no changes would have no output.

It's tempting to add pride diff as well, but the resulting diff would not be very functional by itself, and it can be easily replicated via pride do git diff.

@fondasimone
Copy link
Contributor

Makes a lot of sense. 👍

Dont know what was your plan with the incoming changes but i would not have pride fetch from the remote on each pride list. If the user fetched it by itself tho, i would show some ahead/behind counter.

This could become an optional switch, -fetch (-update -u -fe... something!) fetches the remote and gives you up-to-date infos.

@lptr
Copy link
Contributor Author

lptr commented Sep 8, 2014

pride list now provides output like this:

 M boxfish-geometry-svn 86 (svn)
M  boxfish-geometry master@3ed0ddb (git)

An M in the first column means you have unpushed changes, an 'M' in the second column means you have uncommitted changes. master is the name of the current branch, while 86 is the current (SVN) revision, and 3ed0ddb is the current Git revision.

@lptr
Copy link
Contributor Author

lptr commented Sep 8, 2014

After this my idea of a pride status command would be to do exactly what pride do -- git status would do. Maybe this is better resolved via command aliases (see #101).

@lptr lptr closed this as completed Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants