{"thread":{"id":"64203","subject":"git merge --no-ff failure","startedAt":"2025-09-25T13:31:50Z","lastAt":"2025-09-28T02:34:36Z","messageCount":6,"participants":["Nikolay Shustov","Johannes Schindelin","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"527325","messageId":"5cbb5c0a-4c51-4d15-816d-6d7d4fdf4fe1@gmail.com","threadId":"64203","inReplyTo":null,"subject":"git merge --no-ff failure","fromName":"Nikolay Shustov","fromEmail":"nikolay.shustov@gmail.com","sentAt":"2025-09-25T13:31:47Z","receivedAt":"2025-09-25T13:31:50Z","isPatch":false,"sender":{"key":"nikolay.shustov@gmail.com","avatar":null},"body":"Hi,\nGit is reporting error while I am trying to run \"git merge --no-ff <my \nbranch>\":\n\nfatal: stash failed.\n\nPlease see attached the bug report, the output for same command with \ntrace2 enabled and output for the same command with trace2 and events \nenabled.\n\nCheers,\n- Nikolay\n\n\n09:05:38.704643 common-init.c:57                  version 2.51.0.windows.1\n09:05:38.704643 common-init.c:58                  start 'C:\\Program Files\\Git\\mingw64\\bin\\git.exe' merge --no-ff base-trunk-1\n09:05:38.715667 repository.c:242                  worktree C:/git/base-trunk\n09:05:38.715667 git.c:477                         cmd_name merge (merge)\n09:05:38.804062 run-command.c:741                 child_start[0] git stash create\n09:05:38.820593 common-init.c:57                  version 2.51.0.windows.1\n09:05:38.820593 common-init.c:58                  start git stash create\n09:05:38.833241 repository.c:242                  worktree C:/git/base-trunk\n09:05:38.833241 git.c:477                         cmd_name stash (merge/stash)\n09:05:39.186518 git.c:750                         exit elapsed:0.373105 code:1\n09:05:39.186518 trace2/tr2_tgt_normal.c:128       atexit elapsed:0.373131 code:1\n09:05:39.193545 run-command.c:997                 child_exit[0] pid:1048 code:1 elapsed:0.389011\n09:05:39.193545 usage.c:72                        error stash failed\nfatal: stash failed\n09:05:39.193545 usage.c:86                        exit elapsed:0.496921 code:128\n09:05:39.193545 trace2/tr2_tgt_normal.c:128       atexit elapsed:0.496929 code:128\n\n\n09:08:32.073386 common-init.c:57                  version 2.51.0.windows.1\n{\"event\":\"version\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.073386Z\",\"file\":\"common-init.c\",\"line\":57,\"evt\":\"4\",\"exe\":\"2.51.0.windows.1\"}\n09:08:32.073386 common-init.c:58                  start 'C:\\Program Files\\Git\\mingw64\\bin\\git.exe' merge --no-ff base-trunk-1\n{\"event\":\"start\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.073386Z\",\"file\":\"common-init.c\",\"line\":58,\"t_abs\":0.008368,\"argv\":[\"C:\\\\Program Files\\\\Git\\\\mingw64\\\\bin\\\\git.exe\",\"merge\",\"--no-ff\",\"base-trunk-1\"]}\n{\"event\":\"data_json\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.085037Z\",\"file\":\"compat/win32/trace2_win32_process_info.c\",\"line\":122,\"repo\":0,\"t_abs\":0.019853,\"t_rel\":0.019853,\"nesting\":1,\"category\":\"process\",\"key\":\"windows/ancestry\",\"value\":[\"bash.exe\",\"bash.exe\"]}\n09:08:32.085037 repository.c:242                  worktree C:/git/base-trunk\n{\"event\":\"def_repo\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.085037Z\",\"file\":\"repository.c\",\"line\":242,\"repo\":1,\"worktree\":\"C:/git/base-trunk\"}\n09:08:32.086060 git.c:477                         cmd_name merge (merge)\n{\"event\":\"cmd_name\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.086060Z\",\"file\":\"git.c\",\"line\":477,\"name\":\"merge\",\"hierarchy\":\"merge\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.087046Z\",\"file\":\"read-cache.c\",\"line\":2370,\"repo\":1,\"nesting\":1,\"category\":\"index\",\"label\":\"do_read_index\",\"msg\":\".git/index\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.096679Z\",\"file\":\"cache-tree.c\",\"line\":643,\"repo\":1,\"nesting\":2,\"category\":\"cache_tree\",\"label\":\"read\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.098731Z\",\"file\":\"cache-tree.c\",\"line\":645,\"repo\":1,\"t_rel\":0.001977,\"nesting\":2,\"category\":\"cache_tree\",\"label\":\"read\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.099987Z\",\"file\":\"read-cache.c\",\"line\":2319,\"repo\":1,\"t_abs\":0.035563,\"t_rel\":0.013557,\"nesting\":2,\"category\":\"index\",\"key\":\"read/version\",\"value\":\"2\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.099987Z\",\"file\":\"read-cache.c\",\"line\":2321,\"repo\":1,\"t_abs\":0.035576,\"t_rel\":0.013570,\"nesting\":2,\"category\":\"index\",\"key\":\"read/cache_nr\",\"value\":\"121152\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.099987Z\",\"file\":\"read-cache.c\",\"line\":2375,\"repo\":1,\"t_rel\":0.013578,\"nesting\":1,\"category\":\"index\",\"label\":\"do_read_index\",\"msg\":\".git/index\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.102019Z\",\"file\":\"preload-index.c\",\"line\":132,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.169800Z\",\"file\":\"preload-index.c\",\"line\":182,\"t_abs\":0.104730,\"t_rel\":0.067146,\"nesting\":2,\"category\":\"index\",\"key\":\"preload/sum_lstat\",\"value\":\"121152\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.169800Z\",\"file\":\"preload-index.c\",\"line\":183,\"t_rel\":0.067171,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.169800Z\",\"file\":\"read-cache.c\",\"line\":1526,\"nesting\":1,\"category\":\"index\",\"label\":\"refresh\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.170888Z\",\"file\":\"read-cache.c\",\"line\":1608,\"t_abs\":0.105975,\"t_rel\":0.001215,\"nesting\":2,\"category\":\"index\",\"key\":\"refresh/sum_lstat\",\"value\":\"0\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.170888Z\",\"file\":\"read-cache.c\",\"line\":1609,\"t_abs\":0.105984,\"t_rel\":0.001224,\"nesting\":2,\"category\":\"index\",\"key\":\"refresh/sum_scan\",\"value\":\"0\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.170888Z\",\"file\":\"read-cache.c\",\"line\":1610,\"t_rel\":0.001228,\"nesting\":1,\"category\":\"index\",\"label\":\"refresh\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.170888Z\",\"file\":\"preload-index.c\",\"line\":132,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.172904Z\",\"file\":\"preload-index.c\",\"line\":182,\"t_abs\":0.108576,\"t_rel\":0.002083,\"nesting\":2,\"category\":\"index\",\"key\":\"preload/sum_lstat\",\"value\":\"0\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.173888Z\",\"file\":\"preload-index.c\",\"line\":183,\"t_rel\":0.002108,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.173888Z\",\"file\":\"read-cache.c\",\"line\":1526,\"nesting\":1,\"category\":\"index\",\"label\":\"refresh\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.174862Z\",\"file\":\"read-cache.c\",\"line\":1608,\"t_abs\":0.109677,\"t_rel\":0.001071,\"nesting\":2,\"category\":\"index\",\"key\":\"refresh/sum_lstat\",\"value\":\"0\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.174862Z\",\"file\":\"read-cache.c\",\"line\":1609,\"t_abs\":0.109685,\"t_rel\":0.001079,\"nesting\":2,\"category\":\"index\",\"key\":\"refresh/sum_scan\",\"value\":\"0\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.174862Z\",\"file\":\"read-cache.c\",\"line\":1610,\"t_rel\":0.001083,\"nesting\":1,\"category\":\"index\",\"label\":\"refresh\"}\n09:08:32.174862 run-command.c:741                 child_start[0] git stash create\n{\"event\":\"child_start\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.174862Z\",\"file\":\"run-command.c\",\"line\":741,\"child_id\":0,\"child_class\":\"?\",\"use_shell\":false,\"argv\":[\"git\",\"stash\",\"create\"]}\n09:08:32.191691 common-init.c:57                  version 2.51.0.windows.1\n{\"event\":\"version\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.191691Z\",\"file\":\"common-init.c\",\"line\":57,\"evt\":\"4\",\"exe\":\"2.51.0.windows.1\"}\n09:08:32.191691 common-init.c:58                  start git stash create\n{\"event\":\"start\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.191691Z\",\"file\":\"common-init.c\",\"line\":58,\"t_abs\":0.009285,\"argv\":[\"git\",\"stash\",\"create\"]}\n{\"event\":\"data_json\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.203536Z\",\"file\":\"compat/win32/trace2_win32_process_info.c\",\"line\":122,\"repo\":0,\"t_abs\":0.020641,\"t_rel\":0.020641,\"nesting\":1,\"category\":\"process\",\"key\":\"windows/ancestry\",\"value\":[\"git.exe\",\"bash.exe\",\"bash.exe\"]}\n09:08:32.204521 repository.c:242                  worktree C:/git/base-trunk\n{\"event\":\"def_repo\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.204521Z\",\"file\":\"repository.c\",\"line\":242,\"repo\":1,\"worktree\":\"C:/git/base-trunk\"}\n09:08:32.204521 git.c:477                         cmd_name stash (merge/stash)\n{\"event\":\"cmd_name\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.204521Z\",\"file\":\"git.c\",\"line\":477,\"name\":\"stash\",\"hierarchy\":\"merge/stash\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.205509Z\",\"file\":\"read-cache.c\",\"line\":2370,\"repo\":1,\"nesting\":1,\"category\":\"index\",\"label\":\"do_read_index\",\"msg\":\".git/index\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.214396Z\",\"file\":\"cache-tree.c\",\"line\":643,\"repo\":1,\"nesting\":2,\"category\":\"cache_tree\",\"label\":\"read\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.216366Z\",\"file\":\"cache-tree.c\",\"line\":645,\"repo\":1,\"t_rel\":0.001983,\"nesting\":2,\"category\":\"cache_tree\",\"label\":\"read\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.217351Z\",\"file\":\"read-cache.c\",\"line\":2319,\"repo\":1,\"t_abs\":0.035022,\"t_rel\":0.012687,\"nesting\":2,\"category\":\"index\",\"key\":\"read/version\",\"value\":\"2\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.217351Z\",\"file\":\"read-cache.c\",\"line\":2321,\"repo\":1,\"t_abs\":0.035033,\"t_rel\":0.012698,\"nesting\":2,\"category\":\"index\",\"key\":\"read/cache_nr\",\"value\":\"121152\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.217351Z\",\"file\":\"read-cache.c\",\"line\":2375,\"repo\":1,\"t_rel\":0.012705,\"nesting\":1,\"category\":\"index\",\"label\":\"do_read_index\",\"msg\":\".git/index\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.218854Z\",\"file\":\"unpack-trees.c\",\"line\":1907,\"repo\":1,\"nesting\":1,\"category\":\"unpack_trees\",\"label\":\"unpack_trees\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.219848Z\",\"file\":\"unpack-trees.c\",\"line\":2011,\"repo\":1,\"nesting\":2,\"category\":\"unpack_trees\",\"label\":\"traverse_trees\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.219848Z\",\"file\":\"unpack-trees.c\",\"line\":2013,\"repo\":1,\"t_rel\":0.000022,\"nesting\":2,\"category\":\"unpack_trees\",\"label\":\"traverse_trees\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.219848Z\",\"file\":\"unpack-trees.c\",\"line\":2110,\"repo\":1,\"t_rel\":0.001352,\"nesting\":1,\"category\":\"unpack_trees\",\"label\":\"unpack_trees\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.457547Z\",\"file\":\"preload-index.c\",\"line\":132,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.514919Z\",\"file\":\"preload-index.c\",\"line\":182,\"t_abs\":0.331630,\"t_rel\":0.057380,\"nesting\":2,\"category\":\"index\",\"key\":\"preload/sum_lstat\",\"value\":\"106067\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.514919Z\",\"file\":\"preload-index.c\",\"line\":183,\"t_rel\":0.057450,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.514919Z\",\"file\":\"preload-index.c\",\"line\":132,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.516956Z\",\"file\":\"preload-index.c\",\"line\":182,\"t_abs\":0.334201,\"t_rel\":0.002185,\"nesting\":2,\"category\":\"index\",\"key\":\"preload/sum_lstat\",\"value\":\"0\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.516956Z\",\"file\":\"preload-index.c\",\"line\":183,\"t_rel\":0.002202,\"nesting\":1,\"category\":\"index\",\"label\":\"preload\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.516956Z\",\"file\":\"read-cache.c\",\"line\":1526,\"nesting\":1,\"category\":\"index\",\"label\":\"refresh\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.518322Z\",\"file\":\"read-cache.c\",\"line\":1608,\"t_abs\":0.335297,\"t_rel\":0.001074,\"nesting\":2,\"category\":\"index\",\"key\":\"refresh/sum_lstat\",\"value\":\"0\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.518322Z\",\"file\":\"read-cache.c\",\"line\":1609,\"t_abs\":0.335307,\"t_rel\":0.001084,\"nesting\":2,\"category\":\"index\",\"key\":\"refresh/sum_scan\",\"value\":\"0\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.518322Z\",\"file\":\"read-cache.c\",\"line\":1610,\"t_rel\":0.001088,\"nesting\":1,\"category\":\"index\",\"label\":\"refresh\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.518322Z\",\"file\":\"read-cache.c\",\"line\":3152,\"repo\":1,\"nesting\":1,\"category\":\"index\",\"label\":\"do_write_index\",\"msg\":\"C:/git/base-trunk/.git/index.lock\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.547551Z\",\"file\":\"cache-tree.c\",\"line\":546,\"repo\":1,\"nesting\":2,\"category\":\"cache_tree\",\"label\":\"write\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.549498Z\",\"file\":\"cache-tree.c\",\"line\":548,\"repo\":1,\"t_rel\":0.002315,\"nesting\":2,\"category\":\"cache_tree\",\"label\":\"write\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.550471Z\",\"file\":\"read-cache.c\",\"line\":3104,\"repo\":1,\"t_abs\":0.367736,\"t_rel\":0.032354,\"nesting\":2,\"category\":\"index\",\"key\":\"write/version\",\"value\":\"2\"}\n{\"event\":\"data\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.550471Z\",\"file\":\"read-cache.c\",\"line\":3106,\"repo\":1,\"t_abs\":0.367747,\"t_rel\":0.032365,\"nesting\":2,\"category\":\"index\",\"key\":\"write/cache_nr\",\"value\":\"121152\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.550471Z\",\"file\":\"read-cache.c\",\"line\":3155,\"repo\":1,\"t_rel\":0.032369,\"nesting\":1,\"category\":\"index\",\"label\":\"do_write_index\",\"msg\":\"C:/git/base-trunk/.git/index.lock\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.552418Z\",\"file\":\"unpack-trees.c\",\"line\":1907,\"repo\":1,\"nesting\":1,\"category\":\"unpack_trees\",\"label\":\"unpack_trees\"}\n{\"event\":\"region_enter\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.553392Z\",\"file\":\"unpack-trees.c\",\"line\":2011,\"repo\":1,\"nesting\":2,\"category\":\"unpack_trees\",\"label\":\"traverse_trees\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.553392Z\",\"file\":\"unpack-trees.c\",\"line\":2013,\"repo\":1,\"t_rel\":0.000011,\"nesting\":2,\"category\":\"unpack_trees\",\"label\":\"traverse_trees\"}\n{\"event\":\"region_leave\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.554365Z\",\"file\":\"unpack-trees.c\",\"line\":2110,\"repo\":1,\"t_rel\":0.001198,\"nesting\":1,\"category\":\"unpack_trees\",\"label\":\"unpack_trees\"}\n{\"event\":\"data_json\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.555339Z\",\"file\":\"compat/win32/trace2_win32_process_info.c\",\"line\":170,\"repo\":1,\"t_abs\":0.372402,\"t_rel\":0.372402,\"nesting\":1,\"category\":\"process\",\"key\":\"windows/memory\",\"value\":{\"PageFaultCount\":30184,\"PeakWorkingSetSize\":84586496,\"PeakPagefileUsage\":130809856}}\n09:08:32.555339 git.c:750                         exit elapsed:0.372412 code:1\n{\"event\":\"exit\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.555339Z\",\"file\":\"git.c\",\"line\":750,\"t_abs\":0.372412,\"code\":1}\n{\"event\":\"data_json\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.555339Z\",\"file\":\"tree-walk.c\",\"line\":186,\"repo\":1,\"t_abs\":0.372424,\"t_rel\":0.372424,\"nesting\":1,\"category\":\"traverse_trees\",\"key\":\"statistics\",\"value\":{\"traverse_trees_count\":2,\"traverse_trees_max_depth\":1}}\n09:08:32.555339 trace2/tr2_tgt_normal.c:128       atexit elapsed:0.372429 code:1\n{\"event\":\"atexit\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60/20250925T130832.188496Z-H64ade170-P000084a4\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.555339Z\",\"file\":\"trace2/tr2_tgt_event.c\",\"line\":207,\"t_abs\":0.372429,\"code\":1}\n09:08:32.562354 run-command.c:997                 child_exit[0] pid:33956 code:1 elapsed:0.387172\n{\"event\":\"child_exit\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.562354Z\",\"file\":\"run-command.c\",\"line\":997,\"child_id\":0,\"pid\":33956,\"code\":1,\"t_rel\":0.387172}\n09:08:32.562354 usage.c:72                        error stash failed\n{\"event\":\"error\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.562354Z\",\"file\":\"usage.c\",\"line\":72,\"msg\":\"stash failed\",\"fmt\":\"stash failed\"}\nfatal: stash failed\n{\"event\":\"data_json\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.562354Z\",\"file\":\"compat/win32/trace2_win32_process_info.c\",\"line\":170,\"repo\":1,\"t_abs\":0.497864,\"t_rel\":0.497864,\"nesting\":1,\"category\":\"process\",\"key\":\"windows/memory\",\"value\":{\"PageFaultCount\":30930,\"PeakWorkingSetSize\":82518016,\"PeakPagefileUsage\":127516672}}\n09:08:32.562354 usage.c:86                        exit elapsed:0.497876 code:128\n{\"event\":\"exit\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.562354Z\",\"file\":\"usage.c\",\"line\":86,\"t_abs\":0.497876,\"code\":128}\n09:08:32.562354 trace2/tr2_tgt_normal.c:128       atexit elapsed:0.497885 code:128\n{\"event\":\"atexit\",\"sid\":\"20250925T130832.069351Z-H64ade170-P00008b60\",\"thread\":\"main\",\"time\":\"2025-09-25T13:08:32.562354Z\",\"file\":\"trace2/tr2_tgt_event.c\",\"line\":207,\"t_abs\":0.497885,\"code\":128}\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\n1. Created repository using git p4 (master, only initial import)\n2. Created branch \"base-trunk-1\"\n3. Cloned this repository to Linux, \"base-trunk-1\" branch only\n4. Updated the file in the working tree, made a commit\n5. Did \"git push\" to push the changes to the base-trunk-1 branch of the repository on Windows\n   Can see it there just fine.\n6. On Windows, while having master checked out, attempted \"git merge --no-ff base-trunk-1\"   \n\nWhat did you expect to happen? (Expected behavior)\n\nMerge succeedes, creating a new commit.\n\nWhat happened instead? (Actual behavior)\n\nOperation failed producing \"fatal: stash failed\" error\n\nWhat's different between what you expected and what actually happened?\n\nWell, the difference is that it doesn't work :-)\n\nAnything else you want to add:\n\n1. I tired this a couple of times, for the same p4 depot, making things from the scratch,\n   always reproducible.\n2. \"git merge base-trunk-1\" succeeds (does actual rebase)\n3. I tried this from another p4 depot, works fine. \n   The p4 depot where it fails is much bigger comparing to the one that is succeeds.\n4. I tried to clone the original repository locally on Windows, modified file on branch there,\n   created commit, merged it the same way to master (all in clone) - everything is fine.   \n\n[System Info]\ngit version:\ngit version 2.51.0.windows.1\ncpu: x86_64\nbuilt from commit: 4d21a77b98af5cf479d8b6f863c2aa94257cd4e1\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: D:/git-sdk-64-build-installers/usr/bin/sh\nfeature: fsmonitor--daemon\nlibcurl: 8.15.0\nOpenSSL: OpenSSL 3.2.4 11 Feb 2025\nzlib: 1.3.1\nSHA-1: SHA1_DC\nSHA-256: SHA256_BLK\ndefault-ref-format: files\ndefault-hash: sha1\nuname: Windows 10.0 26100 \ncompiler info: gnuc: 15.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\n"},{"id":"527328","messageId":"0905d418-7693-485e-8646-a7e4413e6c0b@gmail.com","threadId":"64203","inReplyTo":"5cbb5c0a-4c51-4d15-816d-6d7d4fdf4fe1@gmail.com","subject":"Re: git merge --no-ff failure","fromName":"Nikolay Shustov","fromEmail":"nikolay.shustov@gmail.com","sentAt":"2025-09-25T14:30:45Z","receivedAt":"2025-09-25T14:30:49Z","isPatch":false,"sender":{"key":"nikolay.shustov@gmail.com","avatar":null},"body":"Just wanted to add to the initial bug report: the same scenario works on \nLinux fine (when git p4 repo is hosted on Linux).\n\nOn 9/25/25 09:31, Nikolay Shustov wrote:\n> Hi,\n> Git is reporting error while I am trying to run \"git merge --no-ff <my \n> branch>\":\n>\n> fatal: stash failed.\n>\n> Please see attached the bug report, the output for same command with \n> trace2 enabled and output for the same command with trace2 and events \n> enabled.\n>\n> Cheers,\n> - Nikolay\n"},{"id":"527407","messageId":"1f78a660-3c1b-7aea-5b3e-945ec2b1ad80@gmx.de","threadId":"64203","inReplyTo":"5cbb5c0a-4c51-4d15-816d-6d7d4fdf4fe1@gmail.com","subject":"Re: git merge --no-ff failure","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2025-09-26T09:55:11Z","receivedAt":"2025-09-26T09:55:13Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Nikolay,\n\nOn Thu, 25 Sep 2025, Nikolay Shustov wrote:\n\n> Git is reporting error while I am trying to run \"git merge --no-ff <my \n> branch>\":\n> \n> fatal: stash failed.\n\nThat is indeed a bit terse on Git's side. Can you still reproduce? If so,\ncan you run the `git stash create` command on its own, maybe there is a\nmore helpful error message there?\n\nThanks,\nJohannes\n"},{"id":"527423","messageId":"f3a051ef-328c-4778-9c78-33d52d273479@gmail.com","threadId":"64203","inReplyTo":"1f78a660-3c1b-7aea-5b3e-945ec2b1ad80@gmx.de","subject":"Re: git merge --no-ff failure","fromName":"Nikolay Shustov","fromEmail":"nikolay.shustov@gmail.com","sentAt":"2025-09-26T14:03:30Z","receivedAt":"2025-09-26T14:03:33Z","isPatch":false,"sender":{"key":"nikolay.shustov@gmail.com","avatar":null},"body":"Hi Johannes,\nYes I can reproduce it, stable.\n\nI do not have any file changes to stash, so \"git stash create\" doesn't \nerror out.\nNo merges or anything else in progress, it was just purely the steps I \ndescribed in the initial report.\n\nNow thinking about it, the only quirk I that I did not mention was:\nOur p4 depot, unfortunately, has some files which names end with dot \n(.). E.g. \"/somehing/blah.\"\nNaturally, (a known thing) git p4 on Windows created \"/somehing/blah\" \nfor it and then showed  \"/something/blah.\" removed and \"/somehing/blah\" \nas untracked. I renamed \"/somehing/blah\" to \"/somehing/blah.\" manually \nto calm down its double personality :-)\n(BTW, I think git on Windows could be doing a better job about such files)\n\nBut the other git p4 repo I created from another p4 depot, where merge \n--no-ff works fine, does not have such files.\nThis is the only thing I could think about may be a bit... unusual.\n\nI can try to experiment with that if you think this could be relevant.\n\nThanks,\n- Nikolay\n\nOn 9/26/25 05:55, Johannes Schindelin wrote:\n> Hi Nikolay,\n>\n> On Thu, 25 Sep 2025, Nikolay Shustov wrote:\n>\n>> Git is reporting error while I am trying to run \"git merge --no-ff <my\n>> branch>\":\n>>\n>> fatal: stash failed.\n> That is indeed a bit terse on Git's side. Can you still reproduce? If so,\n> can you run the `git stash create` command on its own, maybe there is a\n> more helpful error message there?\n>\n> Thanks,\n> Johannes\n"},{"id":"527438","messageId":"CAPig+cTOeCWGeNHvnBK8v2UyAV2DRs8QW7DMHGkfRHW3vSTgQA@mail.gmail.com","threadId":"64203","inReplyTo":"f3a051ef-328c-4778-9c78-33d52d273479@gmail.com","subject":"Re: git merge --no-ff failure","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2025-09-26T17:41:05Z","receivedAt":"2025-09-26T17:41:17Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Sep 26, 2025 at 10:03 AM Nikolay Shustov\n<nikolay.shustov@gmail.com> wrote:\n> Now thinking about it, the only quirk I that I did not mention was:\n> Our p4 depot, unfortunately, has some files which names end with dot\n> (.). E.g. \"/somehing/blah.\"\n> Naturally, (a known thing) git p4 on Windows created \"/somehing/blah\"\n> for it and then showed  \"/something/blah.\" removed and \"/somehing/blah\"\n> as untracked. I renamed \"/somehing/blah\" to \"/somehing/blah.\" manually\n> to calm down its double personality :-)\n> (BTW, I think git on Windows could be doing a better job about such files)\n>\n> But the other git p4 repo I created from another p4 depot, where merge\n> --no-ff works fine, does not have such files.\n> This is the only thing I could think about may be a bit... unusual.\n>\n> I can try to experiment with that if you think this could be relevant.\n\nThat's almost certainly the issue. Microsoft documentation[*] does state:\n\n    Do not end a file or directory name with a space or a period.\n    Although the underlying file system may support such names, the\n    Windows shell and user interface does not.\n\nAnd, indeed, functions such as open(), fopen(), etc. which Git calls\nreturn an error on Windows when presented with a filename which ends\nin a period.\n\n[*]: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n"},{"id":"527503","messageId":"e6ad07ab-2c0b-43eb-8c1e-b69d97458e74@gmail.com","threadId":"64203","inReplyTo":"CAEcERAxiuSAvpPCzsWSpoNQRmbgF0B92augTVgSqNN1jb7mJYA@mail.gmail.com","subject":"Re: git merge --no-ff failure","fromName":"Nikolay Shustov","fromEmail":"nikolay.shustov@gmail.com","sentAt":"2025-09-28T02:34:34Z","receivedAt":"2025-09-28T02:34:36Z","isPatch":false,"sender":{"key":"nikolay.shustov@gmail.com","avatar":null},"body":"Sigh. I added file with dot in the end to the p4 repository that on \nwhich git behaving well before, and now, with the same scenario, git \nfails the same way.\nSo, I have to agree that you are right and it is, indeed, the root of \nproblem.\n\nBTW, Windows does have API for working with the such files.\nCygwin, for example, uses it, and has no problems with filenames like that.\n\nThanks and Cheers,\n- Nikolay\n\nOn 9/27/25 07:55, Nikolay Shustov wrote:\n> Thank you, I will experiment with that. But why would these files be \n> involved into merge operation? They are not the ones that changed, git \n> does not see them as something that would be merged. For all that, it \n> does not appear that git would have to be concerned with them in this \n> case?\n>\n> On Fri, Sep 26, 2025 at 1:41 PM Eric Sunshine \n> <sunshine@sunshineco.com> wrote:\n>\n>     On Fri, Sep 26, 2025 at 10:03 AM Nikolay Shustov\n>     <nikolay.shustov@gmail.com> wrote:\n>     > Now thinking about it, the only quirk I that I did not mention was:\n>     > Our p4 depot, unfortunately, has some files which names end with dot\n>     > (.). E.g. \"/somehing/blah.\"\n>     > Naturally, (a known thing) git p4 on Windows created\n>     \"/somehing/blah\"\n>     > for it and then showed  \"/something/blah.\" removed and\n>     \"/somehing/blah\"\n>     > as untracked. I renamed \"/somehing/blah\" to \"/somehing/blah.\"\n>     manually\n>     > to calm down its double personality :-)\n>     > (BTW, I think git on Windows could be doing a better job about\n>     such files)\n>     >\n>     > But the other git p4 repo I created from another p4 depot, where\n>     merge\n>     > --no-ff works fine, does not have such files.\n>     > This is the only thing I could think about may be a bit... unusual.\n>     >\n>     > I can try to experiment with that if you think this could be\n>     relevant.\n>\n>     That's almost certainly the issue. Microsoft documentation[*] does\n>     state:\n>\n>         Do not end a file or directory name with a space or a period.\n>         Although the underlying file system may support such names, the\n>         Windows shell and user interface does not.\n>\n>     And, indeed, functions such as open(), fopen(), etc. which Git calls\n>     return an error on Windows when presented with a filename which ends\n>     in a period.\n>\n>     [*]:\n>     https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n>\n"}]}