-
Notifications
You must be signed in to change notification settings - Fork 2
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
test the Git prompt #122
Merged
Merged
test the Git prompt #122
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amtoine
added
tests
Something related to the tests of the library
sugar
Related to the `nu-git-manager-sugar` module
labels
Dec 3, 2023
Merged
amtoine
added a commit
that referenced
this pull request
Dec 3, 2023
related to - #122 ## description i was writing #122 and i noticed the imports of `git prompt` where completely messed up 👀 ## reproduce from the branch of #122, run `tk test prompt` - before that change, i.e. on 1b36d96 ``` Testing package /home/amtoine/documents/repos/github.com/amtoine/nu-git-manager tests sugar git prompt build-left-prompt ... FAILURE tests sugar git prompt repo-current-action ... FAILURE tests sugar git prompt repo-revision ... SUCCESS Test "tests sugar git prompt build-left-prompt" failed with exit code 1: Error: × todo Test "tests sugar git prompt repo-current-action" failed with exit code 1: Switched to a new branch 'main' Switched to a new branch 'some' Switched to a new branch 'other' Error: nu::shell::external_command × External command failed ╭─[/home/amtoine/documents/repos/github.com/amtoine/nu-git-manager/src/nu-git-manager-sugar/git/lib/lib.nu:96:1] 96 │ } else if (test-file "MERGE_HEAD") { 97 │ "MERGING" | color dark_gray · ──┬── · ╰── did you mean 'nu-highlight'? 98 │ } else if (test-file "CHERRY_PICK_HEAD") { ╰──── help: No such file or directory (os error 2) Ran 3 tests. 1 succeeded, 2 failed. Error: × some tests failed ``` - after that change, e.g. by merging the two branches together ``` Testing package /home/amtoine/documents/repos/github.com/amtoine/nu-git-manager tests sugar git prompt build-left-prompt ... FAILURE tests sugar git prompt repo-current-action ... SUCCESS tests sugar git prompt repo-revision ... SUCCESS Test "tests sugar git prompt build-left-prompt" failed with exit code 1: Error: × todo Ran 3 tests. 2 succeeded, 1 failed. Error: × some tests failed ```
this should solve the import issues.
amtoine
force-pushed
the
test-git-prompt
branch
from
December 8, 2023 08:51
7fdb336
to
d922914
Compare
amtoine
added a commit
that referenced
this pull request
Dec 13, 2023
wait for - #122 (to include a test and make sure the changes appear in the prompt) ## changelog - refactor the short Git status into `git/lib get-status` - adds a segment containing Git changes ## details - if there are no changes in the index, the prompt won't add anything. - if there are changes, they will appear after the `(branch:commit)` segment inside `[...]` - in order - staged changes will show up as one `_` - unstaged changes will show up as one `!` - untracked changes will show up as one `?`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
should
description
this PR
repo-revision
forget-revision
repo-current-action
forgit-action
build-left-prompt
forget-left-prompt
$env.CMD_DURATION
-> when the shell starts its value is"0823"
, an easter egg of Nushell 😏simplify-path
and sanitize paths inget-left-prompt
for Windows