Commits
- Commit:
6059809a13b5d528052e38f84661039e6565f458
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use size_t for loop indices to avoid signedness warnings; by emaste@freebsd
Same change as 16aeacf7088d, for subdirectories other than lib/
- Commit:
0d5bb27670e5cdef181f8073984fd02be5a42d53
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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@
- Commit:
71392a05f2ee999ddda39f6b5eb64d0bc292c0ce
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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
- Commit:
b380533788adf056655d5bdf9d7e497e53c5d85f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
histedit -f conflicts with -F option
Also fixed as part of a different patch from jrick
ok jrick
- Commit:
ff69268e3d2a6d3adf3c7b6a1284fca5ac8fc62a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use a helper function to generate error messages for mutually exclusive options
Inspired by a different patch from jrick
ok jrick
- Commit:
466785b9264da1a24c92aed9d706e76cc826601d
- From:
- Josh Rickmar <jrick@companyzero.com>
- Date:
add histedit -f flag for folding shortcut
"please push it" stsp
- Commit:
64453f7e55c4c69b6cd08229929ed8227b789ff8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
handle binary files in got/tog diff commands; add -a options to force text
- Commit:
be659d10a8dd75e169fb7a246f54238dfc4386e8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix type of filesize output parameter of got_object_blob_dump_to_file()
- Commit:
8fa913ec61095de669c9ca40e3cd782d53c85bdc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove now pointless 'check_disk' parameter of got_repo_map_path()
suggested by naddy
- Commit:
fe621944e83fe6367f7bff97128b4240a9cdc7c5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
merge new diff implementation from the git.gameoftrees.org diff.git repository
This new diff implementation was started by Neels Hofmeyr during the u2k20
hackathon and now replaces diffreg.c code lifted from the OpenBSD base system.
The integration of this code into Got was done by me.
Got now uses the patience diff algorithm by default.
The diff.git repository will remain the primary repository for the diff code,
which already compiles and runs on other operating systems such as Linux.
Any fixes and improvements for files inherited from the diff.git repository
should be written against that repository and synced to got.git afterwards.
- Commit:
4fedbf4c4e5ffc90d4eb6f38c58a4b9d927d896c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
avoid got_repo_map_path() in 'got tree' if a work tree is available
Note that got_worktree_resolve_path() will return a path based on
the current working directory if the argument is the empty string.
This quirk keeps the behaviour of 'got tree' intact which depends
on the current working directory if run in a work tree.
ok naddy@
- Commit:
017406073fd742cc052672dd2f2689838e76df3f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
avoid got_repo_map_path() in 'got blame'
'got blame' does not need access to the work tree. So far the work tree
was completely hidden with unveil(). We must now expose the work tree
while resolving the path, so unveil() calls are shuffled around slightly.
Failing realpath() calls would mess with path resolution otherwise.
There's a bug in got_worktree_resolve_path() where it failed to canonicalize
a path constructed from a user-specified path that does not exist on disk.
Note that this path falls into strncmp() a few lines down. I am fixing this
by adding canonicalization. Generally, joining paths with asprintf() and
comparing paths with strncmp() is fragile. A more general solution might be
needed but I am leaving that for another day.
ok naddy
- Commit:
7f9bfb3188bd9d77317f3205b61e96c7a55b005a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
replace resolve_commit_arg() helper in got.c with got_repo_match_object_id()
- Commit:
579bd556f987d6059cca7f20219140dae23079f3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
prevent a NULL dereference if 'got log -p' runs against a root commit
- Commit:
603cdeb0c7bcddc1abea9ced622f6eaa82c00f35
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got log' avoid got_repo_map_path() if run in a work tree
ok naddy
- Commit:
62d463cac1fd99c423acb07c0367c649724a2a9a
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
indentation fixes
- Commit:
54eb00d5beb979ca755db29889d236201e53cd52
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
properly handle nonexistent remote repository names given to 'got fetch'
found by jrick
ok naddy
- Commit:
f0207f6a4f16fab481f483d0db43ed50ca670e7e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch to got_path_basename() in cmd_checkout()
ok millert
- Commit:
42a285e2ca79f0deefcf9e35135b87cf86003e3b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
unveil repositories read-write when adding tags with 'got tag'
- Commit:
6879ba4225a833ea466b3512329293abfd9bf33a
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
do not treat the -h and -V flags as errors
When run with the -h or -V option, output the help or version text
to stdout and exit with success (0). Only write usage and help
information to stderr and exit with error (1) if there is a mistake
in the command syntax.
tweak and ok stsp
- Commit:
f535bcd44604b1994b9d4fe351236dc1a69758d8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix 'bad path' error from 'got clone' by unveiling the repository path again
Problem found by jrick
- Commit:
9814e6a376df853a88deb889d68f178c803ad8ca
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
prefer the BSD extension to reset getopt over the GNU one
Sadly there is no portable way to reset getopt(3).
BSD: optind = 1; optreset = 1;
GNU: optind = 0;
ok stsp
- Commit:
1367695b58142d73ad701f34f04fe45c4ad2782b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
fix potential type mismatches between format specifiers and arguments
Cast printf arguments of type time_t and off_t to long long to match
the %lld format specifier on platforms where this might not be the
case. In parse.y, switch the number variable to long long because
all its interactions are with that type anyway.
ok millert stsp
- Commit:
bfa12d5e80568029d33f5d0f2e9cee54bc20db27
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rework got's commit-time log message modification check
Use a new approach for detecting unchanged log messages: Strip comments
and leading/trailing empty lines from both the initial content and the
modified log message, then compare the result. Do not assume a fixed
upper limit for the length of a line.
Change suggested and patch tested by jrick
typo fix + ok naddy
- Commit:
820059fa2d7c7e7a0c9523368dad51044a088bbc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
whitespace fixes (patch by jrick)