<commit_before>package commands

import (
	"fmt"
	"os"
	"strings"

	"github.com/git-lfs/git-lfs/filepathfilter"
	"github.com/git-lfs/git-lfs/git"
	"github.com/git-lfs/git-lfs/lfs"
	"github.com/git-lfs/git-lfs/tasklog"
	"github.com/git-lfs/git-lfs/tq"
	"github.com/spf13/cobra"
)

var (
	checkoutTo     string
	checkoutBase   bool
	checkoutOurs   bool
	checkoutTheirs bool
)

func checkoutCommand(cmd *cobra.Command, args []string) {
	requireInRepo()

	stage, err := whichCheckout()
	if err != nil {
		Exit("Error parsing args: %v", err)
	}

	if checkoutTo != "" && stage != git.IndexStageDefault {
		checkoutConflict(rootedPaths(args)[0], stage)
		return
	} else if checkoutTo != "" || stage != git.IndexStageDefault {
		Exit("--to and exactly one of --theirs, --ours, and --base must be used together")
	}

	msg := []string{
		"WARNING: 'git lfs checkout' is deprecated and will be removed in v3.0.0.",

		"'git checkout' has been updated in upstream Git to have comparable speeds",
		"to 'git lfs checkout'.",
	}
	fmt.Fprintln(os.Stderr, strings.Join(msg, "\n"))

	ref, err := git.CurrentRef()
	if err != nil {
		Panic(err, "Could not checkout")
	}

	singleCheckout := newSingleCheckout(cfg.Git, "")
	if singleCheckout.Skip() {
		fmt.Println("Cannot checkout LFS objects, Git LFS is not installed.")
		return
	}

	var totalBytes int64
	var pointers []*lfs.WrappedPointer
	logger := tasklog.NewLogger(os.Stdout)
	meter := tq.NewMeter()<commit_msg>commands: undeprecate checkout<commit_after>package commands

import (
	"fmt"
	"os"

	"github.com/git-lfs/git-lfs/filepathfilter"
	"github.com/git-lfs/git-lfs/git"
	"github.com/git-lfs/git-lfs/lfs"
	"github.com/git-lfs/git-lfs/tasklog"
	"github.com/git-lfs/git-lfs/tq"
	"github.com/spf13/cobra"
)

var (
	checkoutTo     string
	checkoutBase   bool
	checkoutOurs   bool
	checkoutTheirs bool
)

func checkoutCommand(cmd *cobra.Command, args []string) {
	requireInRepo()

	stage, err := whichCheckout()
	if err != nil {
		Exit("Error parsing args: %v", err)
	}

	if checkoutTo != "" && stage != git.IndexStageDefault {
		checkoutConflict(rootedPaths(args)[0], stage)
		return
	} else if checkoutTo != "" || stage != git.IndexStageDefault {
		Exit("--to and exactly one of --theirs, --ours, and --base must be used together")
	}

	ref, err := git.CurrentRef()
	if err != nil {
		Panic(err, "Could not checkout")
	}

	singleCheckout := newSingleCheckout(cfg.Git, "")
	if singleCheckout.Skip() {
		fmt.Println("Cannot checkout LFS objects, Git LFS is not installed.")
		return
	}

	var totalBytes int64
	var pointers []*lfs.WrappedPointer
	logger := tasklog.NewLogger(os.Stdout)
	meter := tq.NewMeter()
{'fraction_non_alphanumeric': 0.1478819969742814, 'fraction_numerical': 0.004916792738275341, 'mean_word_length': 3.925512104283054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2201102', 'n_tokens_mistral': 1048, 'n_tokens_neox': 987, 'n_words': 227}