Skip to content

Commit

Permalink
use client.Head.Reference instead of "main" (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Jun 8, 2023
1 parent 8cd736b commit 374b509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func commit() error {

// make and write commit object
var data []byte
branchPath := filepath.Join(client.RootGoitPath, "refs", "heads", "main")
branchPath := filepath.Join(client.RootGoitPath, "refs", "heads", client.Head.Reference)
branchBytes, err := os.ReadFile(branchPath)
author := object.NewSign(client.Conf.GetUserName(), client.Conf.GetEmail())
committer := author
Expand Down

0 comments on commit 374b509

Please sign in to comment.