Commit Graph

14 Commits

Author SHA1 Message Date
0b181b9b79 Run cargo fmt with new cargo version 2021-12-21 16:15:12 +01:00
f0c8805cf3 Refactor
This refactors a huge chunk of the code base to make it more maintainable.

Main points:

* Proper separation between bin and lib. Bin handles argument parsing &
  validation and (most of) the output. Lib provides interfaces for all
  opreations.

* Before, libgit2 internals were literred throughout the codebase,
  mainly the `Repository` struct and `git2::Error` in Results. They
  library is now properly wrapped in `repo.rs`, which exposes only the
  required functionality. It also standardizes the Error messages
  (they're just Strings for now) and handles stuff like the copious
  usage of Options to wrap maybe-invalid-utf-8 values. The program will
  still panic on non-utf-8 Strings e.g. in git remotes, but I guess this
  is acceptable. If you actually manage to hit this case, I promise I'll
  fix it :D

* Many unwraps() are now gone and properly handled.

* The table printing functionality is now confined to `table.rs`,
  instead of passing tables as parameters through the whole program.
2021-12-01 20:12:24 +01:00
de186901d0 Support file remotes 2021-11-29 00:53:11 +01:00
b967b6dca3 Set git config properly for worktrees on init/clone
Close #1
2021-11-26 17:21:37 +01:00
e516a652f5 Fix typo 2021-11-24 17:22:10 +01:00
711d9131da Expand the worktree functionality 2021-11-22 21:19:12 +01:00
ca1f649ecf Linting & formatting 2021-11-22 21:11:31 +01:00
b0746c95b5 Report on untracked files 2021-11-21 17:10:30 +01:00
153d09f3ef Add functionality to check out worktree-ready repos 2021-11-21 17:10:25 +01:00
74a7772a29 Fix wrong report when ignored files exist 2021-11-20 18:04:02 +01:00
5f0ec0fec8 Add status command 2021-11-19 22:24:21 +01:00
f251c16566 Use custom error handling for repo opening 2021-11-19 22:18:56 +01:00
1843ddc840 config: Drop redundant "remote_" prefix 2021-11-18 11:36:03 +01:00
f6a51c70cc Initial commit 2021-11-18 11:04:48 +01:00