Commit graph

57 commits

Author SHA1 Message Date
726c7cf9c0
nu: Add jj aliases 2025-11-30 23:05:16 +01:00
0ce2c1b7da
jj: Add raw log command alias
Added `jlr` which, contrary to all the other jj log commands simply
gives quicker access to the actual raw `log` command for custom
operations.
2025-11-14 10:26:57 +01:00
bd90df30e4
nvim: Turn off usage message for jj-diffconflicts 2025-09-05 09:11:08 +02:00
9afb34fd26
nvim: Improve jj diff conflict resolution
Currently invoked via `jj resolve --tool diffconflicts`
2025-09-03 12:59:09 +02:00
ededd904b4
jj: Switch to email for signing key identification 2025-06-22 22:21:48 +02:00
2c1ca97ab3
jj: Adopt new default revset aliases
This commit changes the way I display my jj logs a little. We
distinguish between 3 styles now

- the 'stack()': short and to the point, only ancestor commits from the
  last non-mutable one onwards
- the 'recent()': the previously default view over ancestor commits or
  any other head nodes (i.e. any branches) that are from me,
  with a few commits leading up to them visible.
- the 'all()': the traditional 'show everything' summation for finding
  very specific commits or getting a macro-scale overview of the history

Basically, only the 'stack()' view was added - but it is now the new
default for the default command and the previous 'default' has been
renamed to 'recent()'.

This is mirrored in the shell aliases: all the `jl`, `jlo`, `jloo`
aliases use the 'recents()' view. The capital versions (`JL` and the
like) are not affected as as they keep showing the 'all()' view.
Importantly, the `j` base command uses the 'stack()' view, however.

Lastly, we extract the aliases to find `WIP:` commits and `PRIVATE:`
commits into actual jj revset aliases and call them from our shell
aliases. The functionality does not change, though we now have an
additional alias for finding specifically the latter commits with `jlfp`
('jj log find private').
2025-06-22 00:03:56 +02:00
53b8bd0175
jj: Update delta diff settings
Remove deprecated 'ui.diff.format' setting and replace with
'ui.diff-formatter'.

Use the time to also ONLY set up delta as the diff and show command
pager using scopes (since I was perusing the jj discussions anyway).

This has the advantage that normal jj paging is done with `-FRX` as far
as I understand -- which means after we close out of the pager the
content remains on screen (-X). This is not the case with delta. So now,
the contents of e.g. the last log command should always stay on screen.
2025-06-12 22:01:19 +02:00
b22334c442
jj: Add tug alias to move forward most recent bookmark 2025-06-06 15:58:42 +02:00
4d8f554197
jj: Move git_head display to end of single-log line
It was moving about the change dates too much and not super necessary
for information, so moved it further down the line.
2025-06-06 15:58:39 +02:00
b1f751a82d
jj: Improve jj WIP commit search
Restrict the default search to commits _starting_ with 'WIP:',
to avoid accidentally selecting commits which just contain the word
'WIP:' somewhere in the description.
2025-05-23 10:44:21 +02:00
83e2b9f31b
jj: Add alias to list all bookmarks 2025-05-22 14:00:10 +02:00
4dc4ab39a6
jj: Add alias to show WIP commits.
`jlfw` will quickly list every commit that contains 'WIP:'. Quicker
version of `jlf 'WIP:'`.
2025-05-22 14:00:10 +02:00
7d9a85ec48
jj: Remove deprecated git subprocess configuration
Since jj moved to use git as a subprocess by default a couple versions
ago, they now deprecated the git.subprocess configuration option (jj
version 0.29). This commit removes it.
2025-05-22 14:00:09 +02:00
55c4a600c1
jj: Fix jlof and jloof to be case insensitive
Aligns them with the shorter-form `jlf` alias which has been case
insensitive for a while.
2025-03-15 20:08:51 +01:00
4082d92ed9
jj: Change log finding alias to case insensitive
Since 612b92d1 we are matching private commits case insensitively, we
should also match default commit search insensitively by default.

This changes the alias to search without caring for the case. We do not
have an equivalent alias for case sensitive search, and I will only add
one if I need the specificity often enough to warrant an extra alias.
2025-03-06 21:21:59 +01:00
749cedb162
jj: Change oneline and summary log template
Summary logs are changed to a little nicer presentation (from --summary
to 'builtin_log_compact_full_description' template).

Oneline logs have a changed order. Keep the revID as first thing, but
then show bookmarks/tags/head and descriptions. Only afterwards
show email, timesatmp, commitID since I am less interested in them
generally when viewing oneline commits (to get an overview of the last
changes and my current position).
2025-03-06 21:21:59 +01:00
0cbd8d548f
jj: Add alias to insert change before or after current
Internally `jnb` runs `jj new -B@` so that it simply always insert a change
directly before the current working copy.

Likewise with `jna` for inserting after current. (Which is still
somewhat helpful since by default `jj new` will create a branch in the
tree if the new change is not the leaf node)
2025-02-25 23:25:29 +01:00
8c28d8f7d5
jj: Fix jlf alias function quoting
Fixed quoting so that we can now also search for things which would have
a meaning in jj, e.g. `jlf 'WIP:'` (jj would pick up the ':' and
complain before).
2025-02-25 23:25:28 +01:00
295a598f50
git: Move git-bug completion sourcing to correct shell 2025-02-25 23:25:22 +01:00
e523aa74b2
git: Add git-bug status toggle alias gbo
Requires bug-id to be passed and toggles the corresponding bug open or
closed (`gbo <bug-id>`). Otherwise just passes through any arguments to
the `git-bug bug status` command.
2025-02-25 23:25:21 +01:00
133910be08
git: Show bug description if bug id passed to gb
The alias `gb` will list all bugs (or allows to query for them) by
default. But if only a single argument is provided, and that argument is
a bug id then it shows the bug.

This allows a nice workflow like:

```sh
$ gb
# -> returns list of bugs, pick one from it
$ gb <bug-id>
# -> returns detailed description of bug
```
2025-02-25 23:25:21 +01:00
5986206e51
git: Add git-bug select alias gbs 2025-02-25 23:25:20 +01:00
53a1c049e0
git: Add git-bug edit function gbe
Can edit either the description of a bug (`gbe <bug-id>`) or a specific
comment (`gbe <comment-id>`).
2025-02-25 23:25:08 +01:00
1d2dbc0df2 git: Update basic git-bug aliases
Update for newer git-bug versions (compiled from main trunk not tags).
2025-02-24 14:22:36 +01:00
cbea1efbc0 vcs: Update user commit signing email
Changed to my more up-to-date main method of contact.
2025-02-24 14:22:36 +01:00
b7b643ddf9 jj: Add aliases to jump to most recent changes
`jed` allows editing the 'latest' (i.e. most recent, timewise) change we
can reach following the descendants of the current working copy.

In essence, this allows us to quickly jump to the head of whatever
branch we are on.

Similarly, `jet` goes to the newest descendant of the 'trunk' branch
(i.e. generally 'master' or 'main').
And `jel` just goes to the newest commit in general out of all commits
in the repo.

These have a lot of overlap and I might end up removing the latter two
if I am not using them much, which may be the case.
2025-02-22 21:11:37 +01:00
5ab95c724f
jj: Rework jj bookmark main alias
Changed into a function which takes the revision to set the bookmark to
as an argument. This should work without interfering much since the
bookmark name that the `bookmark set` function _usually_ takes as
argument is already given by the alias (always 'main') and thus we do
not have to manually provide other arguments.

It default to the current working copy just like the command and
otherwise can point to any change.
2025-02-22 19:35:37 +01:00
89737536ea
jj: Revert js to simple jj status alias
I have gotten more used to using `jw` to 'show' the current changes in
the working copy, and having `js` be _both_ status and show has become
more confusing than helpful. For now, we just revert it to be a simple
alias for the status command.
2025-02-22 19:35:37 +01:00
5a9be5479d
jj: Add an alias to abandon a commit
I have begun abandoning more commits recently, so this seems a good time
to introduce an alias for it. It is not _so_ common as to require a 1 or
2-letter alias so we can go with the mnemonic `jab` for jj abandon.
2025-02-22 19:35:36 +01:00
dc7bf66052
jj: Add revset alias for current git head
Adds a very simple 'githead' revset alias. This is not much simpler than
directly invoking `git_head()` but it will remind me in the future of
its existence.
2025-02-22 19:35:36 +01:00
98dca7ec04
jj: Extend log aliases
The new log aliases follow one logic: small letters are default and
capital letters show 'all' changes. Thus, `j` defaults to showing the
simple log and `J` the same log but for all changes.
`jl` shows oneline logs, `JL` oneline logs for all changes.
`jlo` shows log summaries, `JLO` for all changes.
And finally `jloo` and `JLOO` show the details patches for each change.
2025-02-22 19:35:35 +01:00
f9d0401132
jj: Mirror edit next with edit previous alias
This new alias setup provides four quick traversal options:
Moving ahead one commit (`jen` for edit next), backwards (`jep` for edit
previous), as well as doing the same but creating new 'working copies'
instead of going directly to a commit (`jenn` and `jepp`).
2025-02-22 19:35:35 +01:00
66005a9948
jj: Switch manual commit splitting alias to use split
Currently `ji` (for jj insert) does a 'manual' `jj split` by creating an
empty commit underneath, squasing interactively and then moving back to
the original. All of that is done by the existing `jj split` command.

So we simply use it. I am keeping the `ji` alias for now, could still be
'jj insert' or 'jj spl(I)t' I suppose.
2025-02-22 19:35:34 +01:00
612b92d148
jj: Make private commit matching case insensitive
Whether you prefix your commit with 'WIP:' or 'wip:',
'private:' or 'PRIVATE:' it will be caught.
2025-02-22 19:35:34 +01:00
23086828d3
jj: Add bookmark aliases 2025-02-18 17:58:37 +01:00
5dfba029d8
jj: Add private commit uploading safety
Do not push commits prefixed with `private: ` to any git remote.
2025-02-18 17:07:20 +01:00
6a6dfe3a6e
jj: Add showing working copy log by default
By default, the log invocation now shows at least 5 ancestors of the
current working copy branch. This makes it much easier to get situated
to the current location for me - otherwise, if I just pushed my main
branch and thus there is the main bookmark just below my commit none of
the last couple changes are shown in the log. If there are fewer than 5
ancestors it will just show however many there were.
2025-02-18 17:07:16 +01:00
98dad64976
jj: Add jj insert alias for forgotten commits
Allows the user to just use the `ji` alias to quickly create a (previous) change,
commit whatever they forgot and move back to the current commit.
2025-02-14 10:48:00 +01:00
cfa59ae9df
jj: Add revset aliases 2025-02-14 10:47:54 +01:00
25c6788247
jj: Make aliased log revset default in config
Instead of aliasing the revset I am always using currently, we simply
set it to be the default for any log command. If we want a different
revset we can still supply it. Other aliases keep different revsets
(e.g. `jL` variants for `all()` revsets).
2025-02-14 10:47:54 +01:00
98c54443e9
git: Add pr alias which fetches a specific github pull request
Used like `g pr 1234` to create local pr/1234 branch.
2025-02-14 10:47:53 +01:00
43aefd2369
jj: Automatically show git diff for commit descriptions 2025-02-14 10:47:52 +01:00
0bd604298f
jj: Add git commit signing and private commits
Git commits, on push, will be signed by default (just like my git
configuration itself) but *not* every change is signed since that is a
hassle with the working copy technically also being an ever changing
git commit.

Additionally, added a private-commit option which will refuse to push
commits beginning with 'wip: ' to any remote, which is not super useful
for my current use cases but also a nice feature and fun to experiment
with for the future.
2025-02-14 10:47:51 +01:00
7922e5285f
jj: Add alias for showing a commit with description 2025-02-14 10:47:50 +01:00
2eccfe88ec
jj: Improve default log invocation
The default log invoked when hitting `j` is now composed of the working copy history as well as all
ancestors, recent commits to visible heads and the trunk.

`jl` shows the same view, only as oneline commits.
2025-02-14 10:47:50 +01:00
9f4b3b14e7 jj: Improve aliases 2025-02-07 23:10:38 +01:00
5952e32bce
git: Add pull request fetching alias
Gets a pull request for the repo by directly fetching from the pull
folder of the repository. Works perfectly with github (should also work
with gitlab, and gitea/forgejo).

Searches for a remote called github or uses the default origin one.
2025-02-07 16:45:00 +01:00
8b6e338fc2
git: Reformat config 2025-02-07 16:41:59 +01:00
9b7290c93c
jj: Use delta as diff pager 2025-02-07 15:05:24 +01:00
31dc3fa9b7
git: Change merge conflict to zdiff3 style 2025-02-07 13:12:47 +01:00