Skip to content

More test coverage for Repository::state::InProgress #393

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

Conversation

inferiorhumanorgans
Copy link

This also caught a flaw in the CherryPickSequence and RevertSequence logic.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a million, it's great to see this fully tested (and of course to see that testing is truly worth it to catch actual issues).

I can do some refactoring on top (see my comment) to make it mergable, but would ask you to try to use git-lfs to not checkin actual binary files of fixture archives like is the state now.

It's surprising that git allows to add these in the first place as I would expect it to fail if a configured filter isn't found (it's in .gitattributes in the root).

Please let me know in case git-lfs isn't working for you for some reason and I will cleanup the history accordingly. I also realized that the test system definitely needs a switch to ignore archives which is something I'd use to validate the scripts actually work on MacOS and maybe even on Windows.


git init -q

echo 1.main > 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue I am having with naming files with numbers while redirecting into them is that … >1 has a different meaning than > 1, and it's just a little too close for me to feel comfortable while reading the script.

I hope you can see the point and avoid such names in the future, and I am happy to rename it for you for now as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the joys of sh. The only thing I'd add is that for this script I saved the path to the patch in ${patch_path} but the call to git am references the file directly.

The latter should be git am "${patch_path}".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint. It's adjusted in cfaf31f.

Byron added a commit that referenced this pull request Apr 18, 2022
That way fixture scripts can forcefully be executed which adds some
safety if the feature is actually used.
Byron added a commit that referenced this pull request Apr 18, 2022
A convenient way to obtain the name of a head, if not detached.
Byron added a commit that referenced this pull request Apr 18, 2022
Byron added a commit that referenced this pull request Apr 18, 2022
It seems less descriptive, but then again, people are coming from
`git2` and might appreciate familiarity.

Maybe this can be merged into something more descriptive in a future
`status()` platform, like `status().in_progress()`.
Byron added a commit that referenced this pull request Apr 18, 2022
@Byron
Copy link
Member

Byron commented Apr 18, 2022

Thanks a lot for your continued contribution, it's much appreciated!

I took the liberty to do the refactors myself as it's faster to do that than to review again, thanks for your understanding.
Since I had to squash the commits to make removing the binary archives from the history easier, I have to close this commit as its content is contained in #395 .

@Byron Byron closed this Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants