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
Improve cruft update's rejection fallback #49
Comments
I agree there is room for improvement, I just recently upgraded cruft and have been trying to figure out a good workflow with .rej files but so far to no avail. For my usage, I am always using a git repo, and I like how cruft < 1.4 created merge conflict markers in the files because there are lots of GUIs for handling these, and IMO more straightforward when the original and changes are in the same file. I would just delete all the .orig files (they are not particularly useful when everything is tracked in git) and resolve the conflicts. According to #35 cruft went to using I did a quick experiment, where cruft falls back to the patch behavior One strategy I'm thinking which could may resolve this and give the same UX across git and non git would be:
I'm curious your thoughts on this approach. I'm also curious whether you would consider having command line options in the library to customize this behavior, e.g. adding a flag for I'm happy to experiment more with this and submit a PR depending on what you would consider should be included in cruft. |
I like the workflow you've suggested @nickderobertis and would use it over the current workflow. |
The above looks good to me. The only thing to consider is the behavior of patch in Linux vs macOS. IIRC macOS doesn't have the gnu version by default and it would be nice if we could vendor it. |
Any update on this? The user experience of conflicts is the main pain point in my use of cruft. |
I'm having the same issue. In my case, it has to replace a single line a |
@samj1912 what does a non-git project type mean? |
Hi, |
Hi, |
We could definitely use improvements to this for our projects. We have lots of repos built off a template maintained by people who are not git experts and this can cause lots of confusion. Edit: after using cruft a little longer, this would be a game changer! |
Currently, if a user modifies a cookiecutter template's file in a manner that it is no longer similar to the original version, cruft update fails to apply the patch using git 3 way merge and instead falls back to git apply --reject, which produces a bunch of*.rej files. This is not the best way for an end user to manually fix updates. We should look into how we can improve this experience. For more details about the fallback, see #47 and #48
The text was updated successfully, but these errors were encountered: