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

8 commits

Author SHA1 Message Date
Ilya Grigoriev
a483252cf2 revset: allow checking out git-tracking (@git) branches 2023-06-12 14:31:44 -07:00
Ilya Grigoriev
8df945b71d cmd: have jj branch list report git-tracking (@git) branches
This doesn't change the way @git branches are stored in `git_refs` as opposed
to inside `BranchTarget` like normal remote-tracking branches. There are
subtle differences in behavior with e.g. `jj branch forget` and I'm not sure
how easy it is to rewrite `jj git import/export` to support a different
way of storage.

I've decided to call these "local-git tracking branches" since they track
branches in the local git repository. "local git-tracking" branches sounds a
bit more natural, but these could be confused with there are no remote
git-tracking branches. If one had the idea these might exist, they would be
confused with remote-tracking branches in the local git repo.

This addresses a portion of #1666
2023-06-12 14:31:44 -07:00
Ilya Grigoriev
337544cf96 No-op clarification of import_export tests 2023-06-07 13:42:48 -07:00
Yuya Nishihara
f8d56e816d cli: print parent commit summary on checkout
On "jj checkout", description of the working-copy commit is empty, and the
working-copy parent provides more information. It might be a bit verbose to
print parent summary on every history rewriting, but I think that's okay.
2023-05-02 15:04:13 +09:00
Yuya Nishihara
67d07751a5 tests: add basic test for undoing git import/export in non-colocated repo
If "jj op undo" doesn't roll back git refs (#1541), test_git_import_undo()
would get weird state. I think these tests are easier to follow than
test_git_fetch_undo() since no remote refs are involved.
2023-04-25 14:01:24 +09:00
Glen Choo
3418c8ff73 git: add git.auto-local-branch
Add a new git.auto-local-branch config option. When set to false, a
remote-tracking branch imported from Git will not automatically create a
local branch target. This is implemented by a new GitSettings struct
that passes Git-related settings from UserSettings.

This behavior is particularly useful in a co-located jj and Git repo,
because a Git remote might have branches that are not of everyday
interest to the user, so it does not make sense to export them as local
branches in Git. E.g. https://github.com/gitster/git, the maintainer's
fork of Git, has 379 branches, most of which are topic branches kept
around for historical reasons, and Git developers wouldn't be expected
to have local branches for each remote-tracking branch.
2023-01-29 20:17:49 -08:00
Glen Choo
4716c1e9e2 git: test import of remote-only branch
This test coverage will become more important when we make changes to
remote branch importing.
2023-01-29 20:17:49 -08:00
Glen Choo
469d315003 git: rename test to cover import/export
We'll add an import test in the next commit.
2023-01-29 20:17:49 -08:00
Renamed from tests/test_git_export.rs (Browse further)