Repository navigation
Conversation
Additionally, allow working with dirty working directories. A potentially dirty directory can be created by calling `Directory.asGit.working`. Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
|
Leaving this as a note - but I don't think this is the right API. Having dirty state encoded as refs is weird, and can result in inconsistencies. I was thinking about adding a new type, like But yeah, not particularly sure. Essentially, this just needs to be discoverable somehow so we could build it into agent tooling. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
Opening as a base to discuss!
x-linking #8520 for how this should interact with modules (tl;dr we can use contextual git).
Usage
Changes
GitRefs can now bediffed against arbitrary commits.GitRepository.workingis a variant ofGit.headthat gets the current state, but includes any changes to the working directory. This means that:GitRef.diffwith no args will return a non-empty diffGitRef.dirtywill return trueGitRef.treewill return a directory with the working directory changesGitRef.commitreturns a<commit>-dirtyCaveats
GitRef.difffor remote refs doesn't work very well because of shallow-cloning (see ✨ Support--depthwhen usingdag.git#7637, working on a fix for this as part of feat: lift git logic out of buildkit into dagop #9980)To debate
GitRef.difftake aString? Or aGitRef?Let the bikeshedding begin!