Commit Graph

339 Commits

Author SHA1 Message Date
Kiril Videlov
4000144acb fix: fetch after push 2024-03-21 18:02:48 +01:00
Kiril Videlov
fba9b0a894 performance: diff tree to working dir with index
asdf
2024-03-21 00:01:29 +01:00
Kiril Videlov
7fbdfae1c4
Merge pull request #3250 from gitbutlerapp/add-connect-src-to-openai-api
feat(security): Add OpenAI API endpoint to CSP
2024-03-20 18:32:17 +01:00
Kiril Videlov
1b506bce79
feat(security): Add OpenAI API endpoint to CSP 2024-03-20 18:15:30 +01:00
Josh Junon
7a429dc32c fix fetching with system executable 2024-03-20 18:13:35 +01:00
Josh Junon
ff6baa5032 add gitbutler-git utility binaries to tauri bundle config 2024-03-20 17:52:03 +01:00
Josh Junon
37f7e0ba70 don't log response parameter to git prompt response submissions 2024-03-20 15:26:46 +01:00
Kiril Videlov
f136534982 refactor: use generic as ref 2024-03-20 00:48:36 +01:00
Kiril Videlov
462a9337a4 on delete project remove virtual_branches file 2024-03-20 00:48:36 +01:00
Kiril Videlov
0831fd2619 feat: write vbranch state to a flat file
In addition to the default git storage, persist the state of virtual branches to a toml file in .git
2024-03-20 00:48:36 +01:00
Josh Junon
b555c376ec allow action to be passed to test fetch endpoint 2024-03-19 20:09:43 +01:00
Mattias Granlund
9c0f77eb2f Turn off tauri globals in conf file
- change was unintended
2024-03-19 19:07:02 +01:00
Mattias Granlund
17ec27f508 Make clippy happy be removing wildcard import 2024-03-19 17:56:14 +01:00
Josh Junon
c0378762c0 add fetch support 2024-03-19 17:56:14 +01:00
Josh Junon
df2f81340b integrate gitbutler_git::push() into gitbutler-app and wire up askpass mechanisms 2024-03-19 17:56:14 +01:00
Kiril Videlov
c3076bac48 fix: remove persisting of passphrases for projects
Passphrases will no longer be persisted. When a project is read up, it will persist itself with the passphrase removed as a field
2024-03-19 12:50:34 +01:00
Josh Junon
92db784a29 add local git config get/set tauri commands 2024-03-19 11:01:06 +01:00
Josh Junon
572b589afa remove unused imports 2024-03-19 10:27:12 +01:00
Kiril Videlov
106697e3f6 feat(virtual_branches): remove unnecessary synchronization 2024-03-18 23:22:58 +01:00
Kiril Videlov
8b06269c2a refactor: Removed unnecessary unwrap in setting default target in VirtualBranchesHandle. 2024-03-18 19:31:13 +01:00
Caleb Owens
2774b81381 feat: Skip instrumenting _handle parameter in git_set_global_config and git_get_global_config
This commit skips instrumenting the _handle parameter in the functions git_set_global_config and git_get_global_config for cleaner logs and improved clarity in the code.
2024-03-18 19:20:18 +01:00
Caleb Owens
5cd2368236 Fix JSON formatting 2024-03-18 19:20:18 +01:00
Caleb Owens
a43cdb4060 Set up dependencies for anthropics and open AI in client
I've been able to use the OpenAI library as they support being in the browser if you pass the "dangerouslyAllowBrowser" flag.

