Commit graph

99 commits

Author SHA1 Message Date
Christina Sørensen
5cc54e23f5
feat: -m flag (untested)
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-13 08:01:08 +02:00
Christina Sørensen
7c6fa896e7
fix(main,cli): naming was confusing
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-13 07:23:01 +02:00
Christina Sørensen
3217e27d4b
feat(wip): repo and category selecting for subcmd
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>
2023-07-11 19:54:05 +02:00
Christina Sørensen
e3617956fe
doc: cleaned up comments
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-11 16:58:51 +02:00
Christina Sørensen
7a31030aca
fix(git): removed ugly comments
Feels like a code smell to use this ugly and non-idiomatic style.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-11 16:56:23 +02:00
Christina Sørensen
63688b0d6e
feat(jump): done, but not great
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>
2023-07-08 07:53:45 +02:00
Christina Sørensen
ea3f3e6bb2
feat(cli): added jump command
Still not implemented!

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-08 07:03:01 +02:00
Christina Sørensen
8b20c2a490
feat(benches): added benchmarking
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>
2023-07-07 06:38:17 +02:00
Christina Sørensen
1768cd93a8
test(git): fixed doc tests for git.rs
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>
2023-07-07 06:37:09 +02:00
Christina Sørensen
c9b00adb57 chore(version): bump to v0.2.0
** [0.2.0] - 2023-07-07

*** Bug Fixes

- Made categories with only links possible

*** Features

- [**breaking**] Put links in categories

*** Miscellaneous Tasks

- Filled out Cargo.toml
- Added test.yaml to gitignore
- Fixed up code, roadmap for bump

*** Refactor

- Simple code quality changes

*** Testing

- Refactored testing, added tests dir

** [0.1.2] - 2023-07-03

*** Features

- Implemented quiet flag

*** Miscellaneous Tasks

- Bump to v0.1.2

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-07 04:13:59 +00:00
Christina Sørensen
c36000e7a0 chore: fixed up code, roadmap for bump
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-07 04:13:59 +00:00
Christina Sørensen
a4e3527973 fix(git): made categories with only links possible
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-07 04:13:59 +00:00
Christina Sørensen
f1fc08ab2c test: refactored testing, added tests dir
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-07 04:13:59 +00:00
Christina Sørensen
7e6b9312b5 refactor: simple code quality changes
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-07 04:13:59 +00:00
Christina Sørensen
512d696b39 chore(git): added test.yaml to gitignore
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>
2023-07-07 04:13:59 +00:00
Christina Sørensen
db21b92feb chore(cargo): filled out Cargo.toml
Added all fields for [package], those where there was nothing of
interest to add were just added as comments for reference. Some of them
might be used later.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-07 04:13:59 +00:00
Christina Sørensen
d5b845508a feat!: put links in categories
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>
2023-07-07 04:13:59 +00:00
Christina Sørensen
c62a0a720f chore(version): bump to v0.1.2
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 16:22:48 +00:00
Christina Sørensen
f958739863 feat: implemented quiet flag
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>
2023-07-03 16:22:48 +00:00
Christina Sørensen
b2a0caff02 chore(version): bump to v0.1.1
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 16:22:48 +00:00
Christina Sørensen
6d39190f69 feat(no-emoji): added no-emoji flag
Using atomics! In case we need threading in the future.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 16:22:48 +00:00
Christina Sørensen
abddcd98d5 fix: fixed help formatting
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>
2023-07-03 16:22:48 +00:00
Christina Sørensen
6779ccc642 doc(readme): added asciinema demo
Added a very basic demo, barely showing anything. Better than nothing
still, so here it is.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 16:22:48 +00:00
Christina Sørensen
200fe55feb
chore(merge): bump v0.1.0, housekeeping, #8 from cafkafk/dev
- added changelog
- bumped cargo version
- fixed readme
- other minor fixes

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 09:49:49 +00:00
Christina Sørensen
6e7ba4aadf
chore: bump v0.1.0, housekeeping
- added changelog
- bumped cargo version
- fixed readme
- other minor fixes

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 11:44:58 +02:00
Christina Sørensen
c04ca64325
doc: updated roadmap
Planned features for 0.1.1, 0.1.2.

Also changed ordering.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-03 11:38:02 +02:00
Christina Sørensen
1e22d3bf5a
feat(cli): added flag no-emoji
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>
2023-07-03 11:36:20 +02:00
Christina Sørensen
97d8ee52fc
feat(git): made SUCCESS/FAILURE emoji const
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>
2023-07-03 11:34:22 +02:00
Christina Sørensen
0660801014
feat(cli): quiet flag
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>
2023-07-03 11:16:43 +02:00
Christina Sørensen
2872f56aac
feat(cli): implemented CoC flag
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>
2023-07-03 11:04:18 +02:00
Christina Sørensen
414334009a
refactor: made code more idiomatic
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>
2023-07-02 16:42:12 +02:00
Christina Sørensen
6181ea0f75
doc: changed roadmap
Decided to lower scope of required changes, as there is actually already
a mvp here, the amount of excuses for not abiding my semver are
decreasing too fast.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 12:13:49 +02:00
Christina Sørensen
62cde9885e
chore(version): bump to 0.0.7 #7 from cafkafk/dev
- made certain fields optional in config
- added CHANGELOG.md
- started tagging versions

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 10:11:13 +00:00
Christina Sørensen
d5b4a03f94
chore(version): bump to 0.0.7
- made certain fields optional in config
- added CHANGELOG.md
- started tagging versions

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 12:06:20 +02:00
Christina Sørensen
ee8e546b22
feat(git): made repo flags optional
This finalizes the roadmap item of making certain fields optional.

