feat: Add HH:MM timestamps to sidebar after date in git log
This commit is contained in:
parent
43fa1dc529
commit
dc119e472d
11
gtm2.py
11
gtm2.py
|
|
@ -11,7 +11,7 @@ VERSION = "2025-06-07.3"
|
|||
# --- Data Fetching & Utility Functions (Pure) ---
|
||||
|
||||
def get_commits(filename):
|
||||
cmd = ['git', 'log', '--pretty=format:%h %ad %s', '--date=short', '--', filename]
|
||||
cmd = ['git', 'log', '--pretty=format:%h %ad %s', '--date=format:%Y-%m-%d %H:%M', '--', filename]
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
return result.stdout.splitlines()
|
||||
|
||||
|
|
@ -332,9 +332,12 @@ def draw_status_bars(stdscr, state):
|
|||
# Get commit message for the selected commit
|
||||
commit_message = ""
|
||||
if state.commits and state.selected_commit_idx < len(state.commits):
|
||||
commit_parts = state.commits[state.selected_commit_idx].split(' ', 2)
|
||||
if len(commit_parts) >= 3:
|
||||
commit_message = commit_parts[2]
|
||||
# Format is now: hash date time message
|
||||
# We need to split on more than just the first two spaces
|
||||
commit_line = state.commits[state.selected_commit_idx]
|
||||
parts = commit_line.split(' ', 3) # Split into hash, date, time, message
|
||||
if len(parts) >= 4:
|
||||
commit_message = parts[3]
|
||||
|
||||
# Status bar percentages
|
||||
if len(state.file_lines) > 0:
|
||||
|
|
|
|||
Loading…
Reference in New Issue