Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring around branch #107

Merged
merged 4 commits into from
Jun 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use client.Head.Reference instead of "main" (#106)
  • Loading branch information
JunNishimura committed Jun 8, 2023
commit 374b50905899baea2897621ad16cdb40fb9a049d
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