Commit Graph

211 Commits

Author SHA1 Message Date
Sebastian Thiel
bb880cf8a6
specifically remove log files with old name
This also assures that previously spilled secrets will be removed.
2024-07-09 11:10:21 +02:00
Sebastian Thiel
5f192d0e77
consistent extension for .log files should help in reading them.
This might particularly be true on Windows.
Note that we don't call them `txt` to make opening them with
a specialized program easier.
2024-07-09 11:03:31 +02:00
Sebastian Thiel
b1b04adf56
assure not too many log files are retained.
Previously, despite `max_log_files()` configured, it would still
retain more than that, and effectively never delete any as that
would only happen on log-rotation.

Now we do it ourselves just once.
2024-07-09 10:53:16 +02:00
Kiril Videlov
de200c8e20
move reference module from core to its own crate 2024-07-09 01:14:28 +02:00
Kiril Videlov
8043f0dd4e
remove unused keys module 2024-07-09 00:26:27 +02:00
Kiril Videlov
acee9ba5ab
move branch related modules to separate crate
Unfortunatelly diff and branch types form a cyclical dependency via the "HunkLock" type. This will have to be refactored as a followup
2024-07-09 00:10:55 +02:00
Kiril Videlov
0c9c781bd5
Renaming crate gitbutler-branch to gitbutler-virtual
This is more descriptive to what logic lives inside. Further, this allows for splitting up the just branch bits in a separate crate (which is currently in gitbutler-core)
2024-07-08 20:56:00 +02:00
Kiril Videlov
41ec6da226
move askpass module to repository where it is being used 2024-07-08 19:45:35 +02:00
Kiril Videlov
83a1d4a1e5
extract user as its own crate out of core 2024-07-08 18:58:29 +02:00
Kiril Videlov
f042854b1c
combine the assets proxying implementaiton in one file
Now it's only used in one place
2024-07-08 18:23:51 +02:00
Kiril Videlov
e93896621f
move project module in a separate gitbutler-project crate 2024-07-08 15:33:26 +02:00
Kiril Videlov
f7094fcdff
move config module to a separate gitbutler-config crate 2024-07-08 14:49:45 +02:00
Kiril Videlov
a049711472
separate sending zipped logs functionality into gitbutler-feedback crate 2024-07-08 13:52:22 +02:00
Kiril Videlov
e258710502
move ProjectRepo into its own crate
This type currently acts more or less like a command context that lives for the duration of the request. Regardless of if we wanna keep this pattern or not, separating it out helps us split up core
2024-07-08 13:23:03 +02:00
Kiril Videlov
306ab0bea9
move legacy credentail helper to gitbutler-repo crate
it's mostly used from there
2024-07-08 13:01:38 +02:00
Kiril Videlov
7ac2d3a619
move repository ext trait to gitbutler-repo crate 2024-07-08 12:21:01 +02:00
Kiril Videlov
a83a9a8ffc
remove useless stateful remotes controller
The same stuff can be achievecd without hoarding state
2024-07-08 10:58:16 +02:00
Kiril Videlov
f9f8addb72
move repo related commands out of the project controller 2024-07-08 10:47:37 +02:00
Kiril Videlov
7c7143a570
create new module in tauri for repo related functions
moving out of project
2024-07-08 10:36:06 +02:00
Kiril Videlov
f92df0cde7
move RepoActions to gitbutler-repo crate 2024-07-08 00:45:04 +02:00
Kiril Videlov
018e550560
move remote_branches function from RepoActions to RepositoryExt 2024-07-07 23:33:58 +02:00
Kiril Videlov
66e8e8b91b
remove useless indirection when getting repo head 2024-07-07 23:24:45 +02:00
Kiril Videlov
c62c43ed6c
remove useless indirection when getting index size 2024-07-07 23:22:58 +02:00
Kiril Videlov
6dcbb8bddb
move conflicts module to branches crate 2024-07-07 22:58:48 +02:00
Kiril Videlov
ca2ffaac68
separate complex actions on Project repo in a separate trait 2024-07-07 22:28:27 +02:00
Kiril Videlov
143b3252a7
rename Repository type to ProjectRepo
Less misleading this way..
2024-07-07 22:09:45 +02:00
Kiril Videlov
a7aa9b0e10
move remote module to the branch crate 2024-07-07 20:48:12 +02:00
Kiril Videlov
3d0455f12b
move virtual branch files impl our of core 2024-07-07 20:35:26 +02:00
Kiril Videlov
c36f67f148
move oplog to its own crate
This protects us from cyclic dependencies. Unfortunatelly as part of this, i had to introduce the imp Project as trait implementations since now Project is foreign
2024-07-07 20:00:01 +02:00
Kiril Videlov
9eaab28a48
move base branch implementation to branches crate 2024-07-07 16:29:24 +02:00
Kiril Videlov
948c89e8be
move virtual outside of core 2024-07-07 15:51:07 +02:00
Kiril Videlov
7d078de52f
start moving virtual_branches to separate crate
We want to move towards having each functional domain in a separate crate. 
The main benefit of that for our project is that this will enforce a unidirectional dependency graph (i.e. no cycles).
Starting off with virutal_branches - a lot of the implementation is still in core (i.e. virtual.rs), that will be moved in a separate PR. 