Very nice!

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 11:37:23 +02:00
Christina Sørensen
1c6793f8e4
feat(git): made categories.repo optional
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>
2023-07-02 11:29:16 +02:00
Christina Sørensen
a000d37b72
feat(git): made category flags optional
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 11:23:00 +02:00
Christina Sørensen
ec49c90a0e
feat(git)!: added Quick, Fast flags
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>
2023-07-02 11:06:51 +02:00
Christina Sørensen
e6f597e08b
feat(git): add Commit, Add flags
This also fixes behaviour of all flags.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 10:52:23 +02:00
Christina Sørensen
d2353fe435
doc(git-cliff): added git cliff config
Just done using git cliff init. Does not introduce a dependency for
users.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 10:45:39 +02:00
Christina Sørensen
8476b343ec
chore: merge 0.0.6 #6 from cafkafk/dev
Of major notice is:
- Categories
- Repo flags
- Architectural overhaul
- Increased documentation
- Improved UX

- Changed config.yaml location
- Increased scope of push field
- Remove potentially destructive operation
- Fixed mini-license typos
- Fixed testing with hashmap arch
- Spinner on all repoactions
- Fixed commit in quick
- [**breaking**] Fixed quick, fast messages
- Fixed commit with editor regression

- Architectural Overview
- Moved charts to doc/img
- Update image locations
- Moved ARCHITECTURE.md to doc/
- Added some documentation
- Added roadmap

- Started flakification
- Added nix flake #5
- [**breaking**] Add push field
- [**breaking**] Add repo flags
- [**breaking**] Implemented naive categories
- Started work on using spinners
- Added pull flag
- React to exit code of git
- Started adding multi instruction logic
- Added fast subcommand

- Version bump to v0.0.3
- Moved install scripts to ./bin

- Fixed various clippy errors
- Removed unused code from flake
- Improved GitRepo assoc. function debug
- Removed redundant line in Cargo.toml
- Created on_all for config struct
- Naive nested hashmap
- Generic refactor

- Removed atty dependency

- Removed unused ./test dir

- Mvp flake working

<!-- generated by git-cliff -->

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 08:35:50 +00:00
Christina Sørensen
32f4f0a92a
chore: merge 0.0.6
Of major notice is:
- Categories
- Repo flags
- Architectural overhaul
- Increased documentation
- Improved UX

- Changed config.yaml location
- Increased scope of push field
- Remove potentially destructive operation
- Fixed mini-license typos
- Fixed testing with hashmap arch
- Spinner on all repoactions
- Fixed commit in quick
- [**breaking**] Fixed quick, fast messages
- Fixed commit with editor regression

- Architectural Overview
- Moved charts to doc/img
- Update image locations
- Moved ARCHITECTURE.md to doc/
- Added some documentation
- Added roadmap

- Started flakification
- Added nix flake #5
- [**breaking**] Add push field
- [**breaking**] Add repo flags
- [**breaking**] Implemented naive categories
- Started work on using spinners
- Added pull flag
- React to exit code of git
- Started adding multi instruction logic
- Added fast subcommand

- Version bump to v0.0.3
- Moved install scripts to ./bin

- Fixed various clippy errors
- Removed unused code from flake
- Improved GitRepo assoc. function debug
- Removed redundant line in Cargo.toml
- Created on_all for config struct
- Naive nested hashmap
- Generic refactor

- Removed atty dependency

- Removed unused ./test dir

- Mvp flake working

<!-- generated by git-cliff -->

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 10:32:07 +02:00
Christina Sørensen
6595bd5148
fix: fixed commit with editor regression
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>
2023-07-02 10:20:42 +02:00
Christina Sørensen
25fe576052
fix!: fixed quick, fast messages
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>
2023-07-02 09:52:56 +02:00
Christina Sørensen
df08a1ca2f
fix(main): fixed commit in quick
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>
2023-07-02 09:25:00 +02:00
Christina Sørensen
e29cfa4866
sec: removed atty dependency
Cherry-picked from dev branch.

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>
2023-07-02 07:45:04 +02:00
Christina Sørensen
c6db4d5a3b
sec: removed atty dependency
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>
2023-07-02 07:25:11 +02:00
Christina Sørensen
7417a985c6
doc: added roadmap
Added a tentative roadmap for release 0.1.0 as well as a future planned
roadmap.

This is mostly to help myself not trying to add too many features in
between releases as dev is already far ahead of main.

Ideally, I'd like to iterate more rapidly on main. Given the basic
structure of the config is slowly stabilizing, this will be less painful

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-02 07:18:57 +02:00
Christina Sørensen
be0cbc8849
feat: added fast subcommand
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>
2023-07-01 14:57:41 +02:00
Christina Sørensen
a52cc15f8e
doc: added some documentation
Not very much, just enough to not be literally nothing.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-01 14:45:23 +02:00