{"thread":{"id":"57448","subject":"pull fails after commit dry-run","startedAt":"2022-02-21T08:35:49Z","lastAt":"2022-02-21T08:35:49Z","messageCount":1,"participants":["Maximilian Reichel"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"448957","messageId":"9FF5E3B7-E3EC-4E71-A701-D43B8B092F7C@icloud.com","threadId":"57448","inReplyTo":null,"subject":"pull fails after commit dry-run","fromName":"Maximilian Reichel","fromEmail":"reichemn@icloud.com","sentAt":"2022-02-21T08:26:52Z","receivedAt":"2022-02-21T08:35:49Z","isPatch":false,"sender":{"key":"reichemn@icloud.com","avatar":null},"body":"Thank 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)\nRunning the following two scripts.\nScript one:\n'#!/bin/bash\n\nmkdir parent\ngit -C parent init\ngit -C parent -c user.name=\"P\" -c user.email=\"m@example.com\" commit -m one --allow-empty \n\nmkdir cloneDir\ncd cloneDir\ngit init\n\ngit pull -v --rebase \"../parent\"\necho git pull exit code: $?'\n\nscript two:\n'#!/bin/bash\n\nmkdir parent\ngit -C parent init\ngit -C parent -c user.name=\"P\" -c user.email=\"m@example.com\" commit -m one --allow-empty \n\nmkdir cloneDir\ncd cloneDir\ngit init\ngit commit -m \"foo\" --dry-run\ngit pull -v --rebase \"../parent\"\necho git pull exit code: $?'\n\nWhat did you expect to happen? (Expected behavior)\nSince they only differ in the 'git commit -m \"foo\" --dry-run' invocation, I would expect the same outcome for both scripts.\nExpected output of the last two lines:\n'From ../parent\n * branch            HEAD       -> FETCH_HEAD\ngit pull exit code: 0'\n\nWhat happened instead? (Actual behavior)\nThe second script is not able to pull from ../parent.\nOutput of the last lines of the second script:\n'fatal: Updating an unborn branch with changes added to the index.\ngit pull exit code: 128’\n\n\nAnything else you want to add:\nI tested this on git 2.35.1, 2.34.1 and 2.21.0 and they are all affected. \n\n\n[System Info]\ngit version:\ngit version 2.35.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64\ncompiler info: gnuc: 10.2\nlibc info: glibc: 2.31\n$SHELL (typically, interactive shell): <unset>\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show"}]}