Skip to content

Commit

Permalink
handle with Head change (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Jun 4, 2023
1 parent 6ac66b9 commit 19fd9ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/revParse.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func revParse(refNames ...string) error {
for _, refName := range refNames {
var refPath string
if strings.ToLower(refName) == "head" {
refPath = filepath.Join(client.RootGoitPath, "refs", "heads", string(client.Head))
refPath = filepath.Join(client.RootGoitPath, "refs", "heads", client.Head.Reference)
} else {
refPath = filepath.Join(client.RootGoitPath, "refs", "heads", refName)
}
Expand Down
8 changes: 4 additions & 4 deletions internal/store/client.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package store

type Client struct {
Conf *Config
Idx *Index
Head
Conf *Config
Idx *Index
Head *Head
RootGoitPath string
}

func NewClient(config *Config, index *Index, head Head, rootGoitPath string) *Client {
func NewClient(config *Config, index *Index, head *Head, rootGoitPath string) *Client {
return &Client{
Conf: config,
Idx: index,
Expand Down

0 comments on commit 19fd9ea

Please sign in to comment.