Peter Ammon
dff454b1c7
Rework git detection for macOS
...
fish by default shows a git-aware prompt. Recall that on macOS, there are
two hazards we must avoid:
1. The command `/usr/bin/git` is installed by default. This command is not
actually git; instead it's a stub which pops open a dialog proposing to
install Xcode command line tools. Not a good experience.
2. Even after installing these tools, the first run of any `git` or other
command may be quite slow, because it's now a stub which invokes `xcrun`
which needs to populate a cache on a fresh boot. Another bad experience.
We previously attempted to fix this by having `xcrun` print out its cache
path and check if there's a file there. This worked because `xcrun` only
lazily created that file. However, this no longer works: `xcrun` now
eagerly creates the file, and only lazily populates it. Thus we think git
is ready, when it is not.
(This can be reproduced by running `xcrun --kill-cache` and then running
the default fish shell prompt - it will be slow).
Change the fix in the following way: using sh, run `/usr/bin/git --version;
touch /tmp/__fish_git_ready` in the background. Then detect the presence of
/tmp/__fish_git_ready as a mark that git is ready.
Fixes #10535
2024-11-09 12:46:06 -08:00
..
2024-01-27 09:28:06 +01:00
2024-07-23 17:04:23 +02:00
2024-09-14 07:21:56 +02:00
2024-01-27 18:47:38 +01:00
2020-09-19 11:47:41 +02:00
2024-10-30 04:58:50 +01:00
2021-08-01 18:59:45 +02:00
2024-02-26 16:17:47 +01:00
2020-06-29 19:41:33 -05:00
2024-10-26 08:22:19 +02:00
2021-04-20 15:29:28 +02:00
2024-01-27 09:28:06 +01:00
2021-03-08 17:47:29 +01:00
2022-08-02 00:42:37 -07:00
2024-01-27 09:28:06 +01:00
2024-04-09 00:07:27 +02:00
2020-09-19 11:47:41 +02:00
2023-03-27 22:57:34 +02:00
2023-03-12 22:07:44 -05:00
2024-08-18 12:22:39 +02:00
2020-03-09 19:46:43 +01:00
2022-06-16 18:43:28 +02:00
2022-02-19 13:48:20 +01:00
2024-11-04 16:35:24 -06:00
2020-03-10 20:56:45 +01:00
2024-02-27 16:25:01 +01:00
2024-10-05 23:32:59 +02:00
2024-02-27 16:25:01 +01:00
2022-02-02 18:19:15 -08:00
2024-04-27 11:45:12 -05:00
2024-02-27 16:25:01 +01:00
2021-11-23 09:49:45 +01:00
2024-01-27 09:28:06 +01:00
2020-08-09 23:53:46 +02:00
2023-02-14 17:09:58 +01:00
2024-05-20 14:04:38 +02:00
2024-05-20 14:04:38 +02:00
2024-02-27 16:25:01 +01:00
2020-08-09 23:53:46 +02:00
2020-04-21 21:11:26 +02:00
2024-02-27 16:25:01 +01:00
2024-01-27 09:28:06 +01:00
2023-03-12 22:07:44 -05:00
2020-08-09 23:53:46 +02:00
2020-03-10 20:56:45 +01:00
2020-04-12 14:01:21 -07:00
2024-02-27 16:25:01 +01:00
2020-03-09 19:46:43 +01:00
2019-05-05 12:09:25 +02:00
2020-03-06 22:23:50 +01:00
2020-03-09 19:46:43 +01:00
2020-03-09 19:46:43 +01:00
2024-09-17 19:11:42 +02:00
2024-10-26 08:21:12 +02:00
2024-01-27 09:28:06 +01:00
2020-04-20 22:39:48 +02:00
2023-03-31 20:07:54 +02:00
2022-10-28 10:01:35 -07:00
2024-04-12 12:00:24 +02:00
2024-04-02 14:35:16 +02:00
2024-01-27 09:28:06 +01:00
2019-02-10 14:44:50 +01:00
2020-08-09 23:53:46 +02:00
2019-02-10 14:44:50 +01:00
2024-10-14 19:01:41 -05:00
2024-01-27 09:28:06 +01:00
2024-02-27 16:25:01 +01:00
2018-04-01 13:42:38 -07:00
2024-01-27 09:28:06 +01:00
2019-05-05 12:09:25 +02:00
2022-02-13 10:45:38 +01:00
2023-08-09 17:28:01 +02:00
2024-04-12 12:00:24 +02:00
2024-05-30 17:03:03 -05:00
2023-01-29 14:44:59 +01:00
2024-01-27 09:28:06 +01:00
2024-04-05 15:26:48 +02:00
2020-08-09 23:53:46 +02:00
2024-02-27 16:25:01 +01:00
2024-01-27 09:28:06 +01:00
2024-07-23 11:47:58 +02:00
2024-01-27 09:28:06 +01:00
2020-08-09 23:53:46 +02:00
2023-11-20 17:16:35 +01:00
2019-05-05 12:09:25 +02:00
2024-05-14 23:14:49 +02:00
2021-06-23 20:51:20 +02:00
2024-01-27 09:28:06 +01:00
2024-02-27 16:25:01 +01:00
2021-03-08 17:47:29 +01:00
2023-08-22 22:17:22 +02:00
2019-01-26 19:20:16 +01:00
2024-01-27 09:28:06 +01:00
2021-11-25 21:25:46 +01:00
2020-03-09 19:46:43 +01:00
2024-01-21 14:18:50 +01:00
2022-04-26 21:11:54 +02:00
2019-10-29 19:07:35 +01:00
2024-10-03 11:29:24 +02:00
2024-01-27 09:28:06 +01:00
2023-04-26 19:38:10 +02:00
2018-04-01 13:42:38 -07:00
2024-02-27 16:25:01 +01:00
2018-04-01 13:42:38 -07:00
2020-03-09 19:46:43 +01:00
2020-12-22 17:10:02 +01:00
2020-12-22 17:10:02 +01:00
2024-01-21 14:18:50 +01:00
2019-10-26 18:11:29 +02:00
2021-03-07 12:51:57 +01:00
2020-12-22 17:10:02 +01:00
2021-02-08 07:31:33 +01:00
2024-01-21 14:18:50 +01:00
2023-01-19 17:13:13 +01:00
2023-01-19 17:13:13 +01:00
2020-12-22 17:10:02 +01:00
2024-10-04 10:23:58 +02:00
2024-01-21 14:18:50 +01:00
2018-04-01 13:42:38 -07:00
2022-01-26 22:02:23 -08:00
2022-01-26 22:02:23 -08:00
2024-01-21 14:18:50 +01:00
2020-01-22 16:33:56 +01:00
2020-01-22 16:33:56 +01:00
2019-05-05 12:09:25 +02:00
2020-11-22 14:39:48 +01:00
2023-09-29 16:47:00 +02:00
2021-04-19 18:58:00 +02:00
2024-07-14 21:05:52 -05:00
2024-08-08 21:20:07 +02:00
2021-12-18 08:57:22 +01:00
2024-10-13 14:53:45 +02:00
2019-05-05 12:09:25 +02:00
2019-02-10 14:44:50 +01:00
2020-04-20 22:39:48 +02:00
2024-01-27 09:28:06 +01:00
2019-12-09 21:07:21 +01:00
2022-08-02 00:30:06 -07:00
2021-12-13 02:42:16 -08:00
2024-02-27 16:25:01 +01:00
2019-02-10 14:44:50 +01:00
2024-04-12 12:00:24 +02:00
2024-06-24 14:30:37 -05:00
2023-03-22 12:24:18 -05:00
2022-06-08 21:23:43 +02:00
2022-04-04 18:26:14 +02:00
2022-12-10 15:29:03 -08:00
2023-06-17 07:46:07 +02:00
2023-07-11 18:01:29 +02:00
2022-08-02 00:42:37 -07:00
2020-08-09 23:53:46 +02:00
2020-09-04 18:43:09 +02:00
2020-03-09 19:46:43 +01:00
2021-08-09 12:43:03 +02:00
2024-02-27 16:25:01 +01:00
2024-11-01 20:09:55 +01:00
2024-06-06 16:47:39 +02:00
2024-10-10 05:18:35 +02:00
2024-04-02 14:35:16 +02:00
2022-03-31 15:16:01 +02:00
2021-06-23 20:51:20 +02:00
2022-10-06 14:27:28 -05:00
2024-10-15 13:09:02 +02:00
2024-10-26 08:25:12 +02:00
2022-01-27 16:21:22 -08:00
2024-04-27 10:39:30 +02:00
2024-02-27 16:25:01 +01:00
2024-11-09 12:46:06 -08:00
2021-05-05 18:53:51 +02:00
2020-04-19 04:24:28 +02:00
2020-03-09 19:46:43 +01:00
2022-04-15 15:58:39 +02:00
2024-04-30 14:00:06 +02:00
2020-03-09 19:46:43 +01:00
2020-03-09 19:46:43 +01:00
2020-08-09 23:53:46 +02:00
2022-07-19 17:05:48 +02:00
2022-01-27 16:21:22 -08:00
2024-02-27 16:25:01 +01:00
2024-04-03 13:09:27 +02:00
2024-04-27 10:54:31 +02:00
2023-01-29 16:54:39 +01:00
2024-11-06 07:24:00 +01:00
2024-10-26 08:21:12 +02:00
2024-10-10 05:18:35 +02:00
2023-10-19 22:36:58 +02:00
2024-11-06 18:48:57 +01:00
2024-04-15 08:31:16 +02:00
2020-09-16 21:02:59 +02:00
2021-12-02 02:22:40 -08:00
2021-04-16 17:40:55 +02:00
2024-05-23 20:50:23 -05:00
2023-02-07 19:23:26 +01:00
2024-02-27 16:25:01 +01:00
2024-10-13 14:53:45 +02:00
2022-04-04 18:26:14 +02:00
2023-10-04 15:57:32 +02:00
2024-02-27 16:25:01 +01:00
2024-10-13 14:53:45 +02:00
2022-04-04 18:26:14 +02:00
2024-02-22 21:21:31 +08:00
2022-01-22 20:06:37 -08:00
2023-12-25 18:46:23 +01:00
2020-11-14 15:57:42 +01:00
2022-04-04 18:26:14 +02:00
2022-04-04 18:26:14 +02:00
2022-04-04 18:26:14 +02:00
2020-03-09 19:46:43 +01:00
2023-06-01 18:20:19 +02:00
2023-12-31 19:39:23 +01:00
2022-01-27 16:21:22 -08:00
2022-04-23 16:35:52 -07:00