-
Notifications
You must be signed in to change notification settings - Fork 0
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
consider ways of retrieving git status without the entire git history #157
Comments
@cjyetman worth noting that the |
confirmed that the current situation makes "git": {
"local_git_tag": "no git tags found",
"local_git_hash": "ee97f2649fbb47188fc64509a788ee073f93653b",
"local_git_status": [
{
"status": "",
"filename": "D .dockerignore"
},
{
"status": "",
"filename": "D .github/CODEOWNERS"
},
{
"status": "",
"filename": "D .github/workflows/add-prs-and-issues-to-project.yml"
},
{
"status": "",
"filename": "D .gitignore"
},
{
"status": "",
"filename": "D Dockerfile"
},
{
"status": "",
"filename": "M config.yml"
},
{
"status": "",
"filename": "D docker-compose.yml"
},
{
"status": "",
"filename": "D workflow.data.preparation.Rproj"
},
{
"status": "??",
"filename": ".dockerenv"
},
{
"status": "??",
"filename": ".env"
},
{
"status": "??",
"filename": "bin"
},
{
"status": "??",
"filename": "dev/"
},
{
"status": "??",
"filename": "etc/"
},
{
"status": "??",
"filename": "home/"
},
{
"status": "??",
"filename": "init"
},
{
"status": "??",
"filename": "inputs/"
},
{
"status": "??",
"filename": "lib"
},
{
"status": "??",
"filename": "lib32"
},
{
"status": "??",
"filename": "lib64"
},
{
"status": "??",
"filename": "libexec/"
},
{
"status": "??",
"filename": "libx32"
},
{
"status": "??",
"filename": "opt/"
},
{
"status": "??",
"filename": "outputs/"
},
{
"status": "??",
"filename": "proc/"
},
{
"status": "??",
"filename": "rocker_scripts/"
},
{
"status": "??",
"filename": "root/"
},
{
"status": "??",
"filename": "run/"
},
{
"status": "??",
"filename": "sbin"
},
{
"status": "??",
"filename": "sys/"
},
{
"status": "??",
"filename": "tmp/"
},
{
"status": "??",
"filename": "usr/"
},
{
"status": "??",
"filename": "var/"
}
]
}, |
note that https://github.com/RMI-PACTA/pacta.data.preparation/pull/342 will at least remove all of the "untracked" files from the git status report |
A lot of our images copy to the file system root, and use that as a working directory. I'd rather get away from that (this is one reason to do so). See also: https://github.com/RMI-PACTA/pacta.data.preparation/pull/342#issuecomment-1964088016 |
This was perfect, I just couldn't figure out how to do it on my own. I think https://github.com/RMI-PACTA/pacta.data.preparation/pull/342 will resolve about 80% of this issue, but I'm gonna leave this open for now because the original intent here was to avoid having to copy in the entire git history to the Docker image. |
I've investigated the possibility of assessing the status of files without any git history, and I don't think it's possible, though it is already possible with a shallow clone, and I think that's adequate. Closing this issue. |
#155 added back the entire git history to the Docker image to enable us to capture the git status
It would be advantageous to be able to get the git status without having to copy in the entire git history (and possibly not needing
git
, just parsing specific files). Some ideas towards this we're discussed in #138Specifically, we can probably get the current git hash from just the files
.git/HEAD
(to get the current branch name) and.git/refs/heads/{CURRENT-BRANCH-NAME}
.git tags we don't yet have a solution for
git status should be possible with a "depth=1" clone, though it may end up confusing since we're purposefully not copying in all files (maybe we should look towards checking the git status of only specific files we want to check?)
The text was updated successfully, but these errors were encountered: