-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityfound in release: 3.0Found to occur in 3.0Found to occur in 3.0has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to Reproduce
- create a simple app called bug with
flutter create bug
- call
git init
to init a git repo,git add .
,git commit -m 'init'
and then connect this repo to any remote - now delete the repo from your machine and clone it as a worktree with the command
git clone --bare my_remote_url
- now you will have a bare repo of your project on your machine, let's pull our
main
branch (it could also bemaster
depending on your git config) by usinggit worktree add main
- so now your code of your main branch exists at
bug.git/main
folder. now everything works just fine and your bundle id is something likecom.example.bug
- now we're assuming some new stuff came to flutter and we want to reinit
android
folder for example. we can just remove theandroid
folderrm -r android
and then callflutter create .
Expected results:
what flutter should do is to get the name from pubspec.yaml
because the name of the folder in this case presents the branch name and not the project name .
Actual results:
although my project name in pubspec.yaml
is still bug
, flutter will take it from the folder name which currently is main
as we're in the main
branch of the worktree (bug.git/main
).
Logs
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale en-TR)
• Flutter version 3.0.0 at /Users/adnanfahed/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (3 days ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
• Android SDK at /Users/adnanfahed/Library/Android/sdk
• Platform android-31, build-tools 33.0.0-rc2
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.67.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.40.0
[✓] Connected device (3 available)
• sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.3.1 21E258 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.64
! Error: Adnan’s iPhone X is not connected. Xcode will continue when Adnan’s iPhone X is connected. (code -13)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityfound in release: 3.0Found to occur in 3.0Found to occur in 3.0has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team