Commit Graph

5977 Commits

Author SHA1 Message Date
Caleb Owens
707e568368 Merged origin/master into ensure-project-settings-button-goes-to-correct-project 2024-03-28 15:01:59 +00:00
Kiril Videlov
8bb011dd11
Merge pull request #3360 from gitbutlerapp/separate-integration-tests-app 2024-03-28 15:05:20 +01:00
Sebastian Thiel
8784e7cedd
chore(app): fix remaining TODOs and some minor cleanup 2024-03-28 10:51:26 +01:00
Sebastian Thiel
3c7e238ca6
chore(app): don't build doc-tests for lib; lib-tests for binary
There are no doctests and it's unlikely there will be anytime soon
as this library isn't for publishing.

The binary also doesn't have unit-tests, thus there is no need
to look for them.
2024-03-28 09:05:54 +01:00
Sebastian Thiel
eed0fb1fbb
chore: add lib to be able to support integration tests; separate tests 2024-03-28 09:05:54 +01:00
Sebastian Thiel
16a3d446eb
chore(app): assure the crate isn't published.
The crate is only for use by `gitbutler`.
2024-03-28 09:05:54 +01:00
dependabot[bot]
c6a7b940b1 build(deps): bump tauri-plugin-store from ed682dd to c6a5b7a
Bumps [tauri-plugin-store](https://github.com/tauri-apps/plugins-workspace) from `ed682dd` to `c6a5b7a`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](ed682dd96e...c6a5b7ae47)

---
updated-dependencies:
- dependency-name: tauri-plugin-store
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 23:25:15 +01:00
dependabot[bot]
4697f2eb50 build(deps): bump tauri-plugin-context-menu from 0845b15 to d8dcbcb
Bumps [tauri-plugin-context-menu](https://github.com/c2r0b/tauri-plugin-context-menu) from `0845b15` to `d8dcbcb`.
- [Commits](0845b15648...d8dcbcb944)

---
updated-dependencies:
- dependency-name: tauri-plugin-context-menu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 23:24:50 +01:00
dependabot[bot]
be9d32d0e7 build(deps): bump the rust-updates group with 14 updates
Bumps the rust-updates group with 14 updates:

| Package | From | To |
| --- | --- | --- |
| [git2](https://github.com/rust-lang/git2-rs) | `0.18.2` | `0.18.3` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.7.0` | `1.8.0` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.57` | `1.0.58` |
| [toml](https://github.com/toml-rs/toml) | `0.8.11` | `0.8.12` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.80` | `1.0.81` |
| [async-trait](https://github.com/dtolnay/async-trait) | `0.1.77` | `0.1.79` |
| [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.69` | `0.3.71` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.34` | `0.4.37` |
| [regex](https://github.com/rust-lang/regex) | `1.10.3` | `1.10.4` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.112` | `1.0.115` |
| [ssh-key](https://github.com/RustCrypto/SSH) | `0.6.4` | `0.6.5` |
| [tauri](https://github.com/tauri-apps/tauri) | `1.6.0` | `1.6.1` |
| [walkdir](https://github.com/BurntSushi/walkdir) | `2.4.0` | `2.5.0` |
| [nix](https://github.com/nix-rust/nix) | `0.27.1` | `0.28.0` |


Updates `git2` from 0.18.2 to 0.18.3
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.18.2...git2-0.18.3)

Updates `uuid` from 1.7.0 to 1.8.0
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0)

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

Updates `toml` from 0.8.11 to 0.8.12
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.11...toml-v0.8.12)

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

Updates `async-trait` from 0.1.77 to 0.1.79
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.77...0.1.79)

Updates `backtrace` from 0.3.69 to 0.3.71
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.69...0.3.71)

Updates `chrono` from 0.4.34 to 0.4.37
- [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.34...v0.4.37)

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

Updates `serde_json` from 1.0.112 to 1.0.115
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.112...v1.0.115)

Updates `ssh-key` from 0.6.4 to 0.6.5
- [Commits](https://github.com/RustCrypto/SSH/compare/ssh-key/v0.6.4...ssh-key/v0.6.5)

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

Updates `walkdir` from 2.4.0 to 2.5.0
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.4.0...2.5.0)

Updates `nix` from 0.27.1 to 0.28.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.27.1...v0.28.0)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: toml
  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: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: backtrace
  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: regex
  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: ssh-key
  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-patch
  dependency-group: rust-updates
- dependency-name: walkdir
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 23:24:29 +01:00
Mattias Granlund
84c83719a3 Fix TextBox selectall prop
- was tied to a non-existent css class
2024-03-27 22:21:14 +01:00
Mattias Granlund
0db68a77ef Make combining branches more resilient
- should not fail on individual streams
2024-03-27 22:21:14 +01:00
Mattias Granlund
d804c2adea Drop unused function in Overlay.svelte
- not picked up by linters since it was exported
2024-03-27 22:21:14 +01:00
Mattias Granlund
3ab3c9cb1f Fix a couple of typing issues
- errors thrown by an observable are of `any` kind
- make a few fields readonly
2024-03-27 22:21:14 +01:00
Mattias Granlund
c22a29e432 Fix a couple of typos 2024-03-27 22:21:14 +01:00
Mattias Granlund
3252aabf2e Drop some unused code in Branches.svelte 2024-03-27 22:21:14 +01:00
Mattias Granlund
96b4bde634 Move form element to Modal to make it accessible to all modals 2024-03-27 22:13:27 +01:00
Pavel Laptev
55511e4128 "Set branch name" to "Set remote branch name"
the action rename only the remote name and not the displayed. So it make more sense to update the copy.
2024-03-27 22:13:27 +01:00
Eyal Cherevatsky
9d3934d68d refactor: remove redundant type="submit" 2024-03-27 22:13:27 +01:00
Eyal Cherevatsky
b30b138128 feat: allow submitting rename branch form on pressing Enter
In addition, auto-focus the branch name input.
2024-03-27 22:13:27 +01:00
Mattias Granlund
e25f669492 Add some documentation to rxjs/store.ts
- this file will likely be read a few times, worth explaining the reasoning
- make the code a bit more concise
2024-03-27 20:02:20 +01:00
Kiril Videlov
29ce48d6a7
Merge pull request #3357 from gitbutlerapp/update-cargo-lock-dependencies
feat: Update dependencies to the latest versions
2024-03-27 19:44:11 +01:00
Kiril Videlov
d629020953
feat: Update dependencies to the latest versions 2024-03-27 19:28:53 +01:00
Mattias Granlund
2497ec633d Run dependabot for npm every week
- mainly because posthog seems to be making breaking changes quite frequently
2024-03-27 19:23:07 +01:00
dependabot[bot]
4500b490fb build(deps): bump the npm-updates group with 14 updates
Bumps the npm-updates group with 14 updates:

| Package | From | To |
| --- | --- | --- |
| [@tauri-apps/cli](https://github.com/tauri-apps/tauri) | `1.5.10` | `1.5.11` |
| [openai](https://github.com/openai/openai-node) | `4.28.4` | `4.29.2` |
| [@codemirror/lang-xml](https://github.com/codemirror/lang-xml) | `6.0.2` | `6.1.0` |
| [@codemirror/view](https://github.com/codemirror/view) | `6.24.1` | `6.26.0` |
| [@sentry/sveltekit](https://github.com/getsentry/sentry-javascript) | `7.104.0` | `7.108.0` |
| [autoprefixer](https://github.com/postcss/autoprefixer) | `10.4.17` | `10.4.19` |
| [postcss](https://github.com/postcss/postcss) | `8.4.35` | `8.4.38` |
| [posthog-js](https://github.com/PostHog/posthog-js) | `1.110.0` | `1.116.6` |
| [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) | `0.5.11` | `0.5.13` |
| [svelte-check](https://github.com/sveltejs/language-tools) | `3.6.6` | `3.6.8` |
| [svelte-outclick](https://github.com/babakfp/svelte-outclick) | `3.7.0` | `3.7.1` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.4.1` | `3.4.2` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.3.3` | `5.4.3` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `4.5.2` | `4.5.3` |


Updates `@tauri-apps/cli` from 1.5.10 to 1.5.11
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/@tauri-apps/cli-v1.5.10...@tauri-apps/cli-v1.5.11)

Updates `openai` from 4.28.4 to 4.29.2
- [Release notes](https://github.com/openai/openai-node/releases)
- [Changelog](https://github.com/openai/openai-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openai/openai-node/compare/v4.28.4...v4.29.2)

Updates `@codemirror/lang-xml` from 6.0.2 to 6.1.0
- [Changelog](https://github.com/codemirror/lang-xml/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/lang-xml/compare/6.0.2...6.1.0)

Updates `@codemirror/view` from 6.24.1 to 6.26.0
- [Changelog](https://github.com/codemirror/view/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/view/compare/6.24.1...6.26.0)

Updates `@sentry/sveltekit` from 7.104.0 to 7.108.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.104.0...7.108.0)

Updates `autoprefixer` from 10.4.17 to 10.4.19
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.17...10.4.19)

Updates `postcss` from 8.4.35 to 8.4.38
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.35...8.4.38)

Updates `posthog-js` from 1.110.0 to 1.116.6
- [Release notes](https://github.com/PostHog/posthog-js/releases)
- [Changelog](https://github.com/PostHog/posthog-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/PostHog/posthog-js/compare/v1.110.0...v1.116.6)

Updates `prettier-plugin-tailwindcss` from 0.5.11 to 0.5.13
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.11...v0.5.13)

Updates `svelte-check` from 3.6.6 to 3.6.8
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.6.6...svelte-check-3.6.8)

Updates `svelte-outclick` from 3.7.0 to 3.7.1
- [Commits](https://github.com/babakfp/svelte-outclick/commits)

Updates `tailwindcss` from 3.4.1 to 3.4.2
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.2/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.1...v3.4.2)

Updates `typescript` from 5.3.3 to 5.4.3
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.3)

Updates `vite` from 4.5.2 to 4.5.3
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.3/packages/vite)

---
updated-dependencies:
- dependency-name: "@tauri-apps/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-updates
- dependency-name: "@codemirror/lang-xml"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-updates
- dependency-name: "@codemirror/view"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-updates
- dependency-name: "@sentry/sveltekit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-updates
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: posthog-js
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-updates
- dependency-name: prettier-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: svelte-outclick
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-updates
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 19:14:06 +01:00
Kiril Videlov
18c0c3a87e
Merge pull request #3348 from gitbutlerapp/Virtual-branch
dependabot re-enable
2024-03-27 18:53:37 +01:00
Kiril Videlov
b36b746e6a
dependabot re-enable
This makes a no-op change to dependabot.yml to force Dependabot to re-evaluate the config file.
2024-03-27 18:51:47 +01:00
Mattias Granlund
811d94030e Limit max height of project selector popup
- requested by LaylaTichy on discord
2024-03-27 17:17:08 +01:00
Pavel Laptev
4e1c7910e1
accessibility fix: commit card folding behaviour on keyup (#3337)
* fix: commit card folding behaviour on keyup

I was able to fold/unfold it pressing any key. Fixed to `Enter` and `Space` keys only
2024-03-27 11:57:03 +01:00
Caleb Owens
7c6e2c9062 Introduce tests for menu items enabled state 2024-03-27 08:43:48 +00:00
Caleb Owens
9778c96cfd Merged origin/master into ensure-project-settings-button-goes-to-correct-project 2024-03-27 07:39:33 +00:00
Pavel Laptev
d3662e6557
style fix: tag component (#3341) 2024-03-27 01:19:11 +01:00
Caleb Owens
1b7a3cb024 Rename MenuBarManager -> MenuBarController 2024-03-26 23:05:42 +00:00
Caleb Owens
97a4e1a000 Merge master into branch 2024-03-26 22:56:36 +00:00
Caleb Owens
2e1c7eaff0 Fix lifecycle related issues for menubar 2024-03-26 22:52:33 +00:00
Kiril Videlov
2d4095c24e
Merge pull request #3334 from Byron/tests-with-init-defaultbranch
tests work with init.defaultBranch
2024-03-26 21:46:06 +01:00
Caleb Owens
68499035e8 refactor: Allow unsubscribe to take undefined
This commit modifies the unsubscribe method so that it can be awaited to ensure all unsubscribe methods have been called

It also allows undefined to be passed in so potentially blank unsubscriptions can be passed without extra login
2024-03-26 20:31:32 +00:00
Mattias Granlund
f51e2b2530 Nitpicking a few things
- use more intuitive error handling in `observableToStore`
- improve pr loading service
- simplify base branch service observable
- add concrete error class for default target not set
- disclosure in layout.ts about `const project` being only await allowed
2024-03-26 19:59:06 +01:00
Pavel Laptev
189c1d7f0b
UI refactor (#3335)
* Unused CSS removed
* Refactor: simplify Tag component props
2024-03-26 16:47:14 +01:00
Kiril Videlov
aaa7d74bce
Merge pull request #3333 from gitbutlerapp/fix-release-script-for-windows
feat(release): skip building windows if job is release
2024-03-26 14:39:30 +01:00
Sebastian Thiel
e8b98ee80d
fix: tests work in presence of init.defaultBranch=main
The test-suite hardcodes `refs/heads/master`. However, `git`
somewhat selectively picks up configuration that affects
the default branch name, like `GIT_BRANCH_DEFAULT` and
`init.defaultBranch`.

This causes `HEAD` to contain `refs/heads/main`, which typically
isn't created, causing 199 tests to fail.

Now `git2` repository initialization will override the branch name.
The only notable exception to this is a submodule test, which
needs the `HEAD` branch to be set specifically after initialization.
2024-03-26 14:34:08 +01:00
Sebastian Thiel
95467bac8e
fix typo 2024-03-26 14:34:07 +01:00
Kiril Videlov
719a664809
feat(release): skip building windows if job is release
Until we have signing working
2024-03-26 14:23:27 +01:00
Kiril Videlov
51a65bfe72
Merge pull request #3328 from gitbutlerapp/hunk-equality-comparisons
hunk ownership: use line numbers in eq check
2024-03-26 01:54:18 +01:00
Kiril Videlov
93acbb4421
hunk ownership: use line numbers in eq check
Now that line numbers are set correctly, re-introducing the equality check based on line numbers
2024-03-26 01:44:33 +01:00
Kiril Videlov
104574b9bd
Merge pull request #3316 from gitbutlerapp/add-git-hunk-data-to-virtual-branch-diff
fix: when listing vbranches use workspace line num
2024-03-26 01:30:02 +01:00
Kiril Videlov
6832b4916c fix: correct line numbers only for applied branches
The functionality for (re)setting the line number to the global workspace numbers only applies to applied branches
2024-03-26 01:20:11 +01:00
Kiril Videlov
7a839e1b11 compare branch non-committed to workspace non-committed diffs
Intersection with the all diffs is erroneous because of the presence of committed hunks that may overlap with uncommitted ones
2024-03-26 01:20:11 +01:00
Kiril Videlov
d44eaefd9b fix: correct hunk parsing for intersection calc 2024-03-26 01:20:11 +01:00
Kiril Videlov
bfa1ecfb0d fix: when listing vbranches use workspace line num
Previously the line numbers on hunks inside a vbranch were the line numbers the branch would have in isolation. 

This led to a few problems when there were hunks in the same file on multiple branches:
- Line numbers in GB not matching what is seen in the editor
- Issues related to moving hunks around
2024-03-26 01:20:11 +01:00
Josh Junon
c3c478b85e
Merge pull request #3326 from gitbutlerapp/exclusive-linespan-refactor
make LineSpan end-exclusive
2024-03-26 00:18:57 +01:00