Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git hash #235

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

EhWhoAmI
Copy link
Contributor

Fixes #85

CMakeLists.txt Outdated
Comment on lines 69 to 76
include(FetchContent)

FetchContent_Declare(cmake_git_version_tracking
GIT_REPOSITORY https://github.com/andrew-hardin/cmake-git-version-tracking.git
GIT_TAG 904dbda1336ba4b9a1415a68d5f203f576b696bb
)
FetchContent_MakeAvailable(cmake_git_version_tracking)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try using a submodule instead? This is for consistency with how all other libraries are added. It can be put it in the 3rdparty directory, and added using add_subdirectory. the other dependencies work as examples.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I'm curious/concerned about is how this library selects which git repository to read info from. Most likely, it won't select itself. It somehow has to obtain the parent that added it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I'll do some testing and see how that works out

@@ -0,0 +1,3 @@
{
"gitlens.currentLine.enabled": false
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally you should prefer having a trailing newline, to prevent tools like github from giving you angry red circles.

@@ -64,6 +64,14 @@
#include <string_view>
#include <thread>
#include <unordered_map>
#if __has_include("git.h")
#include "git.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't it have this header?

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.

Add git commit hashes to build
3 participants