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

Simplify gis status using --porcelain=v1 #111

Open
nqminhuit opened this issue Jul 16, 2024 · 0 comments
Open

Simplify gis status using --porcelain=v1 #111

nqminhuit opened this issue Jul 16, 2024 · 0 comments
Labels
enhancement Improvement over existing functions
Milestone

Comments

@nqminhuit
Copy link
Owner

nqminhuit commented Jul 16, 2024

The output of command:

git status -sb --ignore-submodules --porcelain=v1

is:

## master...origin/master [ahead 1, behind 1]
AA aaaadddeed
AM mmm
D  text-11
UU text-2
 M text-25
UU text-33
 M text-5
M  text-50
 D text-8
MM text-9
?? m1/
?? mnew

exactly what we need, no need to add complexity to parse like with porcelain v2.

It also detect rename:

$ git status -sb --ignore-submodules --porcelain
## master...origin/master
R  text-1 -> text-1-rn_

Note: the ProcessBuilder#inheritIO will help maintain the color output from the command it runs. However the order of the output messed up.

code example:

    var p = new ProcessBuilder(commands).inheritIO().directory(directory).start();
nqminhuit added a commit that referenced this issue Jul 16, 2024
Should use output from the real `git` command instead of complicate it.
Affected commands:
- gis status

fix: #111
nqminhuit added a commit that referenced this issue Jul 17, 2024
Should use output from the real `git` command instead of complicate it.
Affected commands:
- gis status

fix: #111
nqminhuit added a commit that referenced this issue Jul 17, 2024
Should use output from the real `git` command instead of complicate it.
Affected commands:
- gis status

fix: #111
nqminhuit added a commit that referenced this issue Jul 17, 2024
Should use output from the real `git` command instead of complicate it.
Affected commands:
- gis status

fix: #111
nqminhuit added a commit that referenced this issue Jul 17, 2024
Should use output from the real `git` command instead of complicate it.
Affected commands:
- gis status

fix: #111
nqminhuit added a commit that referenced this issue Jul 17, 2024
Should use output from the real `git` command instead of complicate it.
Affected commands:
- gis status

fix: #111
@nqminhuit nqminhuit added the enhancement Improvement over existing functions label Jul 20, 2024
@nqminhuit nqminhuit added this to the 2.1.0 milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement over existing functions
Projects
None yet
Development

No branches or pull requests

1 participant