Skip to content

Commit 0069b20

Browse files
committed
cmd/git(fix[rev_list]): Honor date-range filters
why: rev_list's since/after/until/before/max_age/min_age flags were never applied -- the guard tested the imported `datetime` module instead of the loop value, so the condition was always False. what: - Test the loop value (datetime_kwarg), matching the adjacent flag loop, so the date-range flags reach git rev-list.
1 parent fd0d3d9 commit 0069b20

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/libvcs/cmd/git.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
import dataclasses
6-
import datetime
76
import os
87
import pathlib
98
import re
@@ -2207,7 +2206,7 @@ def rev_list(
22072206
(max_age, "--max-age"),
22082207
(min_age, "--min-age"),
22092208
]:
2210-
if datetime_kwarg is not None and isinstance(datetime, str):
2209+
if datetime_kwarg is not None and isinstance(datetime_kwarg, str):
22112210
local_flags.extend([datetime_shell_flag, datetime_kwarg])
22122211

22132212
for int_flag, int_shell_flag in [

0 commit comments

Comments
 (0)