Nikita Galaiko
92e28f7588
move tempfile to dev-dependencies
2023-10-12 10:44:49 +02:00
Nikita Galaiko
bf65ec2d98
handle remote is set but not pushed
2023-10-12 08:16:43 +02:00
Nikita Galaiko
a5d898182a
Merge pull request #1342 from gitbutlerapp/force-pushing
2023-10-11 16:01:07 +02:00
extrawurst
5e186b580c
add and fix clippy::restrictions lints ( #1341 )
...
left a few as TODO which make sense but pose too much refactoring right now
2023-10-11 15:14:54 +02:00
Nikita Galaiko
ce3bd1521c
use force push when needed
2023-10-11 15:09:04 +02:00
Nikita Galaiko
f7916c7907
add requires_force calculation for vbranch
2023-10-11 14:33:01 +02:00
Nikita Galaiko
be86302d6b
merged upstream (head only)
2023-10-11 14:14:44 +02:00
Nikita Galaiko
e6c5ddfbb4
Merge pull request #1340 from gitbutlerapp/Add-empty-bare-repository-function
...
use a real (though local) remote repository for tests
2023-10-11 14:14:32 +02:00
Nikita Galaiko
36e3a120d6
add missing import
2023-10-11 14:08:59 +02:00
Nikita Galaiko
7bf0252269
add init_bare to repository
2023-10-11 14:02:18 +02:00
Nikita Galaiko
5209ee05a2
fixup
2023-10-11 13:57:48 +02:00
Nikita Galaiko
e3d43eb874
use a real (though local) remote repository for tests
2023-10-11 13:56:46 +02:00
extrawurst
856f9b73c1
Merge pull request #1337 from gitbutlerapp/go-full-on-clippy
...
enable more clippy lints and allow a few that would make our life muc…
2023-10-11 13:27:19 +02:00
Nikita Galaiko
73fa6e9c90
correctly return git fetch errors
2023-10-11 12:47:52 +02:00
Nikita Galaiko
0e1be9d25f
correctly return git push errors
2023-10-11 12:47:52 +02:00
Nikita Galaiko
4c62849906
revert check for conflicts before commit creation
2023-10-11 12:05:48 +02:00
extrawurst
2ecf57e75a
enable more clippy lints and allow a few that would make our life much harder, allow also some that need more careful review (number casts)
2023-10-11 11:29:41 +02:00
extrawurst
91303d9bf4
Merge pull request #1330 from gitbutlerapp/deny-unsafe-code
...
make sure clippy does not allow us to use unsafe
2023-10-11 10:38:43 +02:00
Nikita Galaiko
058b8bc70e
Merge pull request #1333 from gitbutlerapp/Refactor-init-device-oauth
...
fix: handle errors properly in init_device_oauth and check_auth_statu…
2023-10-11 10:38:14 +02:00
Kiril Videlov
b968c2cedd
fix incorrect csp list
2023-10-11 10:37:07 +02:00
extrawurst
b480902bf5
remove all unsafe usage and forbid it moving forward
2023-10-11 10:34:49 +02:00
Nikita Galaiko
2b47ed10bb
Merge branch 'master' into Refactor-init-device-oauth
2023-10-11 10:32:39 +02:00
Nikita Galaiko
7a145d2450
should be possible to commit during conflict
2023-10-11 10:26:16 +02:00
extrawurst
f69029247e
fix conflicts
2023-10-11 10:18:28 +02:00
extrawurst
bd10d3bb98
Merge pull request #1334 from gitbutlerapp/fix-some-warnings
...
refactor: remove unused imports
2023-10-11 10:05:22 +02:00
Nikita Galaiko
2d85b25005
Merge pull request #1329 from gitbutlerapp/Reset-branch-to-specific-commit
...
Reset branch to specific commit
2023-10-11 10:04:32 +02:00
Nikita Galaiko
1b12bfb3f3
cargo fmt
2023-10-11 10:04:07 +02:00
extrawurst
d8fc07f81f
refactor: remove unused imports
2023-10-11 09:57:24 +02:00
extrawurst
fff7ae7fd2
Merge pull request #1331 from gitbutlerapp/more-clippy-lints
...
more clippy lints and the according fixes
2023-10-11 09:55:43 +02:00
Nikita Galaiko
a08c6d7ce7
Merge pull request #1297 from gitbutlerapp/dependabot/cargo/reqwest-0.11.22
...
chore(deps): bump reqwest from 0.11.20 to 0.11.22
2023-10-11 09:55:25 +02:00
Nikita Galaiko
41473864b5
Merge pull request #1305 from gitbutlerapp/dependabot/cargo/sha1-0.10.6
...
chore(deps): bump sha1 from 0.10.5 to 0.10.6
2023-10-11 09:54:46 +02:00
Nikita Galaiko
09526fdde6
fix: handle errors properly in init_device_oauth and check_auth_status functions
...
- Previously, the functions `init_device_oauth` and `check_auth_status` did not properly handle errors when sending requests and parsing response bodies.
- This commit updates the error handling in both functions to provide more informative error messages and properly propagate errors.
- Now, if there is an error sending the request or parsing the response body, the functions will return an `Error::Unknown` error with the appropriate context.
- This improves the reliability and error reporting of the login functionality in the client application.
2023-10-11 09:52:49 +02:00
extrawurst
af6c6c17bb
merged upstream
2023-10-11 09:52:43 +02:00
extrawurst
2e9f26e3cd
merged upstream
2023-10-11 09:52:36 +02:00
extrawurst
fecafc834b
Merge pull request #1328 from gitbutlerapp/GB-609-gitbutlerjson
...
GB-609: create/update `.git/gitbutler.json`
2023-10-11 09:51:03 +02:00
Nikita Galaiko
116953fbf1
merged upstream
2023-10-11 08:38:46 +02:00
Kiril Videlov
79f473e807
🔨 chore: move github
module to correct location in module list
2023-10-10 19:18:44 +02:00
Kiril Videlov
698fb012e8
support for github device oauth flow
2023-10-10 19:18:44 +02:00
extrawurst
2acf7f36ea
more clippy lints and the according fixes
2023-10-10 17:39:13 +02:00
extrawurst
5fa412b857
make sure clippy does not allow us to use unsafe
2023-10-10 17:14:36 +02:00
extrawurst
251f78e1bf
remove unused method
2023-10-10 17:11:05 +02:00
extrawurst
6632a1b70b
feat: add test for gitbutler file creation and content verification
2023-10-10 16:36:07 +02:00
Nikita Galaiko
738d1bfceb
add a test button
2023-10-10 14:52:16 +02:00
Nikita Galaiko
1857e991aa
expose reset virtual branch command
2023-10-10 14:20:49 +02:00
Nikita Galaiko
8ebd529d55
feat: add support for tracking upstream head commit in virtual branches
...
The changes in this commit add support for tracking the upstream head commit in virtual branches. This is done by introducing a new field `upstream_head` in the `Branch` struct. The `upstream_head` field represents the last commit that has been pushed to the upstream branch.
The following changes were made:
- Added `upstream_head` field to the `Branch` struct
- Updated the `create_virtual_branch` function to initialize the `upstream_head` field as `None`
- Updated the `push` function to set the `upstream_head` field to the current head commit of the virtual branch
- Updated the `create_virtual_branch_from_branch` function to initialize the `upstream_head` field as `None`
- Updated the `BranchWriter` struct to write the `upstream_head` field to the branch metadata
- Updated the `TryFrom<&dyn crate::reader::Reader>` implementation
2023-10-10 14:13:21 +02:00
Nikita Galaiko
1721e9046f
feat: reset virtual branch
2023-10-10 14:10:24 +02:00
extrawurst
571e61e2e0
GB-609: create/update .git/gitbutler.json
...
this happens when a new session is created
2023-10-10 13:34:03 +02:00
extrawurst
d3b356c3a9
cleanup clippy warning
2023-10-10 12:42:15 +02:00
Nikita Galaiko
00543d15ee
introduce dataDir to git file change handler
2023-10-10 12:24:14 +02:00
extrawurst
ffda438143
Merge pull request #1316 from gitbutlerapp/Add-gb-flush-command
...
GB-610: flush session if GB_FLUSH file triggers watcher
2023-10-10 12:21:09 +02:00