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

Show relativePath in the result for better readability #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dineshba
Copy link
Member

No description provided.

@jpninanjohn
Copy link
Collaborator

y? Full path is always better

@dineshba
Copy link
Member Author

Mostly we know where we are running the gg command from. So relativePath should be understandable by the users.

WITH RELATIVE PATH (with 3 columns. I feel we can remove the time colume)

✦ ❯ gg status
./nomad-cluster                          new files                                                                                                     00:00:00
./microservices-demo                     1 ahead, modifications                                                                                        00:00:00
./endgame/istio                          no changes                                                                                                    00:00:00
./endgame/k8s-cluster                    no changes                                                                                                    00:00:00
./endgame/kube-prometheus                no changes                                                                                                    00:00:00
./compose2nomad                          no changes                                                                                                    00:00:00
./consul-k8s-l7-obs-guide                no changes                                                                                                    00:00:00
./contacts-ui                            new files                                                                                                     00:00:00

WITH FULL PATH

✦ ❯ gg status
"/Users/dinesh/projects/trials/devops/nomad-cluster": new files
"/Users/dinesh/projects/trials/devops/microservices-demo": 1 ahead, modifications
"/Users/dinesh/projects/trials/devops/endgame/istio": no changes
"/Users/dinesh/projects/trials/devops/endgame/k8s-cluster": no changes
"/Users/dinesh/projects/trials/devops/endgame/kube-prometheus": no changes
"/Users/dinesh/projects/trials/devops/compose2nomad": no changes
"/Users/dinesh/projects/trials/devops/consul-k8s-l7-obs-guide": no changes
"/Users/dinesh/projects/trials/devops/contacts-ui": new files

Output of relativePath looks simple. So suggesting. Thoughts ?

@jpninanjohn
Copy link
Collaborator

jpninanjohn commented Apr 22, 2020

I agree it looks simple. I was thinking, for navigation purposes... absolute path is always better. In case they see a repo with changes and want to go to it. Yes it will work with relative path also but only if their dir hasn't changed. Presentation wise, I would go with relative path... but for navigation purposes.. absolute is better.

Lets take a scenario. I have a nested structure like this.

- home
- dir1
    - inner dir
       -repo1
       -repo2
    - inner dir 2
       -repo3

If I run gg from where dir1 is, I would get relative paths to each of these. Suppose I go inside dir1. I can no longer use any of the paths shown in gg status unless I run from within again.

@jpninanjohn
Copy link
Collaborator

Yes. time column is not needed

@jpninanjohn
Copy link
Collaborator

@dineshba Can I close this? Do you still think relative path is needed?

@dineshba
Copy link
Member Author

dineshba commented Jun 8, 2020

I still feel, few might prefer relative path to absolute path. If it is configurable using some env or flag, it should be good.

@jpninanjohn
Copy link
Collaborator

Ok. Keep it configurable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants