Title: remove silent prefix detection in init by skarim · Pull Request #126 · github/gh-stack · GitHub
Open Graph Title: remove silent prefix detection in init by skarim · Pull Request #126 · github/gh-stack
X Title: remove silent prefix detection in init by skarim · Pull Request #126 · github/gh-stack
Description: When explicit branch names containing slashes were passed to gh stack init (e.g. gh stack init myprefix/branch), detectPrefix was silently extracting the prefix and storing it in the stack config. This caused gh stack add otherbranch to unexpectedly produce myprefix/otherbranch without the user ever opting in. The interactive path correctly prompts for confirmation ("Use myprefix/ as a prefix?"), but the args path had no such guard. Changes cmd/init.go: remove the silent detectPrefix block from the args path — explicit branch names are taken literally. Users who want a prefix should use --prefix. cmd/init_test.go: update ArgsCommonPrefix and NestedPrefix tests to expect no prefix detection from explicit args Stack created with GitHub Stacks CLI • Give Feedback 💬
Open Graph Description: When explicit branch names containing slashes were passed to gh stack init (e.g. gh stack init myprefix/branch), detectPrefix was silently extracting the prefix and storing it in the stack config. ...
X Description: When explicit branch names containing slashes were passed to gh stack init (e.g. gh stack init myprefix/branch), detectPrefix was silently extracting the prefix and storing it in the stack config. ...
Opengraph URL: https://github.com/github/gh-stack/pull/126
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d21afd17-1763-7c7a-42d0-2cf8a1e8494b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D266:13BA54:AF9CD92:B300CBA:6A50BDCB |
| html-safe-nonce | 62faf36149eb14ff3689de1bdd203ac572a05a94ad02f33d36c3042a435f210f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjY2OjEzQkE1NDpBRjlDRDkyOkIzMDBDQkE6NkE1MEJEQ0IiLCJ2aXNpdG9yX2lkIjoiNzUzNDMzNDgxNDcyMTE5NTQ2NyIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 2bbdeba856c2d5b72895a720ab9083cac67cc501a63ff75e205e0369a9ecc100 |
| hovercard-subject-tag | pull_request:3864935489 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/github/gh-stack/pull/126/files |
| twitter:image | https://avatars.githubusercontent.com/u/1701557?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1701557?s=400&v=4 |
| og:image:alt | When explicit branch names containing slashes were passed to gh stack init (e.g. gh stack init myprefix/branch), detectPrefix was silently extracting the prefix and storing it in the stack config. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/github/gh-stack git https://github.com/github/gh-stack.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 1151630728 |
| octolytics-dimension-repository_nwo | github/gh-stack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1151630728 |
| octolytics-dimension-repository_network_root_nwo | github/gh-stack |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width