Skip to content

Commit

Permalink
fix wrong loc
Browse files Browse the repository at this point in the history
- fixes #85
- fixes regression from #32
  • Loading branch information
casperdcl committed Mar 9, 2023
1 parent 2b4cb72 commit 8d25b35
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions gitfame/_gitfame.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def stats_append(fname, auth, loc, tstamp):
if churn & CHURN_SLOC:
for fname in tqdm(file_list, desc=gitdir if prefix_gitdir else "Processing",
disable=silent_progress, unit="file"):

if prefix_gitdir:
fname = path.join(gitdir, fname)
try:
Expand All @@ -274,12 +273,12 @@ def stats_append(fname, auth, loc, tstamp):
continue
log.log(logging.NOTSET, blame_out)

# Strip boundary messages,
# preventing user with nearest commit to boundary owning the LOC
blame_out = RE_BLAME_BOUNDS.sub('', blame_out)
loc_auth_times = RE_AUTHS_BLAME.findall(blame_out)
if since:
# Strip boundary messages,
# preventing user with nearest commit to boundary owning the LOC
blame_out = RE_BLAME_BOUNDS.sub('', blame_out)

for loc, auth, tstamp in loc_auth_times: # for each chunk
for loc, auth, tstamp in RE_AUTHS_BLAME.findall(blame_out): # for each chunk
loc = int(loc)
stats_append(fname, auth, loc, tstamp)

Expand Down

0 comments on commit 8d25b35

Please sign in to comment.