This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
Implement composite Git strategy #538
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
b212aab
Let's do some nodegits
BinaryMuse f064145
Use nodegit for GSOS#getStatusesForChangedFiles
kuychaco cfd9b49
Only select item in staging view when clicked or dragged over
kuychaco 4049b12
:shirt:
BinaryMuse 49a2fce
Convert GSOS#getRemotes to nodegit
3c02de8
Ensure tooltip is closed if showing when component unmounts
79a90fe
Add `firstImplementer` helper
82e2932
Revert GSOS to original (pre-nodegit) form
2a8d23a
Allow an AsyncQueue to be injected into GSOS
7085c7e
Implement set/getOwnPropertyDescriptor/getPrototypeOf in firstImpementer
99dbc5a
Extract Nodegit strategy
a0be11e
Use CompositeGitStrategy as default strategy
14c9cbe
Convert GSOS tests to generic strategies test
57887e3
sdescribe(cmd, desc) -> forCommand(cmd).describe(desc)
d1b156c
Return assignment from Proxy `set`
c0d2b1d
Make getRemotes test work independent of order
0443f6a
Redirect ALL methods that exist on the strategy under test to that st…
cac1741
Show non-implemented strategy tests as pending
72b1d00
:art:
3d0ec93
:fire: .only
2bc7061
:art:
1495e5a
Ensure proper returns from firstImplementer
75f1e81
Always test every method on every strategy
313300c
Only test gpgExec on strategies where it actually exists
450b0ca
Implement getPrototypeOf in firstImplementer correctly
2ab6105
Change the way strategies get tested
BinaryMuse 410525c
:art:
68d7995
Drop the nodegit strategy like a hot potato 🍠
d588ec2
Merge remote-tracking branch 'origin/master' into mkt-composite-git-s…
6611be9
:shirt:
c840e26
:art:
84b6575
:fire: unused code
d50cce6
Be more specific with firstImplementer tests
17308d3
Use reduceRight to produce correct prototype
40d9a6f
Test firstImplementer set and getOwnPropertyDescriptor
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import os from 'os'; | ||
|
|
||
| import {firstImplementer} from './helpers'; | ||
| import AsyncQueue from './async-queue'; | ||
| import GitShellOutStrategy from './git-shell-out-strategy'; | ||
|
|
||
| export default { | ||
| create(workingDir, options = {}) { | ||
| return this.withStrategies([GitShellOutStrategy])(workingDir, options); | ||
| }, | ||
|
|
||
| withStrategies(strategies) { | ||
| return function createForStrategies(workingDir, options = {}) { | ||
| const parallelism = options.parallelism || Math.max(3, os.cpus().length); | ||
| const commandQueue = new AsyncQueue({parallelism}); | ||
| const strategyOptions = {...options, queue: commandQueue}; | ||
|
|
||
| const strategyInstances = strategies.map(Strategy => new Strategy(workingDir, strategyOptions)); | ||
| return firstImplementer(...strategyInstances); | ||
| }; | ||
| }, | ||
| }; |
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't nearly as scary as you made it sound 😉