make use of gitrevisions(7) operators in "commits" view

You can point to a commit using sha1 hash:

  • https://gitlab.com/glensc/gitrevisions/commit/38ba505c4d54d39c247ca20050d436e6aba3a710

you can point to same commit using tag:

  • https://gitlab.com/glensc/gitrevisions/commits/light-tag-1
  • https://gitlab.com/glensc/gitrevisions/commits/annotated-tag-1

however you can also point to commit using ~ or ^ operators:

➔ git show -s annotated-tag-1^1
commit 38ba505c4d54d39c247ca20050d436e6aba3a710
Author: Elan Ruusamäe <glen@delfi.ee>
Date:   Mon Oct 10 18:32:57 2016 +0000

    Add new file
➔ git show -s annotated-tag-1~1
commit 38ba505c4d54d39c247ca20050d436e6aba3a710
Author: Elan Ruusamäe <glen@delfi.ee>
Date:   Mon Oct 10 18:32:57 2016 +0000

    Add new file

however this does not work in gitlab. only place i found it works is "compare" view:

  • https://gitlab.com/glensc/gitrevisions/compare/light-tag-1~1...light-tag-1
  • https://gitlab.com/glensc/gitrevisions/compare/annotated-tag-1~1...annotated-tag-1
  • https://gitlab.com/glensc/gitrevisions/compare/branch-1~1...branch-1

would like to have this working also for "commit" view:

  • https://gitlab.com/glensc/gitrevisions/commit/branch-1~1
  • https://gitlab.com/glensc/gitrevisions/commit/light-tag-1~1
  • https://gitlab.com/glensc/gitrevisions/commit/annotated-tag-1~1

why this is important?

well. i'm migrating from svn to git, and commit messages refer to commits in other projects, and constantly vice versa, so it's not possible to convert one repo and use hashes from the converted repository.

but i could point to specific commit using the ~ or ^ operator, because there are tags in the repository, i could create relative link from closest tag.

Edited Jun 17, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading