Commit Briefs
diff: reduce duplicate code
Condense error checking to reduce a future diff moving those lines around; this pattern is already used in other parts of the tree. fine stsp ok tracey
ensure that old commits remain referenced after rebase and histedit
Create automatic "backup" references which ensure that objects from the pre-rebase or pre-histedit state remain in the repository. A new -l option for 'got rebase' and 'got histedit' lists old commits. This makes it easier to recover from botched rebase or histedit operations. Removal of such objects currently requires got ref -d and git-gc. This will be made more convenient in the future. testing and ok jrick
Fix strftime(3) short buffer checks
strftime(3) returns 0 if the buffer was too short to write the complete string (including NUL) and will never return more than maxsize-1. ok stsp
include remote branches in the output of 'got branch -l'
This makes it easier to discover the existence of copies of remote branches in the local repository, and fixes a missing asterisk in 'got branch -l' while the work tree is switched to a remote branch. Prompted by feedback from helg, thanks!
add 'got commit -F' option to commit with a log message stored in a file
To avoid accidents commit -F opens the prepared log message in an editor so it can be reviewed before the commit is created. For non-interactive use the -N option is required in addition to -F. ok millert@
add a 'reference' directive to remote repositories in got.conf(5)
Make use of this in 'got clone' to persist -R option arguments given on the command line in the cloned repository's got.conf(5) file.
add a 'fetch-all-branches' configuration setting to got.conf(5)
Set fetch-all-branches in the got.conf(5) file created by 'got clone -a' in order to make a future 'got fetch' act like 'got fetch -a' by default.
allow the 'got fetch' -l option together with the -q option
Make use of this in tests to hide useless output from ssh(1).
make 'got clone' pin the fetched branch in got.conf(5)
Avoids relying on the server-side HEAD ref by default during future fetches.
make use of a reflist object id map in 'got log'
Impoves performance of 'got log' on the FreeBSD Git repo which can easily contain more than 4000 references.
Add a refs argument to got_repo_match_object_id(), replacing 'resolve_tags'
Make use of this where possible to avoid re-reading references from disk. ok naddy
use size_t for loop indices to avoid signedness warnings; by emaste@freebsd
Same change as 16aeacf7088d, for subdirectories other than lib/
allow editing of log message comments with 'got histedit'
This makes it possible to remove just comment lines from log messages during a histedit operation, leaving the rest of the log message as-is. The behaviour of treating changes to comment lines as no-ops was coded to prevent mistakes during 'got commit/import/tag', where the command will error out if the log message template is not modified. This is not appropriate for histedit because histedit is used to fix such mistakes. ok millert@
prevent log message loss of folded commits during histedit
If the histedit log message editor exits without saving its buffer, Got threw away log messages of all commits which were folded. Only the last commit message is preserved, which could be something meaningless like "fixup". Instead, preserve the initial editor buffer content as-is. That is not going to be an ideal log message, but doesn't throw away information and stands out visually because the newly created log message will start with a comment like '# log message of folded commit a0ff...' Problem reported by jrick
histedit -f conflicts with -F option
Also fixed as part of a different patch from jrick ok jrick