portable: running tests when shell is dash (ta/fix-dash-platform)
Ubuntu's default shell is dash, when using /bin/sh. The portable nature of got is such that "$OSTYPE" to determine the host type (linux, bsd, etc.) is bash-specific and is not part of POSIX. autotools already provide a mechanism for determining the underlying platform type, and PLATFORM is already a subst value. Therefore, let the -portable parts of the regress test-suite use $PLATFORM to look at the underlying OS type. The tests themselves already expect /bin/sh to be POSIX-compliant in all other areas, so there should be no need to change the #! lines.
The letter "o" does not overlap with existing options of 'got ref' and is also used by mutt(1) for this purpose.
Make worktree_open part of the build.
This fixes an issue where some references were missing from lists of references sorted by timestamp.
Move a small amount of code from worktree.c to a new file worktree_open.c, which contains everything required to open and close a work tree and inspect some of its basic parameters. This can be used by gotadmin. ok tracey
Replace hand-rolled parentheses with the proper mdoc(7) macro, otherwise the closing ")" ends up inside the command description. Reported by Josh Rickmar, thanks!
Always update to the specified branch even if the branch is already rebased (no commits needed to be rebased, and the branch does not need a fast forward). With the old behavior of erroring and staying on the current branch, I sometimes found myself ignoring the error message, treating it as information and assuming the branch update, and later on committing on top of origin/main instead of the main branch. feedback and ok stsp
Tests by kn, thomas_adam and myself made on various repositories indicate that 3 is a good choice. Tyring 10 deltas is much slower and does not result in significantly smaller pack files.
Although configure.ac will for the presence of bison, the READMEs didn't say that was a required program. Patch from Carlos Torres