Furthermore, the virtual branches controller (as well as virtual.rs) contain functions not directly related to branches (e.g. commit reordering etc). That will be furthe separate in a crate.
2024-07-07 13:32:35 +02:00
Kiril Videlov
819b327973
virtual branches controller - remove state dependency to credentials controller 2024-07-06 17:03:46 +02:00
Kiril Videlov
c777431363 remove the gitbutler generated key flow 2024-07-05 15:56:24 +02:00
Kiril Videlov
82dd580c27
move the updating of "last fetch timestamp" logic
Removing the updating of project from the virtual branch controller - this is the only dependency between the two controllers and likely indicates that the "last fetched at" should live somewhere else.
It will serve us well to not mutate the project state from the virtual branches domain
2024-07-04 16:34:53 +02:00
Kiril Videlov
fe7f1167bf
virtua branches controller - rm deps on project controller 2024-07-04 15:26:10 +02:00
Kiril Videlov
3dded08458
simplify virtual branches controller deps graph
users controller is not a real dependency
2024-07-04 13:28:17 +02:00
Kiril Videlov
88da873128
Merge pull request #4184 from gitbutlerapp/bundle-as-RPM
make RPM bundles
2024-07-02 15:54:42 +02:00
Caleb Owens
ac4f3b926c
Merge remote-tracking branch 'origin/master' into ndom91/create-gitbutler-ui-package 2024-07-02 15:31:00 +02:00
Kiril Videlov
23503afd25
merge stuff 2024-07-02 15:05:56 +02:00
Sebastian Thiel
b8da62c68b
assure SecretServices functions
- inject secretService so it works when used directly
- remove console logs
- only remove a migrated secret (instead of removing it unconditionally)
- in +template, await for good measure, which explains why the parent function is async

In the backend:
- prevent concurrency in method that stores secrets from the frontend
  as it's racy otherwise to type a secret quickly.
2024-07-02 13:17:45 +02:00
Caleb Owens
44e56ac370
Use turbo for production builds 2024-07-02 13:15:26 +02:00
Nico Domino
4fab3ec200
Merge branch 'master' into ndom91/create-gitbutler-ui-package 2024-07-02 10:04:46 +02:00
Sebastian Thiel
05506f49fa
migrate AI tokens from the git-configuration to the keystore.
All AI related options are stored in the user-level git configuration
file. Upon first access, they will be removed from there and placed
into the keystore as part of the migration.

The UI is provided with functions to store and save secrets which it
will use specifically to interact with these keys.

It's explicitly out of scope to *not* show the keys in plain-text
anymore after entering them.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
de00e4f049
support global secrets (without namespace for build types) and provide commands in tauri crate
That way globals secrets can be used from the UI directly.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
b08a9e8cb1
Prevent MacOS popups each startup on MacOS
MacOS is the only known platform that exhibits this behaviour - if an app
is recompiled, the hash of the binary is used to identify it towards the keychain.
As this changes each time, the keychain will ask for permission, which is fair.

However, it's also an impediment which leads to the implementation of
a keystore that uses git credentials as backend. For this to work,
the latest version of `gitoxide` is required for now.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
fbfeba0637
auto-delete a user if its access token can't be found 2024-07-02 10:02:46 +02:00
Sebastian Thiel
ee5ff95649
Assure Sensitive fields can't be serialized
This does not only mean that they cannot be written to disk, but also
that extra work has to be done to serialize them over the wire.

This is very much by design, as they can be in structs that are
seemingly serializable and contain sensitive data, but they must
never actually be serialized.

For use in the UI, an extra type must be used that marks the secret
differently, for instance by field name.
2024-07-02 10:02:45 +02:00
Sebastian Thiel
bc8f3b74c7
tauri specializes the secret-store depending on application type
That way, there is no overlap in the technically global store, just
like before when secrets were stored in plain text.
2024-07-02 10:02:45 +02:00
Kiril Videlov
4db2698cda
bump tauri minor version
this allows us to bundle RPM packages!
2024-07-02 10:48:47 +03:00