Closed ndim closed 2 months 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.
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?
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 agit rebase -i
master and made the last commit afixup
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.
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.
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.
This makes the source tree
cowthink.1
a symlink to thecowsay.1
file just likecowthink
already is a symlink to thecowsay
script file.This avoids the need to revert the
cowthink.1
file to not have theman1/
part in the reference tocowsay.1
, which you need to do every timea2x
has re-built the man page fromcowsay.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.
Remove regular file
cowthink.1
(preparing for symlink)It appears git cannot change a source tree file from regular file to symlink within a single commit, so this is the first part which removes the regular file. Update: Is this just limitation of
git gui
andgit
can actually handle this?Adding the symlink will be in the next commit.
Make source tree
cowthink.1
a symlink tocowsay.1
As the source tree is already using symlinks for the
cowthink
script, we can assume working symlinks and therefore can use them for thecowthink.1
man page as well.This has the advantage that when the man page is updated, no special treatment is required for the
man1/cowthink.1
reference inside thecowthink.1
file produced bya2x
.Note that due to an apparent limitation of the git tool, an earlier commit must remove the regular file
cowthink.1
before this commit can add a symlink calledcowthink.1
.