Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating a tag checkout is broken #118

Closed
Johennes opened this issue Oct 9, 2024 · 1 comment · Fixed by #120
Closed

Updating a tag checkout is broken #118

Johennes opened this issue Oct 9, 2024 · 1 comment · Fixed by #120

Comments

@Johennes
Copy link
Collaborator

Johennes commented Oct 9, 2024

I fear I've broken tag checkouts with #115.

Running "git" "clone" "https://github.com/matrix-org/matrix-rust-sdk" "/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk" "--depth" "1"
Cloning into '/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk'...
Running cd "/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk" && "git" "fetch" "--depth" "1" "origin" "matrix-sdk-ffi/20241008"
From https://github.com/matrix-org/matrix-rust-sdk
 * tag               matrix-sdk-ffi/20241008 -> FETCH_HEAD
Running cd "/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk" && "git" "checkout" "matrix-sdk-ffi/20241008"
error: pathspec 'matrix-sdk-ffi/20241008' did not match any file(s) known to git
Error: Failed to run command

I think the problem is that for a tag you need to do git fetch --depth 1 origin tag matrix-sdk-ffi/20241008 (not the extra tag not present in the log above). We'll probably have to add something to check if the value supplied in branch is a tag or not and then run the command accordingly.

@Johennes Johennes changed the title Updating a tag checkout Updating a tag checkout is broken Oct 9, 2024
@Johennes
Copy link
Collaborator Author

Johennes commented Oct 9, 2024

(As a workaround, one can supply the SHA behind the tag as argument to branch instead.)

Johennes added a commit to Johennes/uniffi-bindgen-react-native that referenced this issue Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant