Commit graph

28 commits

Author SHA1 Message Date
Yuya Nishihara
7e127f500a docs: update remaining references on "jj init --git-repo" 2024-02-28 09:03:16 +09:00
Yuya Nishihara
8d0414549b cli: unblock "jj git init --colocate" in existing Git repo directory
I'm not sure what's the conclusion in #2747, but I don't think there is a
disagreement on allowing --colocate to import existing Git repo.
2024-02-28 09:03:16 +09:00
Martin von Zweigbergk
1cc271441f gc: implement basic GC for Git backend
This adds an initial `jj util gc` command, which simply calls `git gc`
when using the Git backend. That should already be useful in
non-colocated repos because it's not obvious how to GC (repack) such
repos. In my own jj repo, it shrunk `.jj/repo/store/` from 2.4 GiB to
780 MiB, and `jj log --ignore-working-copy` was sped up from 157 ms to
86 ms.

I haven't added any tests because the functionality depends on having
`git` binary on the PATH, which we don't yet depend on anywhere
else. I think we'll still be able to test much of the future parts of
garbage collection without a `git` binary because the interesting
parts are about manipulating the Git repo before calling `git gc` on
it.
2023-12-03 07:40:12 -08:00
Martin von Zweigbergk
ec7f9e79f6 docs: update description of conflicts to be about tree-level conflicts
Fixes #2373
2023-11-30 14:24:48 -08:00
Ilya Grigoriev
8762a2274f git-compatibility.md: adjust instructions to convert to colocated repo to match 872265a22 2023-10-18 19:45:47 -07:00
Ilya Grigoriev
c5f74bc466 docs: mention git pack-refs for co-located repos
As suggested by @yuja in
https://github.com/martinvonz/jj/issues/1841#issuecomment-1720451152

Thanks to @lazywei for pointing out that `git pack-refs --all` is better, at
least on the first run. I haven't checked, but suspect, that because of the
number of `refs/jj` refs jj creates, it might always be better.
2023-09-15 19:49:11 -07:00
Glen
2c74fa8c7c docs: document script to colocate a jj-only repo
https://github.com/martinvonz/jj/discussions/2230 indicates a lot of
interest in this, so we'd probably want to support this officially at
some point. Until then, document a script that has worked well-enough
for some of us.
2023-09-14 10:00:39 +08:00
Ilya Grigoriev
18bcc87794 docs: make co-located repos more prominent, more details
At this point, they are stable enough that I think we should
advertise them and encourage their use. This also explains
some caveats.
2023-09-06 09:15:27 -07:00
Martin von Zweigbergk
56472297f0 git: add support for SSH authentication with ed25519 or ed25519-sk
This makes it possible to use ed25519 and ed25519-sk keys by trying
them one at a time. However, it still fails if one of them is
password-protected; we don't try the next key in that case.
2023-08-09 03:44:03 +00:00
Ilya Grigoriev
714aff63e6 git.rs: properly abandon commits from moved/deleted branches on remote (#864)
This bug concerns the way `import_refs` that gets called by `fetch` computes
the heads that should be visible after the import.

Previously, the list of such heads was computed *before* local branches were
updated based on changes to the remote branches. So, commits that should have
been abandoned based on this update of the local branches weren't properly
abandoned.

Now, `import_refs` tracks the heads that need to be visible because of some ref
in a mapping keyed by the ref. If the ref moves or is deleted, the
corresponding heads are updated.

Fixes #864
2023-05-17 17:57:58 -07:00
Martin von Zweigbergk
6a1bb1c0a9 docs: co-located mode is not new anymore, but it does have surprises 2023-05-07 16:13:33 -07:00
Martin von Zweigbergk
0f23ad46f3 docs: add note that co-located mode helps when tools expect a Git repo 2023-03-29 11:25:47 -07:00
Martin von Zweigbergk
6ff7686b69 docs: finally describe what we mean by "co-located repos" 2023-03-29 11:25:47 -07:00
Martin von Zweigbergk
e3a96177f7 docs: Update section about support for .gitignores
Issues #65 and #87 were both fixed almost a year ago.
2023-03-01 18:03:31 -08:00
Ruben Slabbert
68b77d123d feature: support git credential helpers 2022-11-19 22:06:27 -08:00
Martin von Zweigbergk
3cdcf6cf3d docs: explain that we don't support shallow clones (#675) 2022-10-27 06:56:34 -07:00
Martin von Zweigbergk
756c4fedb6 docs: fix typo in Git config core.excludesFile 2022-10-21 19:04:30 -07:00
Jason R. Coombs
c4b44500e4 Add hyperlink target for 405 2022-09-26 09:39:03 -07:00
Martin von Zweigbergk
6e23b5b052 docs: change "current checkout" to "working-copy commit"
I think "the working-copy commit" is clearer.
2022-09-18 16:19:58 -07:00
Josh Soref
49215323b2 spelling: use cases
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-09-09 11:58:37 -07:00
Martin von Zweigbergk
c2a7152423 docs: explain that we don't support Git hooks 2022-07-01 00:38:56 +08:00
Martin von Zweigbergk
885c780642 cli: add commands for working with sparse patterns (#52)
This adds a `jj sparse` command with options to list and manage the
set of paths to include in the working copy. It only supports includes
(postive matches) for now.

I'm not sure "sparse" is the best name for the feature. Perhaps it
would make sense as a subcommand under `jj workspace` - maybe `jj
workspace track`? However, there's also `jj untrack` for removing a
file from the working copy and leaving it in the working copy. I'm
happy to hear suggestions, or we can get back to the naming later.
2022-04-26 14:52:17 -07:00
Martin von Zweigbergk
326654952e cli: respect Git's core.excludesFile config (#87)
It probably doesn't make sense to respect Git's `core.excludesFile`
config when not running in a Git-backed repo, but we also already
respect `.gitignore` files in the working copy regardless of backend,
so at least it's consistent with that. We can revisit it when the
native backend becomes a reasonable choice.

Closes #87.
2022-03-12 10:48:06 -08:00
Martin von Zweigbergk
9a189fea91 docs: list supported and unsupported Git features 2022-03-11 22:47:36 -08:00
Martin von Zweigbergk
382be623b8 docs: correct a mention about getting long vs. short help
I haven't checked, but I think `jj help git push` used to give the
short form with `clap` 2. With `clap` 3, it's definitely the long form
anyway.
2022-03-09 07:48:31 -08:00
Martin von Zweigbergk
d9b364442e cleanup: update references to .jj/store/git to .jj/repo/store/git
The `store/` directory (and many others) recently moved into
`.jj/repo/`, but I forgot to update a few places.
2022-02-17 22:44:14 -08:00
Martin von Zweigbergk
51c351f272 cli: rename --git-store to --git-repo
"store" is just used internally, it's not something we should expose
to users.
2022-02-02 08:13:10 -08:00
Martin von Zweigbergk
037d66965d docs: start documenting Git compatibility 2022-01-03 22:40:58 -08:00