Repository navigation
feat: replace keepGitDir with discardGitDir - #8318
Conversation
|
@jedevc 👋 Late to the party -- won't this affect caching? I thought the reason buildkit defaults to NOT doing it is because of how it resets the cache pretty often. |
|
@aluzzardi some discussion in #7777 (comment), does that help? |
845a42b to
d67cea1
Compare
|
Do we still want this in If this does not look ready, we can push it to a patch. WDYT @aluzzardi @helderco ? |
|
Because it's a deprecation it doesn't need to be in this release - happy to push. |
b5b0c79 to
9524568
Compare
|
Updated this - if we're changing the property, we should also move it to |
vito
left a comment
There was a problem hiding this comment.
Approving in principle - glad to see this change (#3050 (comment)). Just some nits, and looks like it needs a rebase.
| tree: Directory! | ||
| tree( | ||
| """Set to true to discard .git directory.""" | ||
| discardGitDir: Boolean = false |
There was a problem hiding this comment.
Mini-bikeshed: I wonder if we even need this? With #8436 you could just exclude .git at the argument site, which would then be applied no matter how the Directory was created. But - I guess you don't want every call site to have to anticipate and exclude a .git directory. So it kind of makes sense to do it before passing it in, too. But you could also do .withoutDirectory(".git") which might be even less typing depending on your SDK. 🤷♂️
There was a problem hiding this comment.
There's an issue with Python uv that hold #8436 so for now we cannot merge it, but yeah I think it's not a good DX to force // +ignore=[".git/"] on every call.
There was a problem hiding this comment.
Good point. I'm happy with the idea of removing it, but also not opposed to keeping it.
There was a problem hiding this comment.
I think the point that this would prevent you from needing to always try to ignore/remove the dir out of caution is enough justification for keeping this option in place.
15f3718 to
cee9d4f
Compare
60bda5b to
2268342
Compare
Signed-off-by: Justin Chadwell <[email protected]>
Doesn't make sense to have it at the top-level at all, since it only effects the `tree` method. Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
2268342 to
baac646
Compare
569dd56 to
baac646
Compare
* feat: replace keepGitDir with discardGitDir Signed-off-by: Justin Chadwell <[email protected]> * feat: move discardGitDir onto tree Doesn't make sense to have it at the top-level at all, since it only effects the `tree` method. Signed-off-by: Justin Chadwell <[email protected]> * chore: add CHANGELOG Signed-off-by: Justin Chadwell <[email protected]> * review comments Signed-off-by: Justin Chadwell <[email protected]> --------- Signed-off-by: Justin Chadwell <[email protected]>
Closes #7777