Commit Graph

9 Commits

Author SHA1 Message Date
35e7c34d11 Do not panic when finding unmanaged worktrees fails 2022-05-26 18:57:31 +02:00
38c66cad62 Add git forge integration 2022-05-26 17:55:07 +02:00
e940ab69fb Accept clippy suggestions 2022-05-10 18:25:45 +02:00
1cf4e85014 Fix non-worktree directory detection for status 2022-05-10 18:24:29 +02:00
31b90af066 Properly report status on worktree repos 2022-01-04 12:22:02 +01:00
fcbad5a3eb Refactor worktree into own struct 2021-12-31 10:58:11 +01:00
27586b5ff0 Add functionality for persistent branches 2021-12-23 18:33:14 +01:00
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