Skip to content
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

unexpected issues when path doesn't point to root of working tree #2983

Open
krancour opened this issue Nov 22, 2024 · 3 comments
Open

unexpected issues when path doesn't point to root of working tree #2983

krancour opened this issue Nov 22, 2024 · 3 comments

Comments

@krancour
Copy link
Member

It was discovered here that unexpected things can happen when the git-commit step's path field points to a directory within a working tree instead of to the root of the working tree.

I think the manner in which git-commit was used here was sensible, so what I propose is:

  1. When loading an existing working tree from a user-specified path, use git rev-parse --show-toplevel to find the root of the repo/working tree and load from there.

  2. There is a rather limited number of methods defined by the WorkTree interface that could benefit from gaining the option to work within a path that isn't the root of the working tree. They could gain the option to specify a working directory (that is verifiably within the working tree).

Between these two changes, a step like git-commit, when configured with a path that isn't the root of the working tree, would still load the working tree properly and the specified path could be used as the working directory for relevant commands.

@krancour krancour added this to the v1.2.0 milestone Nov 22, 2024
@krancour krancour self-assigned this Nov 22, 2024
@krancour krancour modified the milestones: v1.2.0, v1.3.0 Dec 13, 2024
@RohanMishra315
Copy link
Contributor

Hey @krancour Can I work on this ?

@krancour
Copy link
Member Author

@RohanMishra315 I assigned this to myself because I think this issue may be deceptively complex.

@RohanMishra315
Copy link
Contributor

@RohanMishra315 I assigned this to myself because I think this issue may be deceptively complex.

yeah, after carefully evaluation i thought it might require brain to do , if you have any issues I could work on than, it would be great, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants