gbdev / rgbds

Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color

Home Page:https://rgbds.gbdev.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Declared version can be affected by another Git repository

Rangi42 opened this issue · comments

If you download GitHub's .zip file and extract it in the presence of another Git repository, that repo's tags can influence the declared version of RGBDS when you build it.

I would call this an edge case not worth handling, except that it actually happened--someone built RGBDS inside my project, and then rgbasm -V would print rgbasm v3.0.0-beta-dirty.

We could check the repository's identity as well as its tags. If git config --get remote.origin.url ends with /rgbds.git, that might be a reliable check.

What we really want is to pass --git-dir to git.