Skip to content

Flutter needs git>=2.36 since 2025-04-09 #175265

@Meax5qiu

Description

@Meax5qiu

Steps to reproduce

I am on Linux Mint 21.2

$ git --version
git version 2.34.1
$ git clone https://github.com/flutter/flutter.git
$ flutter/bin/flutter doctor -v
error: unknown option `format'
usage: git ls-tree [<options>] <tree-ish> [<path>...]

    -d                    only show trees
    -r                    recurse into subtrees
    -t                    show trees when recursing
    -z                    terminate entries with NUL byte
    -l, --long            include object size
    --name-only           list only filenames
    --name-status         list only filenames
    --full-name           use full path names
    --full-tree           list entire tree; not just current directory (implies --full-name)
    --abbrev[=<n>]        use <n> digits to display object names

Downloading Linux x64 Dart SDK from Flutter engine e69de29bb2d1d6434b8b29ae775ad8c2e48c5391...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   255  100   255    0     0   1157      0 --:--:-- --:--:-- --:--:--  1159
[/_PATH_/flutter/bin/cache/dart-sdk-linux-x64.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /_PATH_flutter/bin/cache/dart-sdk-linux-x64.zip or
        /_PATH_/flutter/bin/cache/dart-sdk-linux-x64.zip.zip, and cannot find /_PATH_/flutter/bin/cache/dart-sdk-linux-x64.zip.ZIP, period.

It appears that the downloaded file is corrupt; please try again.
If this problem persists, please report the problem at:
  https://github.com/flutter/flutter/issues/new?template=01_activation.yml

Actual results

Commit d2de6c6 introduced a call to git ls-tree --format ... into bin/internal/content_aware_hash.sh.

However, the --format option for git ls-tree has only been added in version 2.36 in April, 2022.

This required version of git is too recent to be available in Debian Bullseye, Ubuntu Jammy LTS, or systems of a similar age. This contradicts with the official documentation.

Ugly workaround: Downgrade the repo to 1f4f037 and skip any recent development.

Logs

Logs
<!-- Paste your logs here -->

Flutter Doctor output

Doctor output
$ flutter/bin/flutter doctor -v
error: unknown option `format'
usage: git ls-tree [<options>] <tree-ish> [<path>...]

    -d                    only show trees
    -r                    recurse into subtrees
    -t                    show trees when recursing
    -z                    terminate entries with NUL byte
    -l, --long            include object size
    --name-only           list only filenames
    --name-status         list only filenames
    --full-name           use full path names
    --full-tree           list entire tree; not just current directory (implies --full-name)
    --abbrev[=<n>]        use <n> digits to display object names

Downloading Linux x64 Dart SDK from Flutter engine e69de29bb2d1d6434b8b29ae775ad8c2e48c5391...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   255  100   255    0     0   1157      0 --:--:-- --:--:-- --:--:--  1159
[/_PATH_/flutter/bin/cache/dart-sdk-linux-x64.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /_PATH_flutter/bin/cache/dart-sdk-linux-x64.zip or
        /_PATH_/flutter/bin/cache/dart-sdk-linux-x64.zip.zip, and cannot find /_PATH_/flutter/bin/cache/dart-sdk-linux-x64.zip.ZIP, period.

It appears that the downloaded file is corrupt; please try again.
If this problem persists, please report the problem at:
  https://github.com/flutter/flutter/issues/new?template=01_activation.yml

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions