google / google/quahog

Creating a #QUAHOG commit in jj behaves awkwardly

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
12
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Quahog uses `jj new --insert-after` to create a base commit, but this isn't what you want to do afaict.

I have a repo that looks sort of like this (retyping it because it's in a $job internal repository):

```
@ pkrruwou
│ (empty) (no description set)
│ ○ zwptwuxl
│ │ (no description set)
│ ○ owusprrz
├─╯ Limit the size of stuff
◆ pwpysozn

~
```

And running `jj qu-pop --root <...>` produces:

```
@ lrkwutls
│ (empty) (no description set)
│ ○ lwzmyusv
│ │ [PATCH] foo.patch
│ │ ○ zwptwuxl
│ │ │ (no description set)
│ │ ○ owusprrz
│ ├─╯ Limit the size of stuff
│ ○ pklozvxy
├─╯ #QUAHOG
◆ pwpysozn

~
```

This is because `--insert-after ` means "insert as a child of and as a parent of `children()`". I think Quahog just wants to use `jj new `, not `--insert-after`. I think the usage of `--insert-before` in the file if it detects patches that already exist is probably correct.

My expected graph would have been:

```
@ lrkwutls
│ (empty) (no description set)
○ lwzmyusv
│ [PATCH] foo.patch
○ pklozvxy
│ #QUAHOG
│ ○ zwptwuxl
│ │ (no description set)
│ ○ owusprrz
├─╯ Limit the size of stuff
◆ pwpysozn

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.