-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor(git): Use 'git -C' to specify the work directory instead of 'Push-Location'/'Pop-Location' #4697
Merged
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
-without any preset command/args
- `git.ps1`
and what type of this PR should be? |
thanks about that |
git -C
instead of use Push-Location
and Pop-Location
when executing git operations
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`
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-Location
to 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
-C
to specify the work directory for git, then no longer need to change the <work directory> withPush-Location
andPop-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: