8000 Pass --noreport to tree by steveklabnik · Pull Request #3 · jj-tutorial/tutorial · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pass --noreport to tree #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/src/getting-started/cloning-a-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ command, `--colocate`. `jj` supports two different kinds of repositories:
colocated, and non-colocated. What's the difference? Well, let's take a look
at our repository:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:10:19}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:10:17}}

We have both a `.jj` and a `.git` directory at the top level. This means both
jj's information as git's information are co-located: they're next to each
Expand All @@ -44,7 +44,7 @@ at the root of the repository will still work.

Let's see what our repository's history looks like:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:22:27}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:20:25}}

This looks a bit different than `git log`, but it's the same general idea: we
can see where we our in our history.
Expand Down
6 changes: 3 additions & 3 deletions book/src/getting-started/interacting-with-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Let's take one last look at that `jj log` output:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:45:52}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:43:50}}

Do you see that little `trunk` over on the right there? That is a *bookmark*
in `jj`, and it's how `jj` understands git branches. `trunk` is the name of
Expand All @@ -16,7 +16,7 @@ locally, but when we interact with GitHub, it needs a branch name.

To create a bookmark, we can use `jj bookmark`:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:54:55}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:52:53}}

`jj bookmark create` takes a name for the bookmark, and then we also pass a `-r` flag.
This is short for "revision," which is a sort of catch-all name for the various kinds
Expand All @@ -25,7 +25,7 @@ the change ID. In this case, we pass `@-`, which means "the parent of `@`."

Let's look at our log:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:57:64}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:55:62}}

We can now see `goodbye-world` listed on the right. Great! Let's push that up
to GitHub:
Expand Down
8 changes: 4 additions & 4 deletions book/src/getting-started/making-a-new-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ simplest possible workflow. If you're a fan of building up small commits via the
If you remember from the end of the last section, we're on an empty change.
You can double check with `jj status` (or `jj st`):

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:29:32}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:27:30}}

So what is a change, anyway? It is the core primitive you'll be working with in
`jj`. We'll talk about that actually means in Part 2. For now, you can think of
Expand Down Expand Up @@ -35,7 +35,7 @@ fn main() {

A bit fatalistic, but it works. Let's run `jj st` again:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:35:40}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:33:38}}

We can see we've modified `src/main.rs`. Whenever we run a `jj` command, `jj`
will snapshot all of the changes that we've made to any files in our repository
Expand All @@ -51,14 +51,14 @@ but now I love it.
Let's say we're happy with the contents of this change. We're done, and we want
to start working on something else. To do that, we can use `jj commit`:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:41:43}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:39:41}}

Easy enough! Our working copy is now on a fresh new change, and its parent
is our "Goodbye, world!" change that we just committed.

To see our changes in context, let's look at `jj log` again:

{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:45:52}}
{{#trycmdinclude tests/tests/cmd/getting-started.trycmd:43:50}}

You can see that we're currently working on an empty change. It has `x` as a
change ID, but there's also a little `@` there: `@` is an alias for the working
Expand Down
11 changes: 10 additions & 1 deletion tests/tests/cmd/getting-started.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ Added 4 files, modified 0 files, removed 0 files

$ jj config set --repo ui.color never

$ tree . -a -L 1 -C
$ tree . -a -L 1 -C --noreport
.
├── .git
├── .gitignore
├── .jj
├── Cargo.lock
├── Cargo.toml
└── src

3 directories, 3 files

$ jj config set --repo debug.randomness-seed 12347

Expand Down
0