-
Notifications
You must be signed in to change notification settings - Fork 346
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
FR: jj git import
local detached git objects by exact name
#2722
Comments
It sounds like a low-level command (like Implementation-wise, maybe we can just |
This is getting pretty annoying for two of us at work suddenly, because we're demoing Gerrit, and to download patches it encourages you to do something like the following (in Gitspeak):
So, obviously having to do the whole branch-sync-delete dance is really tiring and explaining the workaround is annoying. I'll probably take a stab at fixing this shortly. What do we think about the name? Maybe I can come up with something, but I wonder if changing the name around to |
fwiw, these commands should work fine in colocated repo. I often do |
The
josh-filter
tool from the Josh project can rewrite the currentHEAD
of a Git repository into a newFILTERED_HEAD
reference i.e. the file.git/FILTERED_HEAD
is created and points to a new commit with its own history, which exists as its own tree independent of the existing history.I would like to import this
FILTERED_HEAD
reference to play with injj
, however, to do that right now, you have to create a temporary branch, jj git import, then delete the branch. So something like:Now I can:
And get a workspace created for that reference to examine/test it. I can then
jj abandon
the commits when I'm done or what have you.Proposed UX
I would like to avoid the fiddling with the underlying Git repository and branch structure. So I would like something like this:
Where the syntax
-r <GITREF>
looks up and imports a commit, and possibly its ancestry, intojj
's view.GITREF
should more or less be treated as Git would interpret it, IMO. So you can refer to any commit ID or pointer to an ID;FILTERED_HEAD
, a prefix, etc.It would also be reasonable to support multiple
-r
options at once, the semantics resulting in an aggregate "import all of this in bulk", of course.The text was updated successfully, but these errors were encountered: