Skip to content

Commit d2a4c20

Browse files
Copilotbockthom
andauthored
Switch single-commit boundary: append synthetic end (ts+1) instead of prepending start (ts-1)
Agent-Logs-Url: https://github.com/se-sic/codeface/sessions/5e09bdae-8463-4b3a-99f9-a79510a6ec5b Co-authored-by: bockthom <5575176+bockthom@users.noreply.github.com>
1 parent b8d3c5c commit d2a4c20

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

codeface/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,12 @@ def get_before_arg(num_months):
541541
del revs[0]
542542

543543
# If the repository has only one unique commit (e.g. a brand-new repo),
544-
# synthesize a start boundary one second before that commit so that two
544+
# synthesize an end boundary one second after that commit so that two
545545
# distinct tags can be stored in the DB and an exclusive time-based
546-
# analysis window [ts-1, ts] is created.
546+
# analysis window [ts, ts+1] is created.
547547
if len(revs) == 1:
548548
ts = int(revs[0][1])
549-
revs.insert(0, [str(ts - 1), str(ts - 1), revs[0][2]])
549+
revs.append([str(ts + 1), str(ts + 1), revs[0][2]])
550550

551551
# Extract hash values and dates into separate lists
552552
revs_hash = [rev[0] for rev in revs]

0 commit comments

Comments
 (0)