Skip to content

fix: correct loop condition in GetFreeUserID and add tests - #143

Merged
joachimschmidt557 merged 2 commits into
timewarrior-synchronize:mainfrom
schtobia:dev/fix_loop_condition
Aug 21, 2026
Merged

joachimschmidt557 merged 2 commits into
timewarrior-synchronize:mainfrom
schtobia:dev/fix_loop_condition

Conversation

@schtobia

Copy link
Copy Markdown
Contributor

The loop condition 'i > 0' was always false at start (i=0), causing the function to always hit log.Fatal. Changed to 'i >= 0'.

Added tests for GetFreeUserID covering empty directory, gaps, and starting from zero.

The loop condition 'i > 0' was always false at start (i=0), causing
the function to always hit log.Fatal. Changed to 'i >= 0'.

Added tests for GetFreeUserID covering empty directory, gaps, and
starting from zero.
@schtobia schtobia closed this Aug 18, 2026
@schtobia
schtobia deleted the dev/fix_loop_condition branch August 18, 2026 13:20
@schtobia
schtobia restored the dev/fix_loop_condition branch August 18, 2026 19:02
@schtobia

Copy link
Copy Markdown
Contributor Author

again, closing this was unintended

@schtobia schtobia reopened this Aug 18, 2026
Comment thread sync/user_management_test.go Outdated
@joachimschmidt557
joachimschmidt557 merged commit bfd34b4 into timewarrior-synchronize:main Aug 21, 2026
3 checks passed
@schtobia
schtobia deleted the dev/fix_loop_condition branch August 25, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants