Commit graph

222 commits

Author SHA1 Message Date
Jesse Duffield 5df27c61ed Apply correct styling to root commit in graph
The root commit is special in that it has no parents. So we need to add a pipe that's headed for a commit
that doesn't actually exist i.e. the mythical empty tree commit. We're using the actual hash of that
pseudo-commit, but it's not being read anywhere.
2023-06-01 22:20:30 +10:00
Jesse Duffield a4db44bc3d show commits against branches 2023-06-01 19:21:24 +10:00
Jesse Duffield 0e0458f355 More compact and flexible date format
You can now configure both a time format and a short time format, where the short format kicks in
when the time is within the last day
2023-05-26 17:31:39 +10:00
Jesse Duffield d772c9f1d4 Use sentence case everywhere
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-05-25 23:52:19 +10:00
Jesse Duffield ec3a28df43 Right-align key labels in menu
I find this makes it look a little nicer
2023-05-21 12:09:43 +10:00
Jesse Duffield ee11046d35 Refactor interface for ApplyPatch 2023-05-20 20:54:39 +10:00
Jesse Duffield 5dacbb6293 merge master into refactor-better-encapsulation 2023-05-02 19:05:42 +10:00
Jesse Duffield 8edad826ca Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the
gui package purely for the sake of better encapsulation
2023-04-30 13:19:52 +10:00
Stefan Haller 227b0b781c Show update-ref commands in rebase todo list
This is useful when working with stacked branches, because you can now move
"pick" entries across an update-ref command and you can tell exactly which
branch the commit will end up in.

It's also useful to spot situations where the --update-refs option didn't work
as desired. For example, if you duplicate a branch and want to rebase only one
of the branches but not the other (maybe for testing); if you have
rebase.updateRefs=true in your git config, then rebasing one branch will move
the other branch along. To solve this we'll have to introduce a way to delete
the update-ref entry (maybe by hitting backspace?); this is out of scope for
this PR, so for now users will have to type "git rebase --edit-todo" into the
custom command prompt to sort this out.

We will also have to prevent users from trying to turn update-ref commands into
other commands like "pick" or "drop"; we'll do this later in this branch.
2023-04-15 08:36:03 +02:00
Stefan Haller 740474c10c Visualize branch heads in commits panel
Useful when working with stacked branches.
2023-04-15 08:36:03 +02:00
Stefan Haller c53c5e47ef Store commit.Action as an enum instead of a string
The main reason for doing this (besides the reasons given for Status in the
previous commit) is that it allows us to easily convert from TodoCommand to
Action and back. This will be needed later in the branch. Fortunately,
TodoCommand is one-based, so this allows us to add an ActionNone constant with
the value 0.
2023-04-15 08:36:03 +02:00
Stefan Haller 188773511e Store commit.Status as an enum instead of a string
This is unrelated to the changes in this PR, but since we are doing the same
thing for the commit.Action field in the next commit, it makes sense to do it
for Status too for consistency. Modelling this as an enum feels more natural
than modelling it as a string, since there's a finite set of possible values.
And it saves a little bit of memory (not very much, since none of the strings
were heap-allocated, but still).
2023-04-15 08:36:03 +02:00
Stefan Haller 549ce09f71 Fix deprecated rand.Seed 2023-03-19 10:00:19 +01:00
Jesse Duffield 60f902f026 rename patch manager to patch builder 2023-03-19 16:35:57 +11:00
Jens Kutilek 5c8bc790ff
Make arrows consistent (#2501) 2023-03-18 11:32:44 +11:00
Stefan Haller 6af8f278d0 Don't put "<--- YOU ARE HERE" in the commit model's name
Instead, derive it from context at display time (if we're rebasing, it's the
first non-todo commit). This fixes the problem that unfolding the current
commit's files in the local commits panel would show junk in the frame's title.

Along the way we make sure to only display the "<--- YOU ARE HERE" string in the
local commits panel; previously it would show for the top commit of a branch or
tag if mid-rebase.
2023-03-01 09:12:00 +01:00
Pere Bohigas adef3bd4ca Add icon for Kotlin script files 2023-02-25 15:14:26 +01:00
Pere Bohigas c80a94aa7a Add icon for Kotlin files 2023-02-25 10:51:43 +01:00
Jesse Duffield 39c56553b3 show tag message 2023-02-20 19:01:08 +11:00
Ryooooooga 52a2e4c1dc fix: fix ambiguous branch name
test: add an integration test for checkout branch by name

fix: fix full ref name of detached head

refactor: refactor current branch loader

chore: use field name explicitly
2022-11-14 19:05:07 +11:00
Ryooooooga d90fedfbf8
feat: add stash icon 2022-10-14 21:58:58 +09:00
Jesse Duffield 755ae0ef84 add deadlock mutex package
write to deadlock stderr after closing gocui

more deadlock checking
2022-08-07 11:16:14 +10:00
Jesse Duffield 682be18507 refactor to use generics for file nodes
use less generic names
2022-07-31 19:43:14 +10:00
Luka Markušić 1f482e585e Fix github linter errors 2022-07-30 08:10:29 +02:00
Ryooooooga e57931f56d
test: fix timezone for time format tests 2022-05-18 20:55:29 +09:00
Ryooooooga 1f1d871837
feat: add ability to customize time format 2022-05-18 20:55:27 +09:00
Jesse Duffield e67fef776b add author email to commits 2022-05-08 14:26:18 +10:00
Ryooooooga db3568e4f2
chore(gui): remove todo 2022-04-29 17:53:43 +09:00
Ryooooooga 86af186683
feat(file_icons.go): add Cargo.toml icons 2022-04-24 18:23:14 +09:00
Ryooooooga f972d6ae68
feat(gui): show remote icons 2022-04-23 12:25:42 +09:00
Ryooooooga 11d0e7e17d
feat(gui): show branch icons 2022-04-23 12:25:41 +09:00
Ryooooooga cb13fe7f46
feat(gui): show commit icons 2022-04-23 12:25:41 +09:00
Ryooooooga b07aeda5a6
feat(gui): show file icons 2022-04-23 12:25:40 +09:00
Jesse Duffield dfb293c985 better upstream changes presentation 2022-04-18 11:03:28 +10:00
Jesse Duffield 00afa30ebf better appearance for reverse attribute 2022-04-16 15:19:32 +10:00
Ryooooooga 09d24ebd1d fix test 2022-04-02 17:04:42 +11:00
Ryooooooga 4835fc00b8 introduce Ref interface 2022-04-02 17:04:42 +11:00
Jesse Duffield 94a53484a1 would you believe that I'm adding even more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield 1b75ed3740 many more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield bf4f06ab4e more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield eda8f4a5d4 lots more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield c7a629c440 make more use of generics 2022-03-24 20:14:41 +11:00
Jesse Duffield dde30fa104 add gone branches status 2022-03-24 17:50:25 +11:00
Jesse Duffield 5ded030a88 diff colour for reflog commits 2022-03-23 18:53:29 +11:00
Jesse Duffield a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
Jesse Duffield 55af07a1bb fix CI 2022-03-17 19:13:40 +11:00
Jesse Duffield d82f175e79 refactor contexts 2022-03-17 19:13:40 +11:00
Jesse Duffield 182c999ee0 fix linting 2022-03-17 19:13:40 +11:00
Jesse Duffield b5515da00b move commit files context into new structure 2022-03-17 19:13:40 +11:00
Jesse Duffield c084abb378 move more view model logic into the files view model 2022-03-17 19:13:40 +11:00
Jesse Duffield 8ea7b7a62e migrate files context to new structure 2022-03-17 19:13:40 +11:00
Daniel Kiss f5a5b7f966 Add unstagedChangesColor config option 2022-03-16 19:21:39 +11:00
Matt Cles 9adf4a1908 Add shared function for loading map of custom colors 2022-02-01 18:55:45 +11:00
Matt Cles 4df7646654 Add configurable colors for branch prefixes
Branches can now be colored based on their prefix, if it matches
a user defined prefix in the config file. If no user defined
prefix matches, then it will fallback to the defaults: green for
'feature', yellow for 'bugfix', and red for 'hotfix'. All
remaining branches will be set to the default text color.
2022-02-01 18:55:45 +11:00
Jesse Duffield ebbdf829e7 fix panic on rebase 2022-01-26 17:20:58 +11:00
Jesse Duffield 5e9cfab283 better rendering of bisect markets in commits panel 2022-01-26 16:52:20 +11:00
Jesse Duffield ca7cfc3232 only show commits from start ref if bad commit is reachable from there 2022-01-26 16:52:20 +11:00
Jesse Duffield 61ccc1efd2 exclude interactive rebase TODO commits from commit graph 2022-01-22 15:12:24 +11:00
Jesse Duffield 5b7dd9e43c properly resolve cyclic dependency 2022-01-22 10:48:51 +11:00
Jesse Duffield 4ab5e54139 add support for git bisect 2022-01-22 10:48:51 +11:00
Jesse Duffield 1c84f77319 always specify upstream when pushing/pulling 2022-01-15 15:34:01 +11:00
Jesse Duffield 18f48a43d5 add some more linters 2022-01-09 14:09:53 +11:00
Cokile 76e6745526 fix typo 2021-12-25 11:54:27 +11:00
Cokile 3771f9c98b support config unified color for commit authors 2021-12-25 11:54:27 +11:00
Jesse Duffield 9a9e3d506d more consistent rendering 2021-11-05 07:58:21 +11:00
Jesse Duffield 06ca71e955 fix bug 2021-11-05 07:58:21 +11:00
Jesse Duffield f6ec7babf5 add some config 2021-11-05 07:58:21 +11:00
Jesse Duffield 802cfb1a04 render commit graph 2021-11-05 07:58:21 +11:00
Jesse Duffield 7a464ae5b7 add graph algorithm 2021-11-01 10:03:49 +11:00
Jesse Duffield c47c539e12 support user-configurable author colours 2021-10-30 18:26:06 +11:00
Jesse Duffield 7561703e8d move author name colouring code into its own file 2021-10-30 18:26:06 +11:00
Jesse Duffield e122f421e6 only use a single initial for double sized runes 2021-10-30 18:26:06 +11:00
Ryooooooga 6171690b00 Fix multibyte initial characters 2021-10-30 18:26:06 +11:00
Jesse Duffield 253504a094 associate random colours with authors 2021-10-30 18:26:06 +11:00
Sam Burville c5f7ad5adb Make cherry pick commit color customisable
Two new settings in the config, which allow the cherry picked
foreground and background to be custom colors.

Issue #856
2021-09-30 01:26:05 +10:00
Jesse Duffield d626bcac00 color fixups 2021-08-01 16:14:56 +10:00
Jesse Duffield 117c0bd4f7 simplify code a bit 2021-07-31 17:33:13 +10:00
mjarkk 79848087bc Switch to github.com/gookit/color for terminal colors 2021-07-30 15:14:46 +02:00
mjarkk fc76b44b45 correctly show files with special chars in commit 2021-07-23 12:04:23 +02:00
mjarkk 9a087d04eb Change the way file statuses are loaded
This makes it so file statuses recived from git no longer get joined
before spliting them again.
2021-07-22 22:12:43 +02:00
mjarkk fc066d2f2e parse github emoji config option 2021-07-16 14:06:01 +02:00
Jesse Duffield 9fdf92b226 more refactoring
WIP

WIP
2021-06-06 09:12:49 +10:00
Jesse Duffield 50c169e0a3 better colouring for directories for when adding a patch 2021-04-02 11:00:15 +11:00
Jesse Duffield 7364525bf5 do not show commit files of another parent as added to the patch 2021-04-02 11:00:15 +11:00
Jesse Duffield 54910fdb76 refactor 2021-04-02 11:00:15 +11:00
Jesse Duffield 332a3c4cbf file tree for commit files 2021-04-02 11:00:15 +11:00
Jesse Duffield 4b4bfae4f4 fix background colour on selected line 2021-03-30 21:57:00 +11:00
Jesse Duffield 2b8302bced refactor 2021-03-30 21:57:00 +11:00
Jesse Duffield c27cea6f30 more file tree improvements 2021-03-30 21:57:00 +11:00
Jesse Duffield 45939171ea WIP
start moving to new interface

WIP

WIP

WIP

WIP

WIP
2021-03-30 21:57:00 +11:00
Jesse Duffield be404068ff support labels for suggestions which are distinct from values 2020-11-28 20:48:17 +11:00
Jesse Duffield da3b0bf7c8 Start on supporting auto-suggestions when checking out a branch
switch to other fuzzy package with no dependencies
2020-11-28 20:48:17 +11:00
Jesse Duffield 7b4a0f20b2 add submodules context 2020-10-02 08:09:42 +10:00
Jesse Duffield ce6f8ed1bc move models folder into commands folder 2020-09-29 20:48:49 +10:00
Jesse Duffield f9643448a4 move commit files 2020-09-29 20:48:49 +10:00
Jesse Duffield 91f0b0e28f move stash panel 2020-09-29 20:48:49 +10:00
Jesse Duffield 8d2af5cc61 move file and submodule 2020-09-29 20:48:49 +10:00
Jesse Duffield eda4619a4f move remotes and remote branches 2020-09-29 20:48:49 +10:00
Jesse Duffield e849ca3372 move tags 2020-09-29 20:48:49 +10:00
Jesse Duffield 630e446989 move commits model into models package 2020-09-29 20:48:49 +10:00
Jesse Duffield 44248d9ab0 pull branch model out into models package 2020-09-29 20:48:49 +10:00
Jesse Duffield b8da166ab1 support discarding submodule changes 2020-09-29 18:21:59 +10:00
Jesse Duffield ca437a6504 support submodules 2020-09-29 18:21:59 +10:00
Jesse Duffield f99d5f74d4 drop merge commits when interactive rebasing just like git CLI 2020-08-27 21:51:07 +10:00
Jesse Duffield 9f71c8d2b9 rename Status to PatchStatus 2020-08-23 15:11:06 +10:00
Jesse Duffield 4fb52ce2ab better handling of there being no commit files 2020-08-23 15:11:06 +10:00
Jesse Duffield 2915134007 show file statuses in commit files view 2020-08-23 15:11:06 +10:00
Jesse Duffield 442f6cd854 more cherry picking stuff, mostly around the reflog 2020-08-23 14:29:18 +10:00
Jesse Duffield 826d1660c9 move patch stuff into its own package 2020-08-15 11:41:37 +10:00
Jesse Duffield 267730bc00 standardise how we handle background colours 2020-05-13 21:24:25 +10:00
Jesse Duffield 40fbce91ce add new diff mode
WIP

WIP

WIP

WIP

WIP

WIP

WIP
2020-03-29 18:26:24 +11:00
Jesse Duffield 33d287d2f0 remove old diff mode code 2020-03-29 18:26:24 +11:00
Jesse Duffield c1a4bd0482 more smart refreshing
WIP

WIP

WIP

WIP

WIP

fix how diff entries are handled

WIP

WIP

WIP

WIP

WIP

WIP
2020-03-28 11:59:45 +11:00
Jesse Duffield d0336fe16f better presentation of remotes 2020-03-28 11:59:45 +11:00
Jesse Duffield 198d237679 more centralised handling of refreshing 2020-03-28 11:59:45 +11:00
Jesse Duffield 91a404d033 separate commits from cherry pick state 2020-03-26 21:44:33 +11:00
Jesse Duffield d027cf969c better handling of current branch name 2020-03-26 20:37:06 +11:00
Jesse Duffield 37acc17cf3 more lenient getting of short shas 2020-03-26 18:30:02 +11:00
Jesse Duffield 98fbc61221 better formatted reflog list 2020-03-25 09:39:04 +11:00
Jesse Duffield 1be0ff8da7 better upstream tracking and allow renaming a branch 2020-03-18 21:29:06 +11:00
Jesse Duffield f94d0be2c9 refactor the way we render lists 2020-02-25 21:21:07 +11:00
Jesse Duffield 9fd9fd6816 better commit lines in fullscreen mode 2020-02-25 21:21:07 +11:00