Commits
- Commit:
1eb651da6aa7d016f6c30a0417b4259f5de7a35c
- From:
- James Cook <falsifian@falsifian.org>
- Date:
in diff error message, say what was being diffed
When trying to run "got ci" adding a large file, this changes the
following error message:
got: diff_atomize_file: Cannot allocate memory
into:
got: /dev/null vs /path/to/the/really/big/file: diff_atomize_file: Cannot allocate memory
ok stsp@
- Commit:
cf31b4749a965b44fa03a3c98bdfc8b60f2c987d
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix a segfault in got diff when a root commit is passed to -c
Problem reported by Alexander Arkhipov
ok jamsek
- Commit:
760a1ec3d507da3e46a5dc13041ad1a23cfc0847
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make diffing files which changed into dirs and vice-versa possible
Problem marked with a TODO comment by me ages ago and rediscovered by naddy@
ok op@
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
bbc740ac4905ed0d4ba6334f6225c8f8c9f3c394
- From:
- Omar Polo <op@omarpolo.com>
- Date:
introduce got_object_id_hex to replace some got_sha1_digest_to_str()
It's an analogous to got_object_id_str but writes to the given buffer.
ok + improvements by stsp@
- Commit:
1f3405c91dec0b4eb48df5156751b5ef6add3f37
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
refactor got log -d and tog diffstat to compute diff once
This eliminates the previous performance cost by making 'got log -d' and tog
diff view compute the diffstat while building the diff in a temp file like we
do with 'got diff -d'. Also, keep the current 'got log -d' UI as per stsp's
suggestion.
ok stsp@
- Commit:
5fa52d6cdcc6de872ce3c7f6639cc638fd83eeea
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: style(9) and cleanup failure leaks lib/diff.c
Spotted while implementing diffstat plus one introduced with diffstat code.
Don't leak 'change' on got_pathlist_append() error. And don't leak modestr{1,2}
and l{1,2} char pointers in diff_blobs() and got_diff_tree(), respecitvely.
Regarding modestr leaks, rather than free at all error return points, use op's
suggestion to lift modestr vars to function scope.
ok op@
- Commit:
6b37f13aa48dd88d4cc6c8176104a3101d7a260c
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
add regress for 'got diff -d' and minor output fix
Ensure an actual file path is displayed in the 'got diff -d -c commit path ...'
case when one of the specified paths is a deleted file. Prior to this, the
unhelpful "/dev/null" label was shown instead. Includes some copypasta fixes
noted by op.
ok stsp@ op@
- Commit:
a76e88e58fb716d5dded83442b153b60687283cb
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: expand diffstat -d option to 'got diff'
Like got log -d, add the switch to 'got diff' to display a diffstat of changes;
as per stsp's suggestion, we always include diff output with the diffstat.
Disabled in gotwebd (for now :) Includes tweaks from op@
ok stsp@
- Commit:
3846622fc49b9a60aeee751320ed58ac58d38ef6
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
plug leak of got_diffreg_result on output failure
Move 'done' labels up so that if got_diffreg_output() fails we still call
got_diffreg_result_free() instead of jumping straight over it.
ok + fix from stsp@
- Commit:
5191b70b5b2e123aadd88aeafe2e2cfc0958c327
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: implement diffstat for got log and tog diff view
Add new got_diff_blob_cb() implementation to compute added/removed line metrics
for a given diff. This enables displaying a diffstat with 'got log -d'. As per
suggestion from stsp, change tog diff view to display the diffstat by default.
ok stsp@
- Commit:
c87842d5aed77e4f15bab3980e8cb22f18e954f8
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
show file mode for new added files in work tree diffs
Make work tree diffs of local changes on disk display the file mode of new
added files like other versions of `got diff` currently do.
ok stsp@
- Commit:
2d61e38170df9e7e558024fa6f3c05196148f15a
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: fix typo in diff nlines > 0 check
We want to check if *nlines is greater than zero here.
ok op@ and stsp@
- Commit:
36e83e5eea8d1387c024006cc320e4ef9d545b16
- From:
- Omar Polo <op@omarpolo.com>
- Date:
check for fprintf failure
- Commit:
c7d5c43cafada3470647a8b876d489018002f713
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: keymaps to jump to next/prev file/hunk in the diff
Add () and {} key maps to navigate to the previous and next file or hunk in
the diff. This required changing Got's diff API to collect line type metadata
in addition to the line offsets already produced as prompted by stsp.
ok stsp@
- Commit:
4b752015b5208a96c2d1b6c1c6b8589884b8b2b6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch 'tog diff' and 'tog blame' to Myers diff for speed
Make the choice of diff algorithm configurable by diff API users.
The got and gotweb programs keep using Patience diffs which are
prettier than Myers. But tog should be as fast as possible since
it is being used interactively. If performance of Patience diff
gets improved later we can consider switching tog back over to it.
ok tracey jamsek
- Commit:
49d4a01751d39b078bfb27a2d63b5cfa69e410fd
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move more opentemp out of diffreg.c
ok tracey
- Commit:
f9d376997dd2e84bf84c3c9a4da842d1b5565e9d
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move got_opentempfd() out of lib/diff.c again
ok tracey
- Commit:
eb81bc23c735e8aa9eaee796a230c7d7c76657ba
- From:
- Tracey Emery <tracey@traceyemery.net>
- Date:
move got_opentempfd out of open_blob. ok stsp@
- Commit:
58e31a80da4f4a9e10eaea148672190f35107a47
- From:
- Omar Polo <op@omarpolo.com>
- Date:
build with -Wwrite-strings
Throwing this into the mix for a while, we can always get rid of it
again if it becomes annoying. No objections from stsp@
- Commit:
8469d82143a591d423c000c47c63bababe6f5716
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
always show commit or tree IDs in diff header, in order to help 'got patch'
The idea is that got patch can simply look for a line such as:
commit - abcde1234567...
to find the merge base commit ID to show in diff3 conflict markers.
got log -p now displays commit IDs in its diff header, instead ofl
tree or blob IDs.
ok op@
- Commit:
a558dd1be5714d8e7a83f7d63180550e86ccae5c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
reuse a temporary file across commits during got log -p -S
suggested by + ok op@
- Commit:
b72706c3d172544098fcd24fd639374694a8fce9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move creation of tempfiles outside of lib/diff.c
ok tracey
- Commit:
46ea77db89a0945a013f032c6c6a94779126412f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
sort paths in got log -Pp and tog's diff view the same way as in the diff
reported by and fix confirmed by naddy
- Commit:
67b631c9e0d2c43ceeda1a387ba696b2d34a1035
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
implement 'got diff -c' for diffing commits with optional filtering by path
Need for filtering by path sugggested by kn@
ok naddy@