cowsay-org / cowsay

apjanke's fork of the classic cowsay project
http://cowsay.diamonds
GNU General Public License v3.0
83 stars 15 forks source link

Source tree symlink for cowthink.1 man page #27

Closed ndim closed 2 months ago

ndim commented 2 years ago

This makes the source tree cowthink.1 a symlink to the cowsay.1 file just like cowthink already is a symlink to the cowsay script file.

This avoids the need to revert the cowthink.1 file to not have the man1/ part in the reference to cowsay.1, which you need to do every time a2x has re-built the man page from cowsay.1.adoc.

This consists of two commits which cannot be squashed. Update: This appears to be untrue after all. Some research needed.

This builds on PR 26, so for reviewing this, you only need to consider the last two commits in the series of commits.

apjanke commented 2 years ago

Oh, sorry if I was unclear in my PR review comment: yep, everything you said in the PR's main description makes sense, including the commit history arrangement. After #26 is merged, we'll roll this right in.

And I'll play around with the git CLI and see if I can get them into a single commit. I don't know enough about Git's internal data model to know if that should be possible or not.

apjanke commented 2 years ago

Hey check it out, I think I was able to do the regular file to symlink conversion in a single commit: https://github.com/cowsay-org/cowsay/commits/apj/WIP/ndim-cowthink-symlink-in-one-comit

Haven't figured out how to do it using regular commit actions (the git add operations seem tricky), but I copied your branch, did a git rebase -i master and made the last commit a fixup to merge it into the prior one, and that seemed to work just fine.

What do you think?

ndim commented 2 years ago

Hey check it out, I think I was able to do the regular file to symlink conversion in a single commit: https://github.com/cowsay-org/cowsay/commits/apj/WIP/ndim-cowthink-symlink-in-one-comit

I managed to do that as well, but...

Haven't figured out how to do it using regular commit actions (the git add operations seem tricky), but I copied your branch, did a git rebase -i master and made the last commit a fixup to merge it into the prior one, and that seemed to work just fine.

What do you think?

As the git user interface is that weird around this (and I have found reports on gitlab bugs around the similar thing of the web UI did not show properly when a symlink was replaced by a regular file), I would err on the side of caution and compatibility by keeping this PR as two separate commits, possibly held together by one --no-ff merge commit.

apjanke commented 2 years ago

I would err on the side of caution and compatibility by keeping this PR as two separate commits

Works for me; there's no real impact to that.

ndim commented 2 months ago

This PR appears to have been made obsolete by the switch from a2x to asciidoctor: asciidoctor generates the cowthink.1 file without the man1/ prefix, so the original problem does not present itself any more.