This is a dirty hack, but we won't have to duplicate it when the kinds
field is done, so I don't feel /too/ bad about including it :D
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This is to help make series operations more generic.
This refactor has been needed for a while, and I'm very excited to
finally start working on it, but this is just the bare minimum, we
still need to handle on a repo type basis.
But also, yes, this starts the slow crawl towards generic repos intead
of hardcoded functions for each repo type (links, gitrepo) etc
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This starts to implement repo and category selecting for subcommands
that make use of these (push, pull, quick, fast... most of them!)
Still, this is proof of concept, now it needs to actually be made robust
and generalized, as well as implemented on all the commands.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Of course, the calling process is different from us, and we can't
actually change their PWD >_<
*sigh*
But, this can be put in e.g. an alias, which seems to be what most
jump/cd expanding types of programs do. We are not those, so, going
beyond what most of those do with ptrace and hackery is not really in
scope...
But ugh, I hate this. But I still want this feature for myself
so ¯\_(ツ)_/¯
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Setup only for loading config file for now, probably not a lot of code
here that is super intensive, but having the structure set up to bench
is pretty nice when it's needed suddenly.
Two steps ahead as always, still haven't capitalized on the architecture
rewrite, yet here I am adding this.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Adding git to the library file makes the doctests run.
Turns out they were very broken.
This commit sets us up for a refactor, with setter and getters.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This is usually regenereated with a different ordering every time tests
are run. This is annoying.
It's because the underlying hashmap doesn't have ordering.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This required a lot of refatoring, and added a lot of codedepth that
have to be repaid soon by a large refactor.
Also, it is becoming painfully obvious that testing should be expanded
significantly.
This, after the refactor, nonetheless.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This took a fair amount of fiddeling with attempts at a more elegant
solution before I just accepted that it wasn't gonna be that fancy and
went with what is in this commit.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
The formatting was kinda broken because I was using multi line strings
like I was writing nix :S
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This does not implement no emoji, althugh it should be easier with the
strings consts in place.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This puts the emoji for success/failure of a git operation into the
strings module of utils.
This might be handy down the line for implementing the disable emotes
flag.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Created the actual flag, but didn't implement.
I had underestimated the amount of global state and abstracting for
output it would take.
This will probably be essentially free after a refactor that I don't
wanna do right now, given how I spend most my energy on the
architectural overhaul.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Idk why I even included this, but then again, it is probably not bad to
be very explicit about what is a pledge.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This was done with the help of:
`cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used`
Also fixed some warns that might have turned into errors in the future.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This is nice because it sets us up for the future, when we eventually
implement link categories, so we can share categories for both repos,
links, neither or either.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Quick and Fast are shortcut flags that essentially give all flags
nescesarry for Quick and Fast subcommand.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This allows committing with the users set editor, which is very handy if
you don't want to actually make meaningful commits.
This existed before, but implementing the instruction architecture for
composite actions broke it, because the status code refactor used
output() instead of status().
Thankfully, this does support exit codes still, but it does create some
cluttered output which is not terrible great UX, but this is not
extremely important, as this associated function isn't even currently
used by any user facing commands (except its explicit subcommand).
:D
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Fixed quick fast messages by "leaking" the memory for the input
effectively makiing it static.
This feel extremely hacky, and should never be used in a loop.
Consider this temporary until I find a better way, and or smart enough
people to tell me it's not as bad as I feel it is.
...Sorry Djikstra.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Fixed problem introduced by error handling.
This does not fix fast or fix lack of message input.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Updated pretty-env-logger to 0.5.0, as it was pulling atty which has a
potential security vulnerability, and further has been unmaintained and
unresponsive for 3 years.
https://github.com/advisories/GHSA-g98v-hv3f-hcfr
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
As described in preceding commits.
Also added documentation changes that I forgot to add before amending to
previous commit :(
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This follows up on previous commits message, but with a completely
different implementation that is a lot tighter.
It doesn't handle commit messages, but quick is now implemented.
This has also shown that the previous fall-through behaviour of quick
wasn't a bug but a feature, as it would try to pull, not fail if it
couldn't.
This means it would be a good idea to implement an alternative version
of quick that keeps this old behaviour, or probably more likely,
creating a new command that does what the quick in this commit does, and
then finding a way to recreate the old behaviour of quick.
This is dev branch thou, so I don't have to do that before pushing :D
Signed-off-by: Christina Sørensen <christina@cafkafk.com>