Baptiste Roux
37094a3295
feat: Return an error if the remote type cannot be detected
2023-02-02 23:11:04 +01:00
6e79dd318a
Make clippy happy
2022-12-12 14:46:08 +01:00
bfd7b01ea4
Use en_US for spelling
2022-06-30 20:33:51 +02:00
d8dd604174
Use safer method to remove empty directory
2022-06-30 19:59:46 +02:00
64d8397092
Remove debug output
2022-06-30 19:56:22 +02:00
7d8fbb844e
Properly handle deletion of nested worktrees
2022-06-29 23:40:23 +02:00
ee44fa40fd
Add method to get owned commit of branch
2022-06-23 19:21:05 +02:00
c3aaea3332
Quote branch name on output
2022-06-14 00:15:15 +02:00
fad6f71876
Improve default branch guessing
2022-06-14 00:15:15 +02:00
581a513ebd
Initialize local branches on clone
2022-06-14 00:15:15 +02:00
f1e212ead9
Add function to get all remote branches
2022-06-14 00:15:15 +02:00
bc3001a4e6
Add function to get basename of branch
2022-06-14 00:15:15 +02:00
c4fd1d0452
Refactor default_branch() for readability
2022-06-14 00:15:15 +02:00
32eb4676ee
Restructure into smaller modules
2022-05-27 23:37:54 +02:00
62c1e430b2
Derive Eq when deriving PartialEq
...
There is a clippy lint for this.
2022-05-26 18:57:31 +02:00
1212917fae
Add unit tests for Repo::fullname()
2022-05-26 18:57:31 +02:00
b8c552fb62
Give repos a namespace to allow subdirectories
2022-05-26 18:57:31 +02:00
6ef759a14e
Separate config structs from internal structs
2022-05-26 18:57:31 +02:00
50a0f4d766
Fail properly when default branch cannot be detected
2022-05-26 18:57:31 +02:00
c3c1c98913
Run cargo fmt
2022-05-10 18:26:06 +02:00
e940ab69fb
Accept clippy suggestions
2022-05-10 18:25:45 +02:00
14c95f2704
Fix worktree creation handling
2022-05-10 17:54:03 +02:00
7e673200c8
Fix error on empty cloned repository
2022-01-23 22:11:54 +01:00
6e4c388195
Add --stash options to pull and rebase
2022-01-22 11:23:53 +01:00
6436a8194e
Disable "raw" SSH key usage
...
There is no sane way to get that fallback working with libgit2. Plus,
it's not a good practice anyway to have a non-password protected SSH
key.
2022-01-22 11:23:53 +01:00
ff48b2a017
Properly set up remote & branches after cloning
2022-01-08 14:26:16 +01:00
ec45678ce3
Fix SSH auth, fall back to file if agent fails
2022-01-08 14:15:27 +01:00
9acf5b10d5
Make cargo fmt happy
2022-01-08 14:15:26 +01:00
eaf8e2bfa2
rebase: Just continue on empty patch
2022-01-07 10:15:05 +01:00
31b90af066
Properly report status on worktree repos
2022-01-04 12:22:02 +01:00
ef8a57c60e
Add rebase option for worktrees
2022-01-04 11:18:48 +01:00
c0168c3650
Add helper function on RepoStatus to check clean state
2021-12-31 11:20:01 +01:00
717b0d3a74
Add fetch & pull option to worktrees
2021-12-31 11:20:01 +01:00
fcbad5a3eb
Refactor worktree into own struct
2021-12-31 10:58:11 +01:00
ae9a928d45
Detect default branch from grm.toml if possible
2021-12-31 10:58:08 +01:00
3ff7b61518
Refuse to convert to worktree with ignored files
2021-12-23 18:33:14 +01:00
61a8d63374
Allow nested worktree directories
2021-12-23 18:33:14 +01:00
02e9de0cbd
Proper formatting
2021-12-23 18:33:14 +01:00
552b3a6aad
SSH: Fall back to ~/.ssh/id_rsa when no agent available
2021-12-23 18:33:14 +01:00
fcc22791e5
Refuse to push against non-pushable remotes (e.g. HTTPS for now)
2021-12-23 18:33:14 +01:00
b183590096
Add default tracking configuration
2021-12-23 18:33:14 +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
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