Anthropics don't have any interest in supporting browers making API calls and causes sugnificant CORS problems, so I've made use of the Tauri HTTP library, so this commit also sets that up
2024-03-18 19:20:18 +01:00
Mattias Granlund
4522bd76ab Recompute hunk hash when updating ownership file
- was never done, but probably should be
2024-03-18 18:56:24 +01:00
Kiril Videlov
786d63e601 refactor: Remove unnecessary println statement in get_applied_status function. 2024-03-18 18:14:21 +01:00
Mattias Granlund
1fd449bc8f Rename/refactor a few things related to list_virtual_branches
- make `diff_file_to_hunks` take borrowed `FileDiff`
- improve readability of `get_applied_status`
- rename git::diff::Hunk -> git::diff::GitHunk to avoid confusion
- remove bubbling of hunk ownership (we don't use it)
- drop test for bubbling ownership
2024-03-18 17:58:35 +01:00
Josh Junon
2625ccd0d5
Merge pull request #3189 from gitbutlerapp/remove-core
remove core crate in favor of more granule crates
2024-03-18 15:23:20 +01:00
Josh Junon
c73dd6b0fe normalize workspace imports 2024-03-18 15:08:51 +01:00
Josh Junon
52334a2724 remove core crate in favor of more granule crates 2024-03-18 15:06:40 +01:00
Kiril Videlov
d3e3e21a13 refactor: introduces a flat-file state for virtual branches 2024-03-16 21:23:12 +01:00
Scott Chacon
cec15bcdd0 send more context with feedback (OS, browser, index size) 2024-03-15 05:45:34 +01:00
Josh Junon
6ce77c8a06 elide lifetimes 2024-03-14 11:54:13 +01:00
Josh Junon
c5f8571e53 refactor the rest of repository.rs path handling 2024-03-14 11:30:24 +01:00
Josh Junon
5d6491f482
Merge pull request #3142 from gitbutlerapp/robust-alternates-writing
make the alternates path writing more robust
2024-03-14 10:47:58 +01:00
Josh Junon
2a08d87d72 make the alternates path writing more robust 2024-03-14 10:37:52 +01:00
Josh Junon
0f6f8427e7 remove unused import 2024-03-14 10:30:56 +01:00
Josh Junon
8de956400f perform proper path handling and vectorized writes in conflict resolver 2024-03-13 15:33:53 +01:00
GitButler
c9f7ea0494 GitButler Integration Commit
This is an integration commit for the virtual branches that GitButler is tracking.

Due to GitButler managing multiple virtual branches, you cannot switch back and
forth between git branches and virtual branches easily. 

If you switch to another branch, GitButler will need to be reinitialized.
If you commit on this branch, GitButler will throw it away.

Here are the branches that are currently applied:
 - Virtual branch 7 (refs/gitbutler/Virtual-branch-7)
   branch head: 8111cbe7994127d7c50f2ba164d06ae34f1dd302
   - gitbutler-app/src/project_repository/conflicts.rs
   - gitbutler-app/src/virtual_branches/virtual.rs
 - Virtual branch 8 (refs/gitbutler/Virtual-branch-8)
   - gitbutler-app/src/project_repository/conflicts.rs

Your previous branch was: refs/heads/exec-stuff

The sha for that commit was: 2bd1e8748628648e96d925b3bdba7572ce9ae734

For more information about what we're doing here, check out our docs:
https://docs.gitbutler.com/features/virtual-branches/integration-branch
2024-03-13 15:31:04 +01:00
Kiril Videlov
9a3fc86a8e fix test 2024-03-11 22:44:19 +01:00
Kiril Videlov
6aabf37b2c refactor: when fetching hunks by file return a map of DiffFile
Adding stonger types to the result will allow us to more easily propagate information like old/new files paths, size etc
2024-03-11 22:44:19 +01:00
Josh Junon
2e13650a7f
fixup many instances of poor path handling 2024-03-11 19:06:22 +01:00
Josh Junon
940059ef95
Merge pull request #3112 from gitbutlerapp/dont-use-results-in-tests
don't use results in tests
2024-03-11 18:41:15 +01:00
Josh Junon
86a621f2b2
don't use results in tests 2024-03-11 18:28:04 +01:00
Josh Junon
4c6d40da6e
use simpler path representation at call site 2024-03-11 18:23:06 +01:00
Josh Junon
a5e71b6903
fix test alternates test to be more robust 2024-03-11 16:40:02 +01:00
Josh Junon
bc626e4e92
Merge pull request #3108 from gitbutlerapp/fix-windows-gbrepo-path-filtering
fix gbrepo path filtering on windows
2024-03-11 16:25:44 +01:00
Josh Junon
8928920d47
fix gbrepo path filtering on windows 2024-03-11 15:45:00 +01:00
Josh Junon
2fe29e6f42
Merge pull request #3107 from gitbutlerapp/refactor-dedupe-fmt
refactor dedupe logic to be a bit more rusty
2024-03-11 15:44:30 +01:00
Josh Junon
c026dc9898
refactor dedupe logic to be a bit more rusty 2024-03-11 15:30:02 +01:00
Josh Junon
4e2fbd2b08
remove needless vec copy 2024-03-11 14:53:31 +01:00
Kiril Videlov
54507a0ce0 refactor: Add check for empty paths array in mark function. 2024-03-10 21:52:12 +01:00
Kiril Videlov
cb128df06b feat: Add last commit timestamp and author to RemoteBranch struct and use it in CombinedBranch for display purposes. 2024-03-08 22:22:40 +01:00
Nikita Galaiko
c309d96919 remove unapply logic during branch verification 2024-03-07 19:14:32 +01:00
Nikita Galaiko
aeb076630d make sure set_base_branch preserves active status 2024-03-07 19:14:32 +01:00
Nikita Galaiko
a4768de8bb remove gitbutler/integration reference when user switches away from it 2024-03-07 19:14:32 +01:00
Nikita Galaiko
b0e63d7259 re-construct tree from scratch when going back to integration 2024-03-07 19:14:32 +01:00
Nikita Galaiko
e2ff8e7d20 do not allow dirty working directory when going back to default target 2024-03-07 19:14:32 +01:00
Nikita Galaiko
82ae6d454a make go back to integration more predictable 2024-03-07 19:14:32 +01:00
Kiril Videlov
f4843750e1 feat: adds a git_test_fetch command to check if fetch can be performed for a given remote 2024-03-07 19:04:17 +01:00
Kiril Videlov
bbee89c95b refactor(virtual_branches): Remove unused import 2024-03-07 18:56:02 +01:00
Kiril Videlov
6c0d19d716 adds remote name and branch name as parameters to the git_test_push command 2024-03-07 18:42:41 +01:00
Josh Junon
8979e35d9e
fix fs notify on windows 2024-03-07 18:05:24 +01:00
Josh Junon
7ba6bd259a remove unused imports 2024-03-07 15:30:17 +01:00
Kiril Videlov
66fc956a9a feat: test push command 2024-03-06 21:59:41 +01:00
Josh Junon
df3944106f refactor remaining low-hanging-fruit TryFrom implementations 2024-03-06 15:47:08 +01:00
Josh Junon
7905903c5d more refactors of TryFrom 2024-03-06 15:19:51 +01:00
Josh Junon
d72002c7f5 remove several TryFrom cases for initializing type with path 2024-03-06 14:44:08 +01:00
Josh Junon
f8ad417c04 first set of TryFrom impl removals 2024-03-06 14:21:13 +01:00
Kiril Videlov
f2b13e5632 chore: add serde attribute to rename fields to camelCase in VirtualBranches struct 2024-03-06 13:51:04 +01:00
Kiril Videlov
99df783a0a
when locking hunks only consider commits from applied branches 2024-03-05 18:32:59 +01:00
Josh Junon
c4f4b4cc75 move most TryFrom initialization into main instead of initialization on-demand 2024-03-05 17:54:27 +01:00
Josh Junon
8384648228
fix warnings on non-macos systems 2024-03-04 17:00:33 +01:00
Josh Junon
c6e3477a86 set gc.pruneExpire to never when opening repositories 2024-03-04 14:03:11 +01:00
Josh Junon
0f4b195e56 eliminate unused variable 2024-03-04 12:09:11 +01:00
Kiril Videlov
292a9e1128
fixes a bug where committed diffs may show additional context lines 2024-03-03 22:14:55 +01:00
Kiril Videlov
f0062516ea
support the new posthog endpoint 2024-03-03 20:16:29 +01:00
Kiril Videlov
aab694df48
Merge pull request #2946 from gitbutlerapp/Update-unapply-files-function
 feat: adds reset_files command to revert files
2024-03-03 17:56:50 +01:00
Kiril Videlov
f262f0f0cd
chore: fix tests 2024-03-03 17:41:49 +01:00
Kiril Videlov
27bd07600b
chore: add clippy lint exceptions for type_complexity warnings 2024-03-03 17:40:12 +01:00
Kiril Videlov
19e586dbb2 feat(UI): handle list vbranches returning an object 2024-03-03 17:34:02 +01:00
Kiril Videlov
e088ac5b2d
feat(vbranches api): returns a list of any files skipped due to size 2024-03-03 16:27:24 +01:00
Kiril Videlov
33572ea955
perf: ommit files larger than 50mb from being processed 2024-03-02 23:15:06 +01:00
Scott Chacon
d4f89e8588 Merged origin/master into Update unapply files function 2024-03-01 22:15:03 +01:00
Kiril Videlov
a51f56de87
Merge pull request #2970 from gitbutlerapp/dependabot/cargo/rust-updates-c15be7964f
Bump the rust-updates group with 10 updates
2024-03-01 22:03:29 +01:00
Josh Junon
53aeb8a1a4 remove build warnings 2024-03-01 18:40:39 +01:00
dependabot[bot]
2af685d388
Bump the rust-updates group with 10 updates
Bumps the rust-updates group with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.196` | `1.0.197` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.56` | `1.0.57` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.79` | `1.0.80` |
| [bstr](https://github.com/BurntSushi/bstr) | `1.9.0` | `1.9.1` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.33` | `0.4.34` |
| [governor](https://github.com/boinkor-net/governor) | `0.6.0` | `0.6.3` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.113` | `1.0.114` |
| [tauri](https://github.com/tauri-apps/tauri) | `1.5.4` | `1.6.0` |
| [log](https://github.com/rust-lang/log) | `0.4.20` | `0.4.21` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.10.0` | `3.10.1` |


Updates `serde` from 1.0.196 to 1.0.197
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.196...v1.0.197)

Updates `thiserror` from 1.0.56 to 1.0.57
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.56...1.0.57)

Updates `anyhow` from 1.0.79 to 1.0.80
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.79...1.0.80)

Updates `bstr` from 1.9.0 to 1.9.1
- [Commits](https://github.com/BurntSushi/bstr/compare/1.9.0...1.9.1)

Updates `chrono` from 0.4.33 to 0.4.34
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.33...v0.4.34)

Updates `governor` from 0.6.0 to 0.6.3
- [Release notes](https://github.com/boinkor-net/governor/releases)
- [Changelog](https://github.com/boinkor-net/governor/blob/master/release.toml)
- [Commits](https://github.com/boinkor-net/governor/compare/v0.6.0...v0.6.3)

Updates `serde_json` from 1.0.113 to 1.0.114
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.113...v1.0.114)

Updates `tauri` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.5.4...tauri-v1.6.0)

Updates `log` from 0.4.20 to 0.4.21
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.20...0.4.21)

Updates `tempfile` from 3.10.0 to 3.10.1
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: bstr
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: governor
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tauri
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 17:12:15 +00:00
Josh Junon
5c6ce60833 initial round of dead code removal 2024-03-01 17:39:42 +01:00
Josh Junon
2b53662775 fix remaining clippy errors after main.rs refactor 2024-03-01 15:49:33 +01:00
Josh Junon
d9187c8891 switch global config methods to static methods 2024-03-01 15:35:09 +01:00
Scott Chacon
748630b262 some docs and fixups 2024-03-01 15:25:20 +01:00
Josh Junon
502645eaac move from lib+bin to bin, refactor tests into crate 2024-03-01 15:14:30 +01:00
Scott Chacon
77e07e2308 Merged origin/master into Update unapply files function 2024-03-01 13:36:19 +01:00
Josh Junon
04ce762dc8 fix build/clippy warnings and flakey whitespace-sensitive tests 2024-03-01 13:31:49 +01:00
Scott Chacon
740e0477da Merged origin/master into Update unapply files function 2024-03-01 13:11:24 +01:00
Josh Junon
73faf32b29 automatically create gitbutler-ui/build 2024-03-01 13:00:31 +01:00
Josh Junon
94a5eb6be2 Turn normal comment into doc comment 2024-03-01 12:35:41 +01:00
Pavel Laptev
e58356bd14 detect OS
in order to remove/add sidebar padding on the Sidebar
2024-02-29 21:51:39 +02:00
Kiril Videlov
e8c7f53685
adds file logging of UI errors 2024-02-29 19:28:45 +01:00
Josh Junon
44c4365903
create windows gb repo path upon creation 2024-02-29 16:07:52 +01:00
Josh Junon
5c88e3db89
remove gitbutler-git from builds 2024-02-29 15:44:07 +01:00