Commit graph

50 commits

Author SHA1 Message Date
Ilya Grigoriev
623c5e28c2 docs: change "shell script" codeblock to "shell"
```shell script
    ```

breaks mkdocs rendering
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
64140c34b7 docs: Move installation instructions from README to docs/
This allows the tutorial to reference them and will make it
easier to have different instructions for different versions.

We can later restore some instructions to the README, but I
think this is important since the installation instructions
do change in important (even if slight) ways from time to
time.
2023-08-28 10:43:48 -07:00
Martin von Zweigbergk
a367f13c72 configs: use Notepad as default editor on Windows 2023-08-10 17:09:07 +00:00
Martin von Zweigbergk
a8de6f3695 docs: revert to using revset operator : instead of ::
Since our latest release doesn't support `::`, we shouldn't tell the
user to use it.

This commit should be backed out once we've released jj 0.9.0.
2023-08-01 21:58:43 +00:00
Martin von Zweigbergk
48580ed8b1 revsets: allow :: as synonym for :
The `--allow-large-revsets` flag we have on `jj rebase` and `jj new`
allows the user to do e.g. `jj rebase --allow-large-revsets -b
main.. -d main` to rebase all commits that are not in main onto
main. The reason we don't allow these revsets to resolve to multiple
commits by default is that we think users might specify multiple
commits by mistake. That's probably not much of a problem with `jj
rebase -b` (maybe we should always allow that to resolve to multiple
commits), but the user might want to know if `jj rebase -d @-`
resolves to multiple commits.

One problem with having a flag to allow multiple commits is that it
needs to be added to every command where we want to allow multiple
commits but default to one. Also, it should probably apply to each
revset argument those commands take. For example, even if the user
meant `-b main..` to resolve to multiple commits, they might not have
meant `-d main` to resolve to multiple commits (which it will in case
of a conflicted branch), so we might want separate
`--allow-large-revsets-in-destination` and
`--allow-large-revsets-in-source`, which gets quite cumbersome. It
seems better to have some syntax in the individual revsets for saying
that multiple commits are allowed.

One proposal I had was to use a `multiple()` revset function which
would have no effect in general but would be used as a marker if used
at the top level (e.g. `jj rebase -d 'multiple(@-)'`). After some
discussion on the PR adding that function (#1911), it seems that the
consensus is to instead use a prefix like `many:` or `all:`. That
avoids the problem with having a function that has no effect unless
it's used at the top level (`jj rebase -d 'multiple(x)|y'` would have
no effect).

Since we already have the `:` operator for DAG ranges, we need to
change it to make room for `many:`/`all:` syntax. This commit starts
that by allowing both `:` and `::`.

I have tried to update the documentation in this commit to either
mention both forms, or just the new and preferred `::` form. However,
it's useless to search for `:` in Rust code, so I'm sure I've missed
many instances. We'll have to address those as we notice them. I'll
let most tests use `:` until we deprecate it or delete it.
2023-07-28 22:30:40 -07:00
Martin von Zweigbergk
d858964067 docs: describe how to configure scm-diff-editor 2023-06-20 20:48:42 +02:00
Ilya Grigoriev
0e2579ee6a Switch graph node to use for commit instead of
This follows up on 5c703aeb03.

The only reason for this change is that, subjectively, the result looks better to me. I'm not sure why, but I couldn't get used to the old symbol in spite of its seeming reasonableness. It felt really bold and heavy.

If people agree, we can wait until we need to update the screenshots for some other reason before merging this. Sorry I didn't figure this out while the discussion about the referenced commit was going on.

I'm not 100% certain how many fonts support each symbol. Please try it out and let me know if it doesn't work for you.

Compare after:

![image](https://user-images.githubusercontent.com/4123047/229251383-563b889d-7233-42e2-a3c5-bf9368a4d1fd.png)

and before:

![image](https://user-images.githubusercontent.com/4123047/229251695-7fd0ff2c-2832-4262-ade5-5120288cccdf.png)
2023-04-02 23:15:37 -07:00
Christophe Poucet
c5503cee84 Seems like it's referring to the wrong commit? 2023-03-21 21:44:15 -07:00
Martin von Zweigbergk
be46efdd0f tutorial: clarify that files need to be saved before closing editors
As suggested in #1386.
2023-03-17 06:50:33 -07:00
Martin von Zweigbergk
5c703aeb03 cli: replace o as graph node by when using unicode graph
@joyously found `o` confusing because it's a valid change id prefix. I
don't have much preference, but `●` seems fine. The "ascii",
"ascii-large", and "legacy" graph styles still use "o".

I didn't change `@` since it seems useful to have that match the
symbol used on the CLI. I don't think we want to have users do
something like `jj co ◎-`.
2023-03-12 23:21:05 -07:00
Martin von Zweigbergk
78d77661bc tutorial: update with recent changes, plus some other editing
We have made some changes to CLI output that had not made it into the
tutorial. It's time to update it, especially with the new change id
rendering. Since I'm updating it now, and since it's a bit of work to
do so, I decided to use GitHub's Hello-World repo instead of jj's own
repo as our example.
2023-02-14 06:06:58 -08:00
Samuel Tardieu
a7aed0171d style: fix typos found by codespell 2023-01-28 07:23:45 -08:00
Martin von Zweigbergk
c5cc2e6d46 tutorial: delete obsolete mention of aliases
The heading says it's going to explain aliases, but it doesn't, and
now that we've documented aliases in config.md, we probably don't need
to mention it in the tutorial.
2023-01-26 18:15:23 -08:00
Samuel Tardieu
3d870068c2 log: add (empty) in front of an empty commit description 2023-01-14 16:00:42 +01:00
Ilya Grigoriev
18722bbf36 cmd: Remove the -i option to jj restore.
It is superceded by the new options to the `jj diffedit` command.
2022-12-21 08:15:06 -08:00
Ilya Grigoriev
c9706fc0d4 Rename jj touchup to jj diffedit 2022-12-21 08:15:06 -08:00
Martin von Zweigbergk
29db672a5c tutorial: mention jj edit and when it's useful
I made some other little touchups while at it.

Closes #840
2022-12-09 22:28:33 -08:00
Martin von Zweigbergk
50ba571527 log: move commit ID off to the right
We have talked about showing the commit ID only for divergent changes
because it's generally easier to work with the change ID, and it's
less likely to result in a divergent change. However, it's useful to
have the commit ID available for pasting into e.g. a commit message or
the GitHub UI. To try to steer users towards using the change ID, this
commit moves the commit ID off to the right in the log output.

I put it just after the "divergent" field, because that makes it close
to how I imagine it would look if we decided to hide the commit ID
except for divergent changes. I was thinking that could be rendered as
"divergent (abc123)". So if we add config to hide the commit ID, then
it would be rendered almost the same for divergent commits (just with
the added parentheses). It would also make sense to replace the
"divergent" field by a question mark on the change ID, since change
IDs basically behave like branches. If we do that, then the placement
of the commit ID I picked in this commit does not make sense.
2022-11-14 07:49:52 -08:00
Martin von Zweigbergk
31368551b7 tutorial: add a few missing "(no description set)" 2022-11-14 00:24:10 -08:00
Martin von Zweigbergk
4ec2092e57 templates: allow using string in if-condition; use in default template
Given how easy this was, I can't believe I didn't make the change
sooner.

I haven't updated the screenshots in the readme because I plan to make
some further changes to the default template. I'll update them after
those changes.
2022-11-13 20:24:24 -08:00
Yuya Nishihara
16f2b82feb conflicts: change diff line marker to %%%%%%%
I feel the original -------/+++++++ pair is slightly confusing because
each half can be a separator by itself. I don't know what character other
than '-'/'+' is preferred, but let's pick '%' (for "mod") per @martinvonz
suggestion.
2022-09-20 15:26:29 +09:00
Martin von Zweigbergk
0d1bf7cb3b cli: disable open commits by default 2022-08-26 23:34:52 -07:00
Martin von Zweigbergk
b8f59f419c docs: hyphenate "working-copy" when used as a compound modifier 2022-08-25 18:08:36 -07:00
Martin von Zweigbergk
9c55d98842 cli: rename jj edit to jj touchup 2022-07-01 08:58:08 +08:00
Tal Pressman
9613e294f4 replace references to jj l with jj log 2022-06-01 00:00:43 +09:00
Martin von Zweigbergk
0865b1ccff cli: show placeholder text for empty commit message
It can be confusing that some commits (typically the working copy)
don't have a description. Let's show a placeholder text in such cases.

I chose the format to match the "(no email configured)" message we
already have.
2022-05-18 09:16:04 -07:00
Martin von Zweigbergk
71c789f50b cli: make log show only local commits by default
The default log output of showing all commits is not very useful when
contributing to an existing repo. Let's have it default to showing
commits not on any remote branch instead. I think that's the best we
can do since we don't have a configurable main branch yet, and we
don't even have per-repo configuration..

Closes #250.
2022-05-14 11:50:05 -07:00
Martin von Zweigbergk
96849da332 docs: prefer ~/.jjconfig.toml on all platforms
It's much easier to tell users on all platforms to put their config in
`~/.jjconfig.toml` than in a path that varies across the platforms, so
let's do that. It also seems like a less controversial location for
the file.

Closes ##233.
2022-05-10 10:21:22 -07:00
Tal Pressman
c2ba83af71 Remove out-of-date parenthetical in tutorial.md 2022-04-22 21:49:42 -07:00
Martin von Zweigbergk
095fb9fef4 config: drop support for ~/.jjconfig
I'm a little hesitant to do this because most tools I'm familiar with
have the config file directly in `~/`. It's also easier to describe
where to put the file if it doesn't vary across platforms. But we're
still early in the project, so let's try it and see if we get any
complaints.
2022-03-23 09:57:42 -07:00
Martin von Zweigbergk
9ec0e4c1bb docs: use Git-style unified diff in the tutorial
The default (color-based) diffs are not readable in Markdown. Also,
it's useful for the user to learn about the `--git` flag.
2022-01-05 12:38:52 -08:00
Martin von Zweigbergk
588389e89f docs: add pointer to new revset doc in tutorial (#46) 2021-12-15 21:41:11 -08:00
Martin von Zweigbergk
c185b395f6 revsets: swap meaning of operators ~ and - (#46)
As suggested by @arxanas, this makes `-` symmetric with `+` and `-` is
easier to type than `~`.
2021-12-12 23:02:29 -08:00
Martin von Zweigbergk
35a712cc48 revsets: change Git-like range operator ,,, operator to .. (#46) 2021-12-12 00:20:00 -08:00
Martin von Zweigbergk
98659a16e1 revsets: change DAG range operator ,, operator to : (#46) 2021-12-12 00:20:00 -08:00
Martin von Zweigbergk
63c90c04c8 revsets: change parent/children operators to foo~/foo+ (#46) 2021-12-11 23:47:34 -08:00
Martin von Zweigbergk
698b92adc4 docs: update tutorial to mention jj untrack
I forgot to update the tutorial when I closed #14.
2021-12-01 09:56:58 -08:00
Martin von Zweigbergk
813ae0276d docs: use simpler jj undo alias instead of jj op undo 2021-11-20 10:33:55 -08:00
Martin von Zweigbergk
d34060f013 cli: print "Added X files, ..." message only if any files changed
Looking at the impact on the smoke test and the tutorial, I think I
went overboard in 83c0519. Let's only print the message if any files
changed.
2021-11-19 23:14:19 -08:00
Martin von Zweigbergk
2796b5a8e1 docs: update tutorial with new conflict handling in the working copy 2021-11-07 15:17:51 -08:00
Martin von Zweigbergk
6687f98d8a cli and docs: replace "id" by more correct "ID" 2021-10-27 15:06:10 -07:00
Martin von Zweigbergk
191c1ee166 cli: make "added {} files, modified {} files, ..." message start with uppercase
We pretty consistently start with uppercase so this message stood out
and bothered me.
2021-10-24 12:46:01 -07:00
Martin von Zweigbergk
f35f2f0c97 docs: update tutorial with removed "at" from diff headers
I forgot to include this in the previous commit.
2021-10-22 13:05:04 -07:00
Martin von Zweigbergk
579bd4b3bf docs: update alias in tutorial to not use public_heads() revset
We don't update public heads very well yet and I'd like to take a
shortcut and simply not have care about public heads for now.
2021-10-20 14:19:04 -07:00
Martin von Zweigbergk
c3ac110f3b tutorial: avoid a "the same repo" referring back to installation instructions 2021-10-18 08:49:00 -07:00
Martin von Zweigbergk
56e0f1254b docs: move initial configuration from tutorial to README
It seems better to have all the one-time setup in the README.
2021-10-13 20:37:48 -07:00
Martin von Zweigbergk
08b5193942 docs: update tutorial with new diff headers
I forgot to update the tutorial in the previous commit.
2021-10-13 16:13:25 -07:00
Martin von Zweigbergk
8fef1c2068 docs: move installation instructions from tutorial to README
I also changed the instructions to use `cargo install --git` pointing
straight to GitHub, so we don't have the naming conflict with the jj
repo created in the tutorial.
2021-10-13 08:52:40 -07:00
Martin von Zweigbergk
ae7f00e7b1 cli: rename jj prune to jj abandon
The command's help text says "Abandon a revision", which I think is a
good indication that the command's name should be `abandon`. This
patch renames the command and other user-facing occurrences of the
word. The remaining occurrences should be removed when I remove
support for evolution.
2021-09-19 22:51:12 -07:00
Martin von Zweigbergk
4aa1fd7cbb docs: move tutorial from README.md to docs/tutorial.md 2021-09-09 11:10:40 -07:00