1
0
mirror of https://github.com/git/git.git synced 2024-10-21 11:38:56 +02:00
git/builtin
Elijah Newren db757e8b8d show, log: provide a --remerge-diff capability
When this option is specified, we remerge all (two parent) merge commits
and diff the actual merge commit to the automatically created version,
in order to show how users removed conflict markers, resolved the
different conflict versions, and potentially added new changes outside
of conflict regions in order to resolve semantic merge problems (or,
possibly, just to hide other random changes).

This capability works by creating a temporary object directory and
marking it as the primary object store.  This makes it so that any blobs
or trees created during the automatic merge are easily removable
afterwards by just deleting all objects from the temporary object
directory.

There are a few ways that this implementation is suboptimal:
  * `log --remerge-diff` becomes slow, because the temporary object
    directory can fill with many loose objects while running
  * the log output can be muddied with misplaced "warning: cannot merge
    binary files" messages, since ll-merge.c unconditionally writes those
    messages to stderr while running instead of allowing callers to
    manage them.
  * important conflict and warning messages are simply dropped; thus for
    conflicts like modify/delete or rename/rename or file/directory which
    are not representable with content conflict markers, there may be no
    way for a user of --remerge-diff to know that there had been a
    conflict which was resolved (and which possibly motivated other
    changes in the merge commit).
  * when fixing the previous issue, note that some unimportant conflict
    and warning messages might start being included.  We should instead
    make sure these remain dropped.
Subsequent commits will address these issues.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-02 10:02:27 -08:00
..
add.c run-command API users: use strvec_pushl(), not argv construction 2021-11-25 22:15:07 -08:00
am.c Merge branch 'ab/config-based-hooks-1' 2021-10-13 15:15:57 -07:00
annotate.c
apply.c
archive.c use xopen() to handle fatal open(2) failures 2021-08-25 14:39:08 -07:00
bisect--helper.c bisect--helper: add space between colon and following sentence 2021-10-01 15:47:53 -07:00
blame.c Merge branch 'ld/sparse-diff-blame' 2021-12-21 15:03:17 -08:00
branch.c worktree: simplify find_shared_symref() memory ownership model 2021-12-01 22:18:25 -08:00
bugreport.c hook-list.h: add a generated list of hooks, like config-list.h 2021-09-27 09:44:54 -07:00
bundle.c Merge branch 'ab/bundle-remove-verbose-option' 2021-10-03 21:49:20 -07:00
cat-file.c cat-file: use packed_object_info() for --batch-all-objects 2021-10-08 15:45:14 -07:00
check-attr.c
check-ignore.c dir.[ch]: replace dir_init() with DIR_INIT 2021-07-01 12:32:22 -07:00
check-mailmap.c
check-ref-format.c
checkout--worker.c pkt-line.[ch]: remove unused packet_read_line_buf() 2021-10-15 13:09:40 -07:00
checkout-index.c Merge branch 'mt/parallel-checkout-part-3' 2021-05-16 21:05:23 +09:00
checkout.c Merge branch 'en/zdiff3' 2021-12-15 09:39:47 -08:00
clean.c dir.[ch]: replace dir_init() with DIR_INIT 2021-07-01 12:32:22 -07:00
clone.c clone: fix a memory leak of the "git_dir" variable 2021-10-23 10:45:25 -07:00
column.c column: fix parsing of the '--nl' option 2021-08-26 14:36:27 -07:00
commit-graph.c Merge branch 'ab/ignore-replace-while-working-on-commit-graph' 2021-11-01 13:48:08 -07:00
commit-tree.c use xopen() to handle fatal open(2) failures 2021-08-25 14:39:08 -07:00
commit.c hook.c users: use "hook_exists()" instead of "find_hook()" 2021-09-27 09:44:54 -07:00
config.c urlmatch.[ch]: add and use URLMATCH_CONFIG_INIT 2021-10-01 14:22:51 -07:00
count-objects.c
credential-cache--daemon.c
credential-cache.c credential-cache: check for windows specific errors 2021-09-14 09:30:54 -07:00
credential-store.c Use a better name for the function interpolating paths 2021-07-26 12:17:16 -07:00
credential.c doc: fix git credential synopsis 2021-10-28 09:57:09 -07:00
describe.c hash: provide per-algorithm null OIDs 2021-04-27 16:31:39 +09:00
diff-files.c
diff-index.c diff-index: restore -c/--cc options handling 2021-09-07 11:11:35 -07:00
diff-tree.c
diff.c diff: enable and test the sparse index 2021-12-06 09:55:06 -08:00
difftool.c difftool: use "env_array" to simplify memory management 2021-11-25 22:15:08 -08:00
env--helper.c
fast-export.c Merge branch 'ab/fsck-unexpected-type' 2021-10-25 16:06:56 -07:00
fast-import.c Use the final_oid_fn to finalize hashing of object IDs 2021-04-27 16:31:38 +09:00
fetch-pack.c
fetch.c fetch: protect branches checked out in all worktrees 2021-12-01 22:18:25 -08:00
fmt-merge-msg.c
for-each-ref.c for-each-ref: delay parsing of --sort=<atom> options 2021-10-20 14:33:07 -07:00
for-each-repo.c builtin/for-each-repo: remove unnecessary argv copy to plug leak 2021-07-26 12:19:20 -07:00
fsck.c run-command API users: use strvec_pushl(), not argv construction 2021-11-25 22:15:07 -08:00
gc.c Merge branch 'ds/no-usable-cron-on-macos' 2021-11-10 15:01:20 -08:00
get-tar-commit-id.c
grep.c grep: fix a "path_list" memory leak 2021-10-23 10:45:25 -07:00
hash-object.c Merge branch 'jc/prefix-filename-allocates' into maint 2021-10-12 13:51:32 -07:00
help.c run-command API users: use strvec_pushl(), not argv construction 2021-11-25 22:15:07 -08:00
index-pack.c i18n: fix typos found during l10n for git 2.34.0 2021-10-31 22:49:49 -07:00
init-db.c Merge branch 'mt/init-template-userpath-fix' 2021-05-25 16:21:20 +09:00
interpret-trailers.c
log.c show, log: provide a --remerge-diff capability 2022-02-02 10:02:27 -08:00
ls-files.c ls-files: add missing string_list_clear() 2021-10-07 15:40:15 -07:00
ls-remote.c for-each-ref: delay parsing of --sort=<atom> options 2021-10-20 14:33:07 -07:00
ls-tree.c
mailinfo.c mailinfo: allow squelching quoted CRLF warning 2021-05-10 15:06:22 +09:00
mailsplit.c use xopen() to handle fatal open(2) failures 2021-08-25 14:39:08 -07:00
merge-base.c
merge-file.c xdiff: implement a zealous diff3, or "zdiff3" 2021-12-01 14:45:58 -08:00
merge-index.c merge-index: ensure full index 2021-04-14 13:47:21 -07:00
merge-ours.c builtins + test helpers: use return instead of exit() in cmd_* 2021-06-09 09:15:58 +09:00
merge-recursive.c
merge-tree.c xdiff users: use designated initializers for out_line 2021-05-11 12:47:31 +09:00
merge.c run-command API users: use strvec_pushl(), not argv construction 2021-11-25 22:15:07 -08:00
mktag.c fsck: report invalid object type-path combinations 2021-10-01 15:06:01 -07:00
mktree.c builtins + test helpers: use return instead of exit() in cmd_* 2021-06-09 09:15:58 +09:00
multi-pack-index.c builtin/multi-pack-index.c: don't leak concatenated options 2021-10-28 15:32:14 -07:00
mv.c mv: refuse to move sparse paths 2021-09-28 10:31:02 -07:00
name-rev.c name-rev: prefer shorter names over following merges 2021-12-04 23:39:34 -08:00
notes.c Merge branch 'ak/protect-any-current-branch' 2021-12-21 15:03:16 -08:00
pack-objects.c Merge branch 'ab/die-with-bug' 2021-12-15 09:39:55 -08:00
pack-redundant.c builtin/pack-redundant: avoid casting buffers to struct object_id 2021-04-27 16:31:38 +09:00
pack-refs.c
patch-id.c
prune-packed.c
prune.c Merge branch 'ns/tmp-objdir' into en/remerge-diff 2021-12-21 15:29:45 -08:00
pull.c Merge branch 'ah/advice-pull-has-no-preference-between-rebase-and-merge' 2021-12-10 14:35:09 -08:00
push.c advice: remove read uses of most global advice_ variables 2021-08-25 12:07:52 -07:00
range-diff.c
read-tree.c Change unpack_trees' 'reset' flag into an enum 2021-09-27 13:38:37 -07:00
rebase.c Merge branch 'js/retire-preserve-merges' 2021-10-18 15:47:56 -07:00
receive-pack.c Merge branch 'ns/tmp-objdir' into en/remerge-diff 2021-12-21 15:29:45 -08:00
reflog.c reflog: free() ref given to us by dwim_log() 2021-10-23 10:45:25 -07:00
remote-ext.c
remote-fd.c
remote.c Merge branch 'ab/designated-initializers-more' 2021-10-18 15:47:57 -07:00
repack.c Merge branch 'po/size-t-for-vs' 2021-12-10 14:35:10 -08:00
replace.c run-command API users: use strvec_pushl(), not argv construction 2021-11-25 22:15:07 -08:00
rerere.c xdiff users: use designated initializers for out_line 2021-05-11 12:47:31 +09:00
reset.c Merge branch 'vd/sparse-reset' 2021-12-10 14:35:12 -08:00
rev-list.c rev-list: add option for --pretty=format without header 2021-07-12 10:12:31 -07:00
rev-parse.c refs: drop "broken" flag from for_each_fullref_in() 2021-09-27 12:36:45 -07:00
revert.c Merge branch 'ds/mergies-with-sparse-index' 2021-09-20 15:20:45 -07:00
rm.c Merge branch 'ds/add-rm-with-sparse-index' 2021-10-13 15:15:56 -07:00
send-pack.c Merge branch 'jk/http-push-status-fix' 2021-10-29 15:43:12 -07:00
shortlog.c parse-options.[ch]: consistently use "enum parse_opt_result" 2021-10-08 14:13:11 -07:00
show-branch.c show-branch: show reflog message 2021-12-02 11:14:07 -08:00
show-index.c builtin/show-index: set the algorithm for object IDs 2021-04-27 16:31:39 +09:00
show-ref.c
sparse-checkout.c sparse-checkout: clear tracked sparse dirs 2021-09-07 22:41:10 -07:00
stash.c stash: get rid of unused argument in stash_staged() 2021-10-28 14:17:14 -07:00
stripspace.c
submodule--helper.c Merge branch 'mp/absorb-submodule-git-dir-upon-deinit' 2021-12-10 14:35:15 -08:00
symbolic-ref.c
tag.c for-each-ref: delay parsing of --sort=<atom> options 2021-10-20 14:33:07 -07:00
unpack-file.c
unpack-objects.c hash: provide per-algorithm null OIDs 2021-04-27 16:31:39 +09:00
update-index.c use xopen() to handle fatal open(2) failures 2021-08-25 14:39:08 -07:00
update-ref.c update-ref: fix streaming of status updates 2021-09-03 11:35:15 -07:00
update-server-info.c
upload-archive.c upload-archive: use regular "struct child_process" pattern 2021-11-25 22:15:07 -08:00
upload-pack.c upload-pack: document and rename --advertise-refs 2021-08-05 08:59:37 -07:00
var.c var: add GIT_DEFAULT_BRANCH variable 2021-11-03 13:25:36 -07:00
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c Merge branch 'es/worktree-chatty-to-stderr' 2021-12-15 09:39:49 -08:00
write-tree.c