diff options
| author | 2025-11-17 00:00:00 +0000 | |
|---|---|---|
| committer | 2025-11-17 00:00:00 +0000 | |
| commit | 2269f26818051c4fad84eba4a0ba9de1932f5ecd (patch) | |
| tree | 7e274d6af2a67fdb2045b1284ad87f923d61803a | |
| parent | Disable per-object validation during reads (diff) | |
| signature | ||
Add a basic change-id field
| -rw-r--r-- | obj_commit.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/obj_commit.go b/obj_commit.go index c3763073..d71754dd 100644 --- a/obj_commit.go +++ b/obj_commit.go @@ -20,6 +20,9 @@ type Commit struct { Committer Ident // Message represents the commit message. Message []byte + // ChangeID represents the change-id header used by + // Gerrit and Jujutsu. + ChangeID string // ExtraHeaders holds any extra headers present in the commit. ExtraHeaders []ExtraHeader } @@ -71,6 +74,8 @@ func parseCommit(id Hash, body []byte, repo *Repository) (*StoredCommit, error) return nil, fmt.Errorf("furgit: commit: parent: %w", err) } c.Parents = append(c.Parents, parent) + case bytes.HasPrefix(line, []byte("change-id ")): + c.ChangeID = string(line) case bytes.HasPrefix(line, []byte("author ")): idt, err := parseIdent(line[7:]) if err != nil { |
