List of jank scenarios to include - chaoss/jank GitHub Wiki

commit metadata

Timestamps

author and committer timestamps

  • wildly invalid offset
  • committer timestamp before author timestamp

Examples of corruption this repository demonstrates

  • invalid timezone values in committer and author dates
  • invalid timestamps in general ()

https://github.com/frrouting/frr i believe has a commit with an invalid timestamp

AI generated suggestions for how to simulate some of this:

Non-RFC3339 author/committer dates %aI/%cI should produce ISO 8601 strict format, but commits created with GIT_AUTHOR_DATE or git commit --date can have unusual timezone formats. The parser uses time.Parse(time.RFC3339, ...) at line 473. If the date doesn't parse, parseTimestamp returns nil and extractDate returns whatever isoDate[:10] gives (which could be garbage).

Stress test: GIT_AUTHOR_DATE="2024-01-01T00:00:00+0000" git commit --allow-empty -m "no colon in tz offset" Also: GIT_AUTHOR_DATE="@0 +0000" (epoch format), GIT_AUTHOR_DATE="Thu Jan 1 00:00:00 1970 +0000" (RFC2822).

also: commit date after author date - happens during normal rebases

Non-ASCII author names (Unicode, emoji, CJK) - hasnt been seen but seems very realistic

Authorship

author and committer names/emails:

  • full name and email stored in email field
  • full name and email stored in name field
  • multiple @ signs in committer email (example: augur)
  • multiple @ signs in author email (example: augur
  • empty string in name and email (GIT_AUTHOR_NAME="" GIT_AUTHOR_EMAIL="" git commit --allow-empty -m "no author info")

Size

By commit count

linux kernel maybe something from android???? LOL https://github.com/jshchnz/codemaxxed

https://www.youtube.com/watch?v=a4BxvWs9PGE

By bytes per commit

huge repo by lots of bytes

https://github.com/apache/airflow-site-archive - only 151 total commits, but a lot of them look like this: https://github.com/apache/airflow-site-archive/commit/c1655a99cdcb97ea2493191befea3d83c5baeb50 "sync S3 to github" LOL

https://github.com/backstage/upgrade-helper-diff - only 432 commits but with https://github.com/backstage/upgrade-helper-diff/commit/b55913faed826dad73db2a8aee9ada1076e54035

Branching

branch that isnt based on the same tree as the repo (git merge allow unrelated histories, aka two root commits) git checkout --orphan new-root && git commit --allow-empty -m "orphan root" then merge it

"criss-cross merges" https://git-scm.com/docs/git-merge-base

Misc

Default branch with unusual name - not seen in wild but could cause issues

signed commits

Meta

Other places to look to find examples of jank

the perceval repo has some tests cases of things thhey have found during the years: https://github.com/chaoss/grimoirelab-perceval/blob/main/tests/test_git.py. The data directory has some testing repos to reproduce some of these cases: https://github.com/chaoss/grimoirelab-perceval/tree/main/tests/data/git

Diff parsing

whitespace-only changes (both substantial and non substantial) for testing CollectOSS handling of it

off the wall

some off the wall ideas that havent been seen in the wild, maybe can be in a new repo?

octopus merge

An octopus merge with, say, 20 parents: Create 20 branches from the same base, then git merge branch1 branch2 ... branch20

Very long (12 MB) commit message

empty commits (maybe even back to back)

--allow-empty

Author date after committer date

should be impossible in normal use

quotes in email

GIT_AUTHOR_EMAIL='"[email protected]"' git commit --allow-empty -m "quoted email"

Author email with no @ sign

External jank

repo taken down/unavailable for DMCA reasons, such as https://github.com/duty-machine/news

repo disabled for TOS violation https://github.com/ebay/zeta

Repo adjacent jank

Large repos with large PR comment bodies https://github.com/aveloxis/aveloxis/pull/224 microsoft/winget-pkgs, NixOS/nixpkgs, Azure/azure-powershell, zephyrproject-rtos/zephyr, freeCodeCamp/freeCodeCamp