Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ uv run https://tools.simonwillison.net/python/first_line_history.py ~/dev/datase
```
Output example:
```
2017-11-13T10:41:53-08:00 e838bd # datasette
2017-11-24T19:46:24-08:00 efb82d # Datasette
2021-11-12T06:18:31-08:00 c92ab5 <img src="https://datasette.io/static/datasette-logo.svg" alt="Datasette">
2017-11-13T10:41:53-08:00 e838bd7 # datasette
2017-11-24T19:46:24-08:00 efb82da # Datasette
2021-11-12T06:18:31-08:00 c92ab51 <img src="https://datasette.io/static/datasette-logo.svg" alt="Datasette">
```

## macos-windows.py
Expand Down
4 changes: 2 additions & 2 deletions python/first_line_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Print every change to the first line of a file across its git history.

Output format, one line per change (oldest first):
<iso-datetime> <6-char-hash> <first line content>
<iso-datetime> <7-char-hash> <first line content>
"""
import os
import subprocess
Expand Down Expand Up @@ -107,7 +107,7 @@ def main(argv):
if first is None:
continue
if first != previous:
print(f"{date} {sha[:6]} {first}")
print(f"{date} {sha[:7]} {first}")
previous = first

if not saw_any:
Expand Down
Loading