Fix GHSA-794x-2rpg-rfgr.
`gix::Repository::work_dir` was renamed to `workdir` (though strangely
not the `gix::ThreadSafeRepository` version), and `lossy_config`
is now off by default in all configurations.
These merge tools didn't work properly on conflicted trees with more
than two sides since they didn't simplify the conflict before resolving.
The new implementation is more similar to how external merge tools are
executed, which should give a more consistent behavior.
With this template, a 'git format-patch' compatible
email message can be generated using something like:
jj show --git --template git_format_patch_email_headers <rev>
Since 7618b52b "cli: consider 'JJ:' lines as comments also when not followed by
space", lines starting with "JJ:" (without space) are also ignored. We can
simply add "JJ:" prefix to empty intro/instruction lines.
Closes#5484
This helps detect whether the last line is "JJ:" instruction or not. It seems
also nice that I don't have to insert newline to reflow the edited paragraph.
A subset of cli tests could fail if the system /etc/gitconfig had
configuration interfering with the tests. The cause seems to be running
of `jj` commands that would in turn use a `git` subprocess.
Fix this by setting `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL`, like
in `hermetic_git`.
Fixes#6159
When rendering diff of conflicts, it might make sense to show diff of negative
(or base) terms with "removed"/"added" labels swapped. For example, diffs
between A and B-C+D can be rendered as
{left, right} = {A (-), B (+)}, {A (+), C (-)}, {A (-), D (+)}
by padding -A+A to the left side. To achieve that, I'm thinking of adding
labels: [&str; 2] parameter. This patch will help keep function arguments more
consistent there.
FWIW, I also tried rendering in {A (-), B (+)}, {C (-), D (+)} forms. This
seemed not intuitive because, when diffing, we compare two distinct states. In
the example above, the diff {C, D} should be considered an internal state at the
right side, not the states pair to be diffed.
I think this makes more sense because WorkspaceId is currently a human-readable
name. In error/status messages, workspace names are now printed in revset
syntax.
New WorkspaceId types do not implement Default. It would be weird if string-like
type had non-empty Default::default(). The DEFAULT constant is provided instead.