Commit graph

27 commits

Author SHA1 Message Date
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
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
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
9b7290c93c
jj: Use delta as diff pager 2025-02-07 15:05:24 +01:00
fee876b87f
vcs: Fix jj program structure 2024-09-19 11:04:54 +02:00