ok/jj
1
0
Fork 0
forked from mirrors/jj
Commit graph

107 commits

Author SHA1 Message Date
Jonathan Lorimer
e54e83b0f5 docs: Add information about configuring delta pager
docs: Add information about configuring delta pager

docs: only mention pager, not diff
2024-04-29 10:22:05 -07:00
Ilya Grigoriev
77eaf67f96 revsets.md: document the all: prefix modifier for revsets
While this is arguably not part of the revset language, this
is a likely place for a user to look.

See https://discord.com/channels/968932220549103686/968932220549103689/1228065431281995837
2024-04-20 14:12:26 -07:00
Austin Seipp
493020c0a6 docs: add an entry for snapshot.max-new-file-size
This was not documented, for some reason.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I01a86a2d62b225c0175ed690fe9966ed22c92745
2024-04-19 13:03:24 -05:00
Ilya Grigoriev
8fa256ebac New jj debug watchman status command
This command checks not only whether Watchman works, but also whether
it's enabled in the config. Also, the output is easier to understand
than that of the other `jj debug watchman` commands.

It would be nice if `jj debug watchman` called `jj debug watchman
status`, but it's not trivial in `clap` to have a default subcommand.
2024-04-11 10:55:59 -07:00
Ilya Grigoriev
383711fcd8 config docs: document valid fsmonitor values
I was wondering how to disable the watchman in a repo if it's enabled in
the user config.
2024-04-11 10:55:59 -07:00
Austin Seipp
db14f33170 cli: add ui.always-allow-large-revsets option
This lets users use "large" revsets in commands such as `jj rebase`, without
needing the `all:` modifier.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Ica80927324f3d634413d3cc79fbc73057ccefd8a
2024-04-04 18:38:48 -05:00
Martin von Zweigbergk
361b4ca425 docs: use command with argument as example for ui.default-command
Makes it easier to figure out how to pass arguments.
2024-04-04 11:19:07 -07:00
Noah Mayr
b79984884d cli: only use default log revset when neither path nor revset is provided 2024-04-03 07:57:06 +02:00
Yuya Nishihara
a2a9b7decb templater: add coalesce() function that selects first non-empty content
This can be used to flatten nested "if()"s. It's not exactly the same as "case"
or "switch" expression, but works reasonably well in template. It's not uncommon
to show placeholder text in place of an empty content, and a nullish value
(e.g. empty string, list, option) is usually rendered as an empty text.
2024-03-28 10:51:47 +09:00
Yuya Nishihara
c311131ee2 log: encode elided node as None
Since elided graph entry has no associated commits, it makes some sense to
represent as None?
2024-03-24 10:32:15 +09:00
Anton Älgmyr
e2eb5bddf9 Make node symbols templatable in the graphs.
Adds config options
* templates.log_graph_node
* templates.log_graph_node_elided
* templates.op_log_graph_node
2024-03-21 17:41:31 +01:00
Martin von Zweigbergk
e51878f4fd cli: show timestamp in local timezone and without millis and offset
As discussed in #2900, the milliseconds are rarely useful, and it can
be confusing with different timezones because it makes harder to
compare timestamps.

I added an environment variable to control the timestamp in a
cross-platform way. I didn't document because it exists only for tests
(like `JJ_RANDOMNESS_SEED`).

Closes #2900
2024-03-20 07:54:08 -07:00
Tom Ward
933150d819 cli: allow colors in form #rrggbb
Changes the formatter to accept not only existing color names (such as "red" or
"green") but also those in the form #rrggbb, where rr, gg, and bb are two-digit
hexadecimal numbers. This allows much finer control over colors used.
2024-03-18 08:03:31 +00:00
Alexis (Poliorcetics) Bourget
f9f740b263 docs: mention the signing key can be a file path too 2024-03-15 20:34:08 +01:00
Martin von Zweigbergk
6d78d92d91 cli: move jj amend/unamend aliases to config
The `amend/unamend` aliases exist for smoothen onboarding for
Git/Mercurial users; I don't think we should recommend that users use
them, so I think it's fine if users override them as they
like. Therefore, I think they belong in the config.
2024-03-09 22:43:50 -08:00
Austin Seipp
415ae5c0f9 docs: make it clear ui. refers to a toml section
There was a question on Discord about why using Difftastic wasn't working as the
diff tool. The root cause was putting `ui.diff.tool` in the wrong toml section,
when the `ui.` component actually refers to the `[ui]` section itself.

This reads kind of weirdly too because _immediately_ after this, the alternative
option of using the `merge-tools` section is suggested; except it uses `[merge-
tools.<name>]` which makes it immediately clear it's a section on its own.

This simply these two examples more consistent with each other, by using `[ui]`
instead of `ui.` to make it clear `ui.` is a top-level section.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2024-03-03 11:25:03 -06:00
Julien Vincent
84685a4d71 sign: Update documentation 2024-02-20 00:02:08 +00:00
Martin von Zweigbergk
6ad49d232e cli: drop support for legacy graph style
I don't think anyone uses the legacy graph style. It's very similar to
the "ascii" style from Sapling's `renderdag` crate.
2024-02-12 17:33:55 -08:00
Benjamin Brittain
d3699c2327 Use minus as a builtin pager 2024-02-12 18:55:15 -05:00
Austin Seipp
c8f703f14b docs: fix some automerge fallout
I enabled automerge for #2994, but forgot to actually *push* my changes
before resolving all the conversations, so GitHub insta-merged it.

This just addresses Ilya and Philip's final comments on #2994.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2024-02-09 12:36:28 -06:00
Austin Seipp
015c52bcdc docs: document git.fetch and git.push config options
Someone on Discord asked this exact question, but these options apparently
weren't documented when they were added in the `0.7.0` release.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2024-02-09 12:03:42 -06:00
Ilya Grigoriev
5dd938bc49 config.md: link to and mention the name of "scm-diff-editor" 2024-02-05 20:04:51 -08:00
Ilya Grigoriev
b3c47953e8 config.md docs: document jj config edit and jj config path
This changes the intro section to recommend using `jj config edit` to
edit the config instead of looking for the files manually.
2024-02-02 23:29:58 -08:00
Ilya Grigoriev
9a990ad92f docs config.md Vim instructions: link to the Wiki instead of a gist 2023-12-17 22:16:02 -08:00
Yuya Nishihara
87a8238bee git: turn git.auto-local-branch off by default
As far as I can see in the chat, there's no objection to changing the default,
and git.auto-local-branch = false is generally preferred.

docs/branches.md isn't updated as it would otherwise conflict with #2625. I
think the "Remotes" section will need a non-trivial rewrite.

#1136, #1862
2023-12-17 08:30:24 +09:00
Martin von Zweigbergk
7c923514ee git: add config to disable abandoning of unreachable commits
Some users prefer to have commits not get abandoned when importing
refs. This adds a config option for that.

Closes #2504.
2023-11-05 06:10:54 -08:00
Ilya Grigoriev
fcd02a6091 merge_tools.toml: add VS Code as a default merge tool.
Thanks to @glencbz for noticing that VS Code works fine now as a
merge tool, and thanks to @solson for suggesting
`merge-tool-edits-conflict-markers = true`.
2023-10-25 12:47:51 -07:00
Yuya Nishihara
089503abfb refs: classify push action based on tracking target
Although this is logically correct, the error message is a bit cryptic. It's
probably better to reject push if non-tracking remote branches exist.

#1136
2023-10-17 15:06:03 +09:00
Yuya Nishihara
9cafff87e1 cli: add API and branch subcommand to track/untrack remote branches
This patch adds MutableRepo::track_remote_branch() as we'll probably need to
track the default branch on "jj git clone". untrack_remote_branch() is also
added for consistency.
2023-10-16 23:21:05 +09:00
Yuya Nishihara
4cd2518be0 git: on import_refs(), respect tracking state of existing remote refs
In this commit, new behavior is tested by using in-memory view data. Data
persistence and track/untrack commands will be implemented soon.
2023-10-16 23:21:05 +09:00
Waleed Khan
d9597c55ec docs: use code block for ui.pager config example 2023-10-02 23:37:33 -05:00
Emily Fox
35f11e2cdc docs: add missing word to config.md 2023-09-27 12:26:08 -05:00
Martin von Zweigbergk
a6ef3f0b6c cli: make set of immutable commits configurable
This adds a new `revset-aliases.immutable_heads()s` config for
defining the set of immutable commits. The set is defined as the
configured revset, as well as its ancestors, and the root commit
commit (even if the configured set is empty).

This patch also adds enforcement of the config where we already had
checks preventing rewrite of the root commit. The working-copy commit
is implicitly assumed to be writable in most cases. Specifically, we
won't prevent amending the working copy even if the user includes it
in the config but we do prevent `jj edit @` in that case. That seems
good enough to me. Maybe we should emit a warning when the working
copy is in the set of immutable commits.

Maybe we should add support for something more like [Mercurial's
phases](https://wiki.mercurial-scm.org/Phases), which is propagated on
push and pull. There's already some affordance for that in the view
object's `public_heads` field. However, this is simpler, especially
since we can't propagate the phase to Git remotes, and seems like a
good start. Also, it lets you say that commits authored by other users
are immutable, for example.

For now, the functionality is in the CLI library. I'm not sure if we
want to move it into the library crate. I'm leaning towards letting
library users do whatever they want without being restricted by
immutable commits. I do think we should move the functionality into a
future `ui-lib` or `ui-util` crate. That crate would have most of the
functionality in the current `cli_util` module (but in a
non-CLI-specific form).
2023-09-25 15:41:45 -07:00
Waleed Khan
409356fa5b merge_tools: enable :builtin as default diff/merge editor 2023-09-21 03:29:27 +02:00
Martin von Zweigbergk
70f6e0a452 cargo: enable the watchman feature by default
I think the feature is requested by enough users that we should
include it by default, also for people who install from source (we
include it in the `packaging` feature already).

It increases the size of the binary from 16.5 MiB to 17.8 MiB. I
suspect we'd see some of that increase in size soon anyway, as I'm
probably going to use Tokio for making async backend requests.
2023-09-08 09:34:55 -07:00
Ilya Grigoriev
5fc71018d6 config docs: minor fixups
mkdocs can't seem to handle backticks in link anchors for out-of-text links.
2023-09-07 11:01:12 -07:00
Martin von Zweigbergk
d047512115 docs: prefer new revset operator :: over deprecated :
Now that we're very close to a release, it should be fine to use the
new syntax in our documentation. This effecttively backs out
37436f7344.
2023-09-06 13:09:14 -07:00
Ilya Grigoriev
d40bde53a3 config.md: update Vim instructions to mention vimtabdiff
`vimtabdiff` has a few potential advantages:

- It can be much more convenient for diffs with few files
- It can be easier to set up for some people (it is a Python script rather
than a Vim plugin).
- The author accepts patches, and I hope to make it support 3-pane diff.

The pros and cons are also described in the linked Gist.
2023-08-22 15:51:18 -07:00
Ilya Grigoriev
038867fd3f merge_tools: Allow 3-pane diff editing
As discussed in https://github.com/martinvonz/jj/discussions/1905#discussioncomment-6589673
2023-08-21 20:19:15 -07:00
Alexander Potashev
7837ec1f62 docs: Fix missed paths from src->cli/src move 2023-08-18 14:35:19 +02:00
Waleed Khan
2e44eaaad6 docs: ui.difftool -> ui.diff-editor 2023-08-13 21:12:50 -04:00
Vamsi Avula
bc57754c58 cli: add support for setting default description
That is, jj will use ui.default_description as a starting point when
user is about to describe an empty change.

I think it might be confusing to do this with -m / --stdin (violates
WYSIWYG), so I'm only doing this when jj invokes an editor.

Also, this could evolve into a proper template in the future instead of
just plain text, to allow inheriting from parent change(s), for example.

Partially addresses #1354.
2023-08-13 23:59:15 +05:30
Emily Fox
c2979e849f docs: disambiguate link to user config info 2023-08-13 05:08:45 +00:00
Martin von Zweigbergk
1d4b5d04fa windows: disable pagination by default (#2040)
Windows environments typically don't have a good pager, it seems, so
let's disable pagination for now.
2023-08-12 04:37:39 +00:00
Ben Saunders
e563d60e64 Update docs and errors to use XDG config path 2023-08-11 13:21:44 -07:00
Matt Stavola
4760b565c5 configs: add the ability to disable paging via ui.paginate 2023-08-11 12:45:53 -04:00
Martin von Zweigbergk
a367f13c72 configs: use Notepad as default editor on Windows 2023-08-10 17:09:07 +00:00
Ilya Grigoriev
74d9970908 config: Rename push.branch-prefix option to git.push-branch-prefix
This is for consistency with other `git.` options. See also
https://github.com/martinvonz/jj/pull/1962#discussion_r1282605185
2023-08-07 19:10:10 -07:00
Yuya Nishihara
b352061dd6 cli: load default diff command from "ui.diff.tool" config
This could be a "ui.diff.format" variant, but we would need to solve namespace
problem by prefixing "tool:<name>" for example. Then, inlining command arguments
would become uglier.

#1886
2023-08-04 18:48:31 +09:00
Martin von Zweigbergk
bf2af12b3b docs: describe push.branch-prefix 2023-08-03 05:12:13 +00:00