[GH-ISSUE #196] Git-sv 2.0.0 not being able to read next-version from shallow git clone #13

Closed
opened 2026-03-04 00:40:53 +03:00 by kerem · 2 comments
Owner

Originally created by @mniskane on GitHub (May 8, 2025).
Original GitHub issue: https://github.com/thegeeklab/git-sv/issues/196

After updating to git-sv 2.0.0 version, getting next-version from shallow git clone stopped working:

$ git clone -q --depth=20 https://github.com/thegeeklab/git-sv.git 
$ cd git-sv/
$ git-sv2 --version
git-sv version=2.0.0 date=2025-05-02T20:57:17+0000
$ git-sv2 cv
2.0.0
$ git-sv2 nv
8:36AM FTL Execution error error="error getting git log: failed to get excluded commits: object not found"
$ 

I am able to get next-version with the older git-sv 1.0.14 version from the same git clone:

$ git-sv1 --version
git-sv version=1.0.14 date=2025-04-22T06:29:28+0000
$ git-sv1 cv
2.0.0
$ git-sv1 nv
2.0.1
$

Shallow clones help CI to run faster when handling big repositories. Gitlab jobs use shallow (depth 20) as default when running CI jobs. ( https://docs.gitlab.com/user/project/repository/monorepos/#shallow-cloning )

ps. When using 2.0.0, command "git fetch --unshallow" helps to get "git-sv next-version" working.

Edit: My environment is Linux Ubuntu 25.04 (x86_64) and binaries git-sv1 and git-sv2 were copied from this project's release page.

Originally created by @mniskane on GitHub (May 8, 2025). Original GitHub issue: https://github.com/thegeeklab/git-sv/issues/196 After updating to git-sv 2.0.0 version, getting next-version from shallow git clone stopped working: ``` $ git clone -q --depth=20 https://github.com/thegeeklab/git-sv.git $ cd git-sv/ $ git-sv2 --version git-sv version=2.0.0 date=2025-05-02T20:57:17+0000 $ git-sv2 cv 2.0.0 $ git-sv2 nv 8:36AM FTL Execution error error="error getting git log: failed to get excluded commits: object not found" $ ``` I am able to get next-version with the older git-sv 1.0.14 version from the same git clone: ``` $ git-sv1 --version git-sv version=1.0.14 date=2025-04-22T06:29:28+0000 $ git-sv1 cv 2.0.0 $ git-sv1 nv 2.0.1 $ ``` Shallow clones help CI to run faster when handling big repositories. Gitlab jobs use shallow (depth 20) as default when running CI jobs. ( https://docs.gitlab.com/user/project/repository/monorepos/#shallow-cloning ) ps. When using 2.0.0, command "git fetch --unshallow" helps to get "git-sv next-version" working. Edit: My environment is Linux Ubuntu 25.04 (x86_64) and binaries git-sv1 and git-sv2 were copied from this project's release page.
kerem 2026-03-04 00:40:53 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@xoxys commented on GitHub (May 8, 2025):

Thanks for the report. Ill tag a new release soon, please let me know if the issue persists.

<!-- gh-comment-id:2864053713 --> @xoxys commented on GitHub (May 8, 2025): Thanks for the report. Ill tag a new release soon, please let me know if the issue persists.
Author
Owner

@mniskane commented on GitHub (May 9, 2025):

Thank you for the fix. I built main branch version and tested it with some shallow clones. Getting next tag version works now! Wonderful.. thanks <3

<!-- gh-comment-id:2865060715 --> @mniskane commented on GitHub (May 9, 2025): Thank you for the fix. I built main branch version and tested it with some shallow clones. Getting next tag version works now! Wonderful.. thanks <3
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-sv#13
No description provided.