Skip to content

Write clear Hugging Face commit messages#11

Merged
tamnd merged 1 commit into
mainfrom
hf-commit-message
Jul 20, 2026
Merged

Write clear Hugging Face commit messages#11
tamnd merged 1 commit into
mainfrom
hf-commit-message

Conversation

@tamnd

@tamnd tamnd commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Every Hugging Face commit carried the same "arctic shard commit" summary, so the dataset's commit history told a browser nothing about what each commit actually added.

This builds the summary and description from the files in the commit:

  • Summary: Add comments 2021-05 shards 061-064 (4 files, 1.8 GB) — type, month, shard range, file count, total size.
  • Description: the same header plus each file path and its size, and a Removed section when a commit drops shards.
  • Falls back cleanly when a commit spans more than one month or the shards are not a contiguous range (drops the scope/range rather than mislead).

The message is derived purely from the files already in the commit, so no context needs threading down through the upload path.

Tested: commitmsg_test.go covers the add-range, single-shard, mixed-month, with-deletes, and byte-formatting cases. Full arctic package tests pass.

Every hub commit used a fixed "arctic shard commit" summary, so the
dataset history said nothing about what landed. Build the summary and
description from the files in the commit instead: the type and month,
the shard range, the file count, and the total size, with each file and
its size listed in the body. A browser looking at the commit history now
sees "Add comments 2021-05 shards 061-064 (4 files, 1.8 GB)" at a glance.
@tamnd
tamnd merged commit 8bad6d8 into main Jul 20, 2026
6 of 7 checks passed
@tamnd
tamnd deleted the hf-commit-message branch July 20, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant