extrawurst / gitui Goto Github PK
View Code? Open in Web Editor NEWBlazing π₯ fast terminal-ui for git written in rust π¦
License: MIT License
Blazing π₯ fast terminal-ui for git written in rust π¦
License: MIT License
show tags in commit log
for name in repo.tag_names(Some(pattern))?.iter() {
let name = name.unwrap();
let obj = repo.revparse_single(name)?;
if let Some(tag) = obj.as_tag() {
print_tag(tag, args);
} else if let Some(commit) = obj.as_commit() {
print_commit(commit, name, args);
} else {
print_name(name);
}
}
calling the hooks is currently only implemented of *nix systems.
how does this even work on windows? does git call *.bat files? help of someone on a windows machine would be required here.
reset_hunk
(+ unittests)One of the main goals of gitui
is to not require the user to learn cryptic hotkeys/shortcuts to work with it. The command bar (at the bottom) always shows what actions are available in the current context.
That said:
Right now, in certain views the command bar is already quiet full and especially crowded when using a small/narrow terminal.
some features right now are not tackled because of this:
one solution for this could be to automatically cut of the commands at the end and show a more [m]
command that would popup something similar to the help but only with the available commands plus allowing to trigger them when pressing enter on one.
Any better ideas?
Is your feature request related to a problem? Please describe.
I sometimes want to stash only parts of files - for example some dirty debug code when mixed with "real" changes, when I might want to recover the debug code after testing the change without.
Describe the solution you'd like
When selecting changes to stash, allow selecting individual parts of files to stash rather than stash everything, like git stash push --patch
.
Describe alternatives you've considered
Not using gitui for this. :-)
Is your feature request related to a problem? Please describe.
The UI doesn't really tell that you can use 1-4 to switch between panels. There is a number behind the panel's title (Unstaged Changes [1]
), but that could also be the number of unstaged files.
Describe the solution you'd like
Lazygit does a pretty good job at it: The bottom panel says: 1-5: jump to panel, [β¦]
.
Is your feature request related to a problem?
Use Home, End, PgUp and PgDn keys in diff and log panes.
Describe the solution you'd like
Scroll to top, bottom and by screen's height.
Describe alternatives you've considered
E.g. like tig.
in the logview right now only tag will show up and its even pretty random which one.
one of the threads tries to send during shutdown when receiving side of channels closed already -> panic
for some reason only happens on windows
currently it only include linux and mac.
some question need to be solved for this:
include untracked files
?Is your feature request related to a problem? Please describe.
Currently the main text color is yellow. Which doesn't read well on a white terminal background.
Describe the solution you'd like
A CLI flag to switch to a dark color theme for better readability.
Describe alternatives you've considered
Additional context
now that we have nice error coverage in asyncgit
we could take the next step and add error support to the main application using anyhow
based on the great summary on error handling in rust:
my idea would be to show an error popup similar to this one where ever possible: #74 (comment)
if we come across unrecoverable errors we might need to look into a second path aswell which will close the application.
now that the diff and log component know their render height, we can make scrolling/selecting more natural by only scrolling once the selection would leave the view instead of always centering the view over the selection.
Is your feature request related to a problem? Please describe.
Since gitui has no configuration (yet?), this may be a bit early, but you're already on the wrong path:
to enable logging to
~/.gitui/gitui.log
:
So please don't do that and use the XDG environment variables do determine where to put config, log and other files.
Additional context
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Describe the bug
In gitui-win v0.2.6 after staging, and after writing a commit message, pressing Enter abruptly closes the gitui.exe window. Inspecting the repo after shows that the commit is not made.
To Reproduce
Expected behavior
The commit should be made and the ui would update to reflect that without closing.
Desktop (please complete the following information):
gitui-win v0.2.6
Describe the bug
In gitui-win v0.3.0 the Log tab is not updating after the first time the Log tab is opened.
The Log tab does not include the most recent commit when you make the commit with gitui or when you make the commit with another tool.
Tabbing to Status and back to Log does not make it update.
To Reproduce
Expected behavior
When the Log tab is opened it updates the list completely.
Perhaps, it also would update after a few seconds like the [1] menu does with new files/changes.
Desktop (please complete the following information):
gitui-win v0.3.0
based off of #43 there is still the open issue of how to support different key bindings like vim
,emacs
and nano
. I need input on those, cause I don't use them at all.
The most flexible solution would be having gitui
dump the default bindings into a config file (on first run) and load it on startup so people can alter it.
My plan is to do it in 2 bigger changes:
KeyBindings
KeyBindings
commands::CommandText
to be dynamic since they reference the keysserde
feature in crossterm to be able to serialise themron
to load/save KeyBindings
Is your feature request related to a problem? Please describe.
I'm also using Fork, and the sudden change of policy doesn't really suit me so I was looking for an alternative. The feature I use the most was interactive rebase so here is my feature request :)
Describe the solution you'd like
Ability to have a list of commit that I can act upon (squash, reword etcβ¦)
Describe alternatives you've considered
I'm not really good at git CLI, always used a UI so if gitui could become a fully featured Git UI, that would be awesome.
I currently use lazygit
, but have a few gripes with it.
I understand that this project is in very early stages, but I'd still want to try it.
Having linux builds like other rust tools would be great, thanks!
support adding untracked files in the changeset to ignore.
the more important question here is: how to add even more commands without flooding the quicker (bottom) - some context menu popup mechanism maybe?
net2
crate has been deprecated; usesocket2
instead
Details | |
---|---|
Status | unmaintained |
Package | net2 |
Version | 0.2.34 |
URL | deprecrated/net2-rs@3350e38 |
Date | 2020-05-01 |
The net2
crate has been deprecated
and users are encouraged to considered socket2
instead.
See advisory page for additional details.
Describe the bug
program crashes when showing help if terminal height is less than help modal height
To Reproduce
Steps to reproduce the behavior:
gitui
h
to display helpExpected behavior
A warning about the terminal height maybe but no crash.
Desktop (please complete the following information):
Additional context
This is an issue when the tool is used in integrated terminals inside IDE where the user might resize the terminal often.
Describe the bug
In gitui v0.3.0 the commit function does not allow a commit to be made when the user has a user.email defined and no user.name defined.
It took me a while to discover that there is a difference between user.name being defined as empty (git config user.name ""
) and it being undefined (as in, git config --list
does not show the entry at all).
In the empty case, interestingly enough, git commit does not allow the commit to be made, likewise gitui does not allow it.
In the undefined case, git commit does allow the commit to be made (and I think it shows unknown
in that field in later git log
or git show
calls). This is where the gitui behaviour is different, as gitui does not allow a commit to be made with this message:
Status | Log
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βUnstaged Changes [1]βββββββErrorβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β βcommit failed: β β
β βgit error:config value 'user.name' was not found; class=Config β β
β β(7); code=NotFound (-3) β β
β β β β
Expected behavior
gitui would allow a commit to be made and fill in unknown
as git commit does.
Is your feature request related to a problem? Please describe.
I'd like to set the tool up so that when I right click on a directory (in windows) it launches gitui in the clicked directory. To do this I'd need a way to open the program in a different directory.
Describe the solution you'd like
gitui.exe --cd=projectdir
to open the tool in the directory called projectdir
Describe alternatives you've considered
The context menu works fine from inside the directory, but with git bash I'm used to clicking on a directory to open that tool, so it would be nice if this tool mirrored that behaviour. This is a low priority thing.
Additional context
Is your feature request related to a problem? Please describe.
In the Log tab, I can see only the start of the log message for each commit, but when browsing the log I am likely to want to read the full message (or indeed view the diff).
Describe the solution you'd like
While browing the log, pressing 'enter' when an entry is highlighted could open up a panel showing more information - principally the commit message, but the diff for that commit would also be very useful.
Describe alternatives you've considered
An alternative could be a view like the main Status tab, with commits instead of files on the left, and a panel with the details on the right, showing the commit highlighted.
Additional context
Add any other context or screenshots about the feature request here.
MS announced a package manager: https://devblogs.microsoft.com/commandline/windows-package-manager-preview/
would be nice to be in there!
maybe it also allows being updated as part of our CD
pipeline.
As I am not on windows, I am going to need help here :)
I started asyncgit
crate ignoring errors unwrap
is all over the place but the goal would be to handle them correctly like with sync::get_commits_info
Currently we can stage things only hunk by hunk or whole file at once. It would be nice to have ability to stage only current line or bunch of selected lines.
Flow would look like something like this:
We focus on diff panel and navigate to a hunk we want to work with.
Select lines we want to stage with arrows and some modifier key (is tui allow that kind of thing?) and press [S]tage button. If there were no selection stage current line.
Inspired by git-cola behavior, but it's a gui app.
Describe the solution you'd like
Would be nice to recreate the add all behaviour with, perhaps, shift+enter.
Describe the bug
gitui
crashes with message 'invalid git path'.
To Reproduce
Steps to reproduce the behavior:
cargo install
to install gitui on ubuntu 18.10gitui
in the command lineExpected behavior
The app opens
Desktop (please complete the following information):
term is looking for a new maintainer
Details | |
---|---|
Status | unmaintained |
Package | term |
Version | 0.6.1 |
URL | Stebalien/term#93 |
Date | 2018-11-19 |
The author of the term
crate does not have time to maintain it and is looking
for a new maintainer.
Some maintained alternatives you can potentially switch to instead, depending
on your needs:
See advisory page for additional details.
Is your feature request related to a problem? Please describe.
It can be useful seeing the branching/merging structure in the log view, in a similar way to git log --oneline --decorate --graph
Describe the solution you'd like
The graph view visible in the log window.
Describe alternatives you've considered
I haven't got any other alternatives other than not doing it. :-)
revert 72a1f94 once Crossterm issue is fixed: crossterm-rs/crossterm#421
Describe the bug
In gitui-win v0.2.6 the Log tab shows nothing when there is exactly 1 commit. When the second commit is added, both the first and second commit will appear in the Log when you go to the tab.
Furthermore, when there are 2 commits (for example "Initial commit" and "Add readme") the text in the top left of the Log tab shows "commit 0/1" instead of 2/2.
To Reproduce
git add .
and git commit -m "Initial commit"
(for me, it will show there are no commits)
(for me, it will show both commits)
Expected behavior
When there is exactly 1 commit the Log page would show it, as well as the top left text would read 'commit 1/1'
My impression would also be that the 'commit x/y' message would show y equals the total number of commits, and x equals the (1-indexed) number that is currently highlighted, where the very first commit is 1 and the most recent is >1.
Desktop (please complete the following information):
gitui-win v0.2.6
currently this is one of the blocking operations that takes ~1s on large repos (tested on linux)
gitui
closes with a panic when resizing the terminal to weird small width like below 15:
16:06:42 [ERROR] panic: PanicInfo { payload: Any, message: Some(Trying to access position outside the buffer: x=14, y=0, area=Rect { x: 0, y: 0, width: 14, height: 54 }), location: Location { file: "/Users/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.9.4/src/buffer.rs", line: 245, col: 9 } }
trace:
0: backtrace::backtrace::trace_unsynchronized
1: backtrace::backtrace::trace
2: backtrace::capture::Backtrace::create
3: backtrace::capture::Backtrace::new
4: gitui::set_panic_handlers::{{closure}}
5: std::panicking::rust_panic_with_hook
6: _rust_begin_unwind
7: std::panicking::begin_panic_fmt
at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panicking.rs:332
8: tui::buffer::Buffer::index_of
9: tui::buffer::Buffer::set_stringn
10: tui::buffer::Buffer::set_string
11: <tui::widgets::tabs::Tabs<T> as tui::widgets::Widget>::render
12: tui::terminal::Frame<B>::render_widget
13: gitui::app::App::draw_tabs
14: gitui::app::App::draw
15: gitui::draw::{{closure}}
16: tui::terminal::Terminal<B>::draw
17: gitui::draw
18: gitui::main
19: std::rt::lang_start::{{closure}}
20: std::panicking::try::do_call
21: ___rust_maybe_catch_panic
22: std::rt::lang_start_internal
23: std::rt::lang_start
24: _main
use notify to watch git instead of permanent polling
Describe the bug
It took me a while to work out how to change to the "Log" tab, as the key to press, tab, isn't mentioned in the help.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The help should show the key to press to change tab, (Something like "Change tab [tab]") probably in the General section.
Desktop (please complete the following information):
Describe the bug
When using the app on Ubuntu 20.04, in either view, pressing "h" for help causes the application to exit with exit code 101.
Running under strace, it doesn't look like anything bad happens - there are no signals and then something calls exit_group(101)
.
To Reproduce
Steps to reproduce the behavior:
gitui
Expected behavior
Some kind of help message should appear, I guess?
Desktop (please complete the following information):
Describe the bug
failed to compile gitui v0.2.5
on Ubuntu 20.04 on WSL 2
To Reproduce
run cargo install gitui
errors in the log:
error[E0658]: use of unstable library feature 'matches_macro'
Expected behavior
cargo install gitui should work as documented.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/emv/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.2.5/src/components/changes.rs:140:17
|
140 | matches!(tree_item.kind, FileTreeItemKind::Path(_));
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/emv/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.2.5/src/components/statustree.rs:199:12
|
199 | if matches!(item_kind, FileTreeItemKind::Path(PathCollapsed(collapsed))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/emv/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.2.5/src/components/statustree.rs:217:12
|
217 | if matches!(item_kind, FileTreeItemKind::File(_))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/emv/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.2.5/src/components/statustree.rs:218:16
|
218 | || matches!(item_kind,FileTreeItemKind::Path(PathCollapsed(collapsed))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/emv/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.2.5/src/components/statustree.rs:226:19
|
226 | } else if matches!(item_kind, FileTreeItemKind::Path(PathCollapsed(collapsed))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/emv/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.2.5/src/components/statustree.rs:300:16
|
300 | if matches!(item_kind, FileTreeItemKind::Path(PathCollapsed(collapsed)) if collapsed)
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0658`.
error: failed to compile `gitui v0.2.5`, intermediate artifacts can be found at `/tmp/cargo-install1l61u0`
Caused by:
could not compile `gitui`.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.