Code Monkey home page Code Monkey logo

gitui's Introduction

CI crates MIT UNSAFE TWEET dep_status discord

GitUI provides you with the comfort of a git GUI but right in your terminal

Table of Contents

  1. Features
  2. Motivation
  3. Benchmarks
  4. Roadmap
  5. Limitations
  6. Installation
  7. Build
  8. FAQs
  9. Diagnostics
  10. Color Theme
  11. Key Bindings
  12. Sponsoring
  13. Inspiration
  14. Contributing
  15. Contributors

1. Features Top β–²

  • Fast and intuitive keyboard only control
  • Context based help (no need to memorize tons of hot-keys)
  • Inspect, commit, and amend changes (incl. hooks: pre-commit,commit-msg,post-commit,prepare-commit-msg)
  • Stage, unstage, revert and reset files, hunks and lines
  • Stashing (save, pop, apply, drop, and inspect)
  • Push / Fetch to / from remote
  • Branch List (create, rename, delete, checkout, remotes)
  • Browse / Search commit log, diff committed changes
  • Responsive terminal UI
  • Async git API for fluid control
  • Submodule support
  • gpg commit signing with shortcomings (see #97))

2. Motivation Top β–²

I do most of my git work in a terminal but I frequently found myself using git GUIs for some use-cases like: index, commit, diff, stash, blame and log.

Unfortunately popular git GUIs all fail on giant repositories or become unresponsive and unusable.

GitUI provides you with the user experience and comfort of a git GUI but right in your terminal while being portable, fast, free and opensource.

3. Benchmarks Top β–²

For a RustBerlin meetup presentation (slides) I compared lazygit,tig and gitui by parsing the entire Linux git repository (which contains over 900k commits):

Time Memory (GB) Binary (MB) Freezes Crashes
gitui 24 s βœ… 0.17 βœ… 1.4 No βœ… No βœ…
lazygit 57 s 2.6 16 Yes Sometimes
tig 4 m 20 s 1.3 0.6 βœ… Sometimes No βœ…

4. Road(map) to 1.0 Top β–²

These are the high level goals before calling out 1.0:

  • visualize branching structure in log tab (#81)
  • interactive rebase (#32)

5. Known Limitations Top β–²

  • no sparse repo support (see #1226)
  • no git-lfs support (see #1089)
  • credential.helper for https needs to be explicitly configured (see #800)

Currently, this tool does not fully substitute the git shell, however both tools work well in tandem.

The priorities for gitui are on features that are making me mad when done on the git shell, like stashing, staging lines or hunks. Eventually, I will be able to work on making gitui a one stop solution - but for that I need help - this is just a spare time project for now.

All support is welcomed! Sponsors as well! ❀️

6. Installation Top β–²

GitUI is in beta and may contain bugs and missing features. However, for personal use it is reasonably stable and is being used while developing itself.

Packaging status

Various Package Managers

Install Instructions
pacman -S gitui
Fedora
sudo dnf install gitui
Gentoo

Available in dm9pZCAq overlay

sudo eselect repository enable dm9pZCAq
sudo emerge --sync dm9pZCAq
sudo emerge dev-vcs/gitui::dm9pZCAq
sudo zypper install gitui
Homebrew (macOS)
brew install gitui
port install gitui
Winget (Windows)
winget install gitui
Scoop (Windows)
scoop install gitui
Chocolatey (Windows)
choco install gitui
Nix (Nix/NixOS)

Nixpkg

nix-env -iA nixpkgs.gitui

NixOS

nix-env -iA nixos.gitui
Termux (Android)
pkg install gitui
conda install -c conda-forge gitui

Release Binaries

Available for download in releases

Binaries available for:

Linux

  • gitui-linux-x86_64.tar.gz (linux musl statically linked)
  • gitui-linux-aarch64.tar.gz (linux on 64 bit arm)
  • gitui-linux-arm.tar.gz
  • gitui-linux-armv7.tar.gz

All contain a single binary file

macOS

  • gitui-mac.tar.gz (intel Mac, uses Rosetta on Apple silicon, single binary)

Windows

  • gitui-win.tar.gz (single 64bit binary)
  • gitui-win.msi (64bit Installer package)

Nightly Builds

see NIGHTLIES.md

7. Build Top β–²

Requirements

Cargo Install

The simplest way to start playing around with gitui is to have cargo build and install it with cargo install gitui --locked. If you are not familiar with rust and cargo: Getting Started with Rust

Cargo Features

trace-libgit

enable libgit2 tracing

works if libgit2 built with -DENABLE_TRACE=ON

this feature enabled by default, to disable: cargo install --no-default-features

8. FAQs Top β–²

see FAQs page

9. Diagnostics Top β–²

To run with logging enabled run gitui -l.

This will log to:

  • macOS: $HOME/Library/Caches/gitui/gitui.log
  • Linux using XDG: $XDG_CACHE_HOME/gitui/gitui.log
  • Linux: $HOME/.cache/gitui/gitui.log
  • Windows: %LOCALAPPDATA%/gitui/gitui.log

10. Color Theme Top β–²

gitui should automatically work on both light and dark terminal themes.

However, you can customize everything to your liking: See Themes.

11. Key Bindings Top β–²

The key bindings can be customized: See Key Config on how to set them to vim-like bindings.

12. Sponsoring Top β–²

github

13. Inspiration Top β–²

14. Contributing Top β–²

See CONTRIBUTING.md.

15. Contributors Top β–²

Thanks goes to all the contributors that help make GitUI amazing! ❀️

Wanna become a co-maintainer? We are looking for you!

gitui's People

Contributors

alessandroasm avatar alexmaco avatar alistaircarscadden avatar alocquet avatar ammarabouzor avatar andrewpollack avatar bc-universe avatar concelare avatar cruessler avatar dependabot-preview[bot] avatar dependabot[bot] avatar dm9pzcaq avatar extrawurst avatar hamflx avatar imgbotapp avatar jonstodle avatar kosayoda avatar martihomssoler avatar mcord avatar pe avatar pm100 avatar remique avatar sergioribera avatar star-szr avatar theblacksheep3 avatar uugtech avatar wandernauta avatar wizardohio24 avatar yanganto avatar zcorniere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitui's Issues

[RFC] more commands support

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:

  • #82
  • #44
  • allowing to commit not only when in the staging area of the status view

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?

Interactive rebase

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.

tags in commit log

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);
            }
        }

gitui crashes with message 'invalid git path'.

Describe the bug
gitui crashes with message 'invalid git path'.

To Reproduce
Steps to reproduce the behavior:

  1. Use cargo install to install gitui on ubuntu 18.10
  2. type gitui in the command line
  3. Hit return
  4. See 'invalid git path' and observe that the app is not started.

Expected behavior
The app opens

Desktop (please complete the following information):

  • OS: ubuntu 18.10

reset/revert selected hunk

  1. extend async lib with something like reset_hunk (+ unittests)
  2. integration into the UI should be straightforward and similar to how rest of files is already done

stashing support

some question need to be solved for this:

  • does the stashing happen in the status tab? or..
  • we will need a new tab for the stash list anyway, is that the place to also save stuff to the stash? this would allow setting the options like include untracked files?
  • if we stash in the status-tab, do we use a popup to ask for the options like that?

Use more navigation keys

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.

panic on small terminal width

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

Stashing individual hunks or lines

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. :-)

Show the branching structure in the log.

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. :-)

better scrolling in diff/log

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.

app error handling using anyhow

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.

Document tab key to change tab

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:

  1. Open gitui
  2. press 'h' to view the help

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):

  • OS: NixOS Linux
  • Version 0.2.1

Show full commit messages in the log

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.

Log tab not updating after the first time it is opened

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

  1. Create new directory and cd into it
  2. Run git init
  3. Add a file to be committed (file.txt)
  4. Open gitui
  5. Add the file to the stage with the [1] menu
  6. Make a commit with the Commit [c] option
  7. Open the log and see the commit is visible
  8. Again do 3, 4, 5, 6 with a second new file
  9. Open the log and see only one commit

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

better commit msg support

  • allow moving cursor (see #117)
  • show chars used (>50 red)
  • support delegating commit msg editing to a terminal editor for longer messages

Add to ignore

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?

fix commit hooks on windows (+tests)

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.

Per line staging

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.

diff improvement

Screenshot 2020-05-07 at 15 12 49

  1. show filename of file diffed in title
  2. dont show 'no text file' as if it was a diff for binary files

Add inverted colors mode for light backgrounds

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

  • I don't know if it's a good idea, but simply inverting all colors might be enough
  • Full blown (custom) theme support
  • An environment variable or a configuration file are viable alternatives to CLI flags

Additional context

image

Log tab shows no commits when there is 1 commit

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

  1. Create new directory and cd into it
  2. Run git init
  3. Add a file to be committed (file.txt)
  4. git add . and git commit -m "Initial commit"
  5. Run gitui and press Tab to enter the Log page

(for me, it will show there are no commits)

  1. Create another file, stage it, commit it
  2. Run gitui and press Tab to enter the Log page

(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

Linux builds, please?

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!

more error handling

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

error[E0658]: use of unstable library feature 'matches_macro'

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):

  • OS: Windows 10 + WSL 2 + Ubuntu 20.04 LTS
  • Version: gitui v0.2.5

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`.

different key binding presets

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:

1. make key bindings dynamic

  • refactor the key constants into a type KeyBindings
  • change all the pattern matching on CT constants for the bindings currently to be done using runtime variables from the KeyBindings
  • refactor commands::CommandText to be dynamic since they reference the keys

2. allow changing the bindings

  • enable serde feature in crossterm to be able to serialise them
  • use ron to load/save KeyBindings

program crashes when showing help if terminal height is less than help modal height

Describe the bug
program crashes when showing help if terminal height is less than help modal height

To Reproduce
Steps to reproduce the behavior:

  1. run gitui
  2. change the height of the terminal to a very short height (ex 15 chars)
  3. press h to display help

Expected behavior
A warning about the terminal height maybe but no crash.

Desktop (please complete the following information):

  • OS: Windows 10 / Debian
  • Version: master branch

Additional context
This is an issue when the tool is used in integrated terminals inside IDE where the user might resize the terminal often.

Open gitui in a given directory (gitui --cd=xyzdir/)

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

image

[0.2.5] app crashes when pressing h

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:

  1. Install Ubuntu 20.04
  2. Download Linux release 0.2.5 from Github
  3. cd to some git working directory and run gitui
  4. Press "h"

Expected behavior
Some kind of help message should appear, I guess?

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Version 0.2.5

panic on exit (windows)

one of the threads tries to send during shutdown when receiving side of channels closed already -> panic

for some reason only happens on windows

Command Commit [enter] closes/crashes gitui-win

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

  1. Create new directory and cd into it
  2. Run git init
  3. Add a file to be committed (file.txt)
  4. Run gitui.exe
  5. Press enter on the file in the unstaged menu
  6. Press 2 to enter the staged menu
  7. Press Commit [c]
  8. Enter a message
  9. Press Commit [enter]

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

Make panel jumping more intuitive

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, […].

The commit function does not work when you have user.email but no user.name defined

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.