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
builtins.fetchGit improvement with unclean repo's #1933
Comments
or perhaps using |
In one of the projects I work on I actually id the "dirt" as it helps when I want to deploy things for testing before actually committing. The easiest way I found for doing that is to just use export GIT_INDEX_FILE=$(mktemp -d)/idx
git add --all
git --no-pager diff --no-color HEAD | git hash-object --stdin
rm $GIT_INDEX_FILE Here's a fairly more robust (albeit still contrived) version https://gist.github.com/kreisys/2fd049bd8c6f40a412067bead6184923 |
I marked this as stale due to inactivity. → More info |
It looks to me like a feature very similar to this was implemented in #5385 and merged to master on June 24, 2023. |
This has been implemented in #5385. Thanks @mkohler.
|
nix/src/libexpr/primops/fetchGit.cc
Lines 38 to 45 in e89d02b
currently, if a repo is not clean,
fetchGit
returns all 0's for the revisionmy proposal, is that it return the current revision, and boolean flag to indicate that it has been modified, so you at least know what the starting point is, rather then having no clue what the version is
for example:
The text was updated successfully, but these errors were encountered: