List all files in pub publish (#3440)

* List all files in pub publish

* Repeat host on confirmation line
diff --git a/lib/src/command/lish.dart b/lib/src/command/lish.dart
index 947c886..092fcaf 100644
--- a/lib/src/command/lish.dart
+++ b/lib/src/command/lish.dart
@@ -224,8 +224,10 @@
 
     // Show the package contents so the user can verify they look OK.
     var package = entrypoint.root;
-    log.message('Publishing ${package.name} ${package.version} to $host:\n'
-        '${tree.fromFiles(files, baseDir: entrypoint.root.dir)}');
+    log.message(
+      'Publishing ${package.name} ${package.version} to $host:\n'
+      '${tree.fromFiles(files, baseDir: entrypoint.root.dir, showAllChildren: true)}',
+    );
 
     var packageBytesFuture =
         createTarGz(files, baseDir: entrypoint.root.dir).toBytes();
@@ -294,7 +296,8 @@
         '\nPolicy details are available at https://pub.dev/policy');
 
     final package = entrypoint.root;
-    var message = 'Do you want to publish ${package.name} ${package.version}';
+    var message =
+        'Do you want to publish ${package.name} ${package.version} to $host';
 
     if (warnings.isNotEmpty || hints.isNotEmpty) {
       final warning = formatWarningCount();
diff --git a/test/lish/many_files_test.dart b/test/lish/many_files_test.dart
index 36f4ed7..ebb5a65 100644
--- a/test/lish/many_files_test.dart
+++ b/test/lish/many_files_test.dart
@@ -11,6 +11,7 @@
 import 'package:test/test.dart';
 
 import '../descriptor.dart' as d;
+import '../golden_file.dart';
 import '../test_pub.dart';
 import 'utils.dart';
 
@@ -27,6 +28,36 @@
 const _pathMax = 260 - 1;
 
 void main() {
+  testWithGolden('displays all files', (context) async {
+    await d.validPackage.create();
+    await d.dir(
+      appPath,
+      [
+        d.dir(
+          'lib',
+          List.generate(20, (i) => d.file('file_$i.dart')),
+        ),
+      ],
+    ).create();
+    await servePackages();
+    await d.credentialsFile(globalServer, 'access token').create();
+    var pub = await startPublish(globalServer);
+    pub.stdin.writeln('y');
+    handleUploadForm(globalServer);
+    handleUpload(globalServer);
+
+    globalServer.expect('GET', '/create', (request) {
+      return shelf.Response.ok(jsonEncode({
+        'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+      }));
+    });
+    await pub.shouldExit(exit_codes.SUCCESS);
+    final stdout = await pub.stdout.rest.toList();
+
+    context.expectNextSection(
+        stdout.join('\n').replaceAll(globalServer.port.toString(), r'$PORT'));
+  });
+
   test(
       'archives and uploads a package with more files than can fit on '
       'the command line', () async {
diff --git a/test/testdata/goldens/lish/many_files_test/displays all files.txt b/test/testdata/goldens/lish/many_files_test/displays all files.txt
new file mode 100644
index 0000000..09a01da
--- /dev/null
+++ b/test/testdata/goldens/lish/many_files_test/displays all files.txt
@@ -0,0 +1,36 @@
+# GENERATED BY: test/lish/many_files_test.dart
+
+Publishing test_pkg 1.0.0 to http://localhost:$PORT:
+|-- CHANGELOG.md
+|-- LICENSE
+|-- README.md
+|-- lib
+|   |-- file_0.dart
+|   |-- file_1.dart
+|   |-- file_10.dart
+|   |-- file_11.dart
+|   |-- file_12.dart
+|   |-- file_13.dart
+|   |-- file_14.dart
+|   |-- file_15.dart
+|   |-- file_16.dart
+|   |-- file_17.dart
+|   |-- file_18.dart
+|   |-- file_19.dart
+|   |-- file_2.dart
+|   |-- file_3.dart
+|   |-- file_4.dart
+|   |-- file_5.dart
+|   |-- file_6.dart
+|   |-- file_7.dart
+|   |-- file_8.dart
+|   |-- file_9.dart
+|   '-- test_pkg.dart
+'-- pubspec.yaml
+
+Publishing is forever; packages cannot be unpublished.
+Policy details are available at https://pub.dev/policy
+
+Do you want to publish test_pkg 1.0.0 to http://localhost:$PORT (y/N)?
+Uploading...
+Package test_pkg 1.0.0 uploaded!
\ No newline at end of file