Delete old git.NewCommand() and use it as git.NewCommandContext() (#18552)
This commit is contained in:
parent
8ae5e6d7fd
commit
3043eb36bf
74 changed files with 258 additions and 263 deletions
|
@ -22,7 +22,7 @@ func (repo *Repository) getTree(id SHA1) (*Tree, error) {
|
|||
// GetTree find the tree object in the repository.
|
||||
func (repo *Repository) GetTree(idStr string) (*Tree, error) {
|
||||
if len(idStr) != 40 {
|
||||
res, err := NewCommandContext(repo.Ctx, "rev-parse", "--verify", idStr).RunInDir(repo.Path)
|
||||
res, err := NewCommand(repo.Ctx, "rev-parse", "--verify", idStr).RunInDir(repo.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue