-
Notifications
You must be signed in to change notification settings - Fork 32
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
base: master
Are you sure you want to change the base?
Add git hash #235
Conversation
CMakeLists.txt
Outdated
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) | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | |||
} |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
Fixes #85