jhugman / uniffi-bindgen-react-native

A uniffi bindings generator for calling Rust from react-native
https://jhugman.github.io/uniffi-bindgen-react-native/
Other
50 stars 5 forks source link

ubrn checkout gives `detached HEAD` warning to stderr #126

Closed jhugman closed 1 month ago

jhugman commented 1 month ago

When running ubrn checkout, even for a default branch of main, a detached HEAD warning is echoed to stderr.

e.g. running

./scripts/run-checkout-tests.sh 2>&1

Observed:

[TEST] checkout with default
Running "git" "clone" "https://github.com/actions/checkout" "/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout" "--depth" "1"
Cloning into '/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout'...
Running cd "/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout" && "git" "fetch" "--depth" "1" "origin" "eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871"
From https://github.com/actions/checkout
 * branch            eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 -> FETCH_HEAD
Running cd "/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout" && "git" "checkout" "eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871"
Note: switching to 'eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at eef6144 Prepare 4.2.1 release (#1925)
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout ~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native
✅ OK
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native
[TEST] checkout with branch
Running "git" "clone" "https://github.com/actions/checkout" "/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout" "--depth" "1"
Cloning into '/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout'...
Running cd "/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout" && "git" "fetch" "--depth" "1" "origin" "0b496e91ec7ae4428c3ed2eeb4c3a40df431f2cc"
From https://github.com/actions/checkout
 * branch            0b496e91ec7ae4428c3ed2eeb4c3a40df431f2cc -> FETCH_HEAD
Running cd "/Users/jhugman/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout" && "git" "checkout" "0b496e91ec7ae4428c3ed2eeb4c3a40df431f2cc"
Note: switching to '0b496e91ec7ae4428c3ed2eeb4c3a40df431f2cc'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 0b496e9 Upgrade checkout to v1.1.0 to better support scripting git. (#56)
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout ~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native
✅ OK
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native

Expected:

[TEST] checkout with default
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout ~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native
✅ OK
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native
[TEST] checkout with branch
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native/rust_modules/checkout ~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native
✅ OK
~/workspaces/react-native-uniffi/work/uniffi-bindgen-react-native

/cc @Johennes