Repository navigation
fix for missing .git directory from a tracked repository - #5297
Merged
Merged
Conversation
j-f1
reviewed
Jul 31, 2018
| repository.path, | ||
| 'getStatus' | ||
| 'getStatus', | ||
| new Set<number>([0, 128]) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
1 task done
outofambit
reviewed
Jul 31, 2018
| }) | ||
|
|
||
| it('returns null for directory without a .git directory', async () => { | ||
| const emptyDir = mkdirSync('no-repo-here') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
outofambit
reviewed
Jul 31, 2018
|
|
||
| const gitStore = this.getGitStore(repository) | ||
|
|
||
| const status = await gitStore.loadStatus() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This was referenced Jul 31, 2018
This file contains hidden or 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
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.
Fixes #5291 by:
This code path shows that
withAuthenticatingUsercan indirectly callgetRemotes(which requires a valid Git repository) before we do agetStatus, which causes the error initially reported.getStatusabout exit code 128By reordering the checks so that
git statusfires beforegit fetchwe now also need to check for exit code 128 there. This required returning the exit code from the spawned process response, and handling that correctly. I've added some debug logging to this code path so it doesn't pollute the file logs excessively.