refactor(git): Use 'git -C' to specify the work directory instead of 'Push-Location'/'Pop-Location'#4697
Merged
rashil2000 merged 8 commits intoScoopInstaller:developfrom Feb 1, 2022
Merged
Conversation
-without any preset command/args
- `git.ps1`
Member
Author
|
and what type of this PR should be? |
Member
Member
Author
|
thanks about that |
git -C instead of use Push-Location and Pop-Location when executing git operations
Member
|
Looks good. The functions |
- `git_fetch` - `git_pull` - `get_checkout`
rashil2000
approved these changes
Feb 1, 2022
3 tasks
se35710
pushed a commit
to se35710/scoop
that referenced
this pull request
Mar 8, 2022
…'Push-Location'/'Pop-Location' (ScoopInstaller#4697) * add `git_cmd` -without any preset command/args * remove unnecessary import - `git.ps1` * stop `Push-Location` and `Pop-Location` before/after git operations * stop `Push-Location` and `Pop-Location` before/after git operations * consistency of naming variable * CHANGELOG * punctuation mark * remove functions that are no longer used - `git_fetch` - `git_pull` - `get_checkout`
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.
Description
no longer using
Push-Locationto change work directory before executing git operationsMotivation and Context
Fixes #4358
Fixes #4675
send ^C(SIGINT) will change current directory to bucket path, when scoop is updating buckets.
solve:
using command options
-Cto specify the work directory for git, then no longer need to change the <work directory> withPush-LocationandPop-Location.How Has This Been Tested?
before:
after:
tested on PS 5.1 and PS Core 7.2 in sandbox, the changes will not affect other areas.
Checklist: