Skip to content

Commit cc6032a

Browse files
committed
Need to pass the wait group by pointer to checkout
1 parent 203e483 commit cc6032a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

commands/command_checkout.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func checkoutCommand(cmd *cobra.Command, args []string) {
3333

3434
c := make(chan *lfs.WrappedPointer)
3535

36-
checkoutWithChan(c, wait)
36+
checkoutWithChan(c, &wait)
3737
for _, pointer := range pointers {
3838
c <- pointer
3939
}
@@ -50,7 +50,7 @@ func init() {
5050
// If the file exists but has other content it is left alone
5151
// returns immediately but a goroutine listens on the in channel for objects
5252
// calls wait.Done() when the final item after the channel is closed is done
53-
func checkoutWithChan(in <-chan *lfs.WrappedPointer, wait sync.WaitGroup) {
53+
func checkoutWithChan(in <-chan *lfs.WrappedPointer, wait *sync.WaitGroup) {
5454
go func() {
5555
// Fire up the update-index command
5656
cmd := exec.Command("git", "update-index", "-q", "--refresh", "--stdin")

commands/command_pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func pullCommand(cmd *cobra.Command, args []string) {
3232
wait.Add(1)
3333
// Prep the checkout process for items that come out of fetch
3434
// this doesn't do anything except set up the goroutine & wait on the fetchChan
35-
checkoutWithChan(fetchChan, wait)
35+
checkoutWithChan(fetchChan, &wait)
3636
// Do the downloading & report to channel which checkout watches
3737
fetchAndReportToChan(pointers, fetchChan)
3838

0 commit comments

Comments
 (0)