MCPcopy Create free account
hub / github.com/driusan/dgit / CheckoutCommit

Function CheckoutCommit

git/checkout.go:123–267  ·  view source on GitHub ↗

Implements the "git checkout" subcommand of git for variations: git checkout [-q] [-f] [-m] [ ] git checkout [-q] [-f] [-m] --detach [ ] git checkout [-q] [-f] [-m] [--detach] git checkout [-q] [-f] [-m] [[-b|-B|--orphan] ] [ ]

(c *Client, opts CheckoutOptions, commit Commitish)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

TestSimpleCommitsFunction · 0.85
TestResetFilesFunction · 0.85
TestStatusFunction · 0.85
CheckoutFunction · 0.85

Calls 15

FileMethod · 0.95
CommitIDMethod · 0.95
RefSpecTypeAlias · 0.85
SymbolicRefGetFunction · 0.85
SymbolicRefUpdateFunction · 0.85
GetHeadCommitMethod · 0.80
FilePathMethod · 0.80
AddStageMethod · 0.80
BranchNameMethod · 0.80
CreateBranchMethod · 0.80
LsTreeFunction · 0.70
LsFilesFunction · 0.70

Tested by 3

TestSimpleCommitsFunction · 0.68
TestResetFilesFunction · 0.68
TestStatusFunction · 0.68