git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* pull fails after commit dry-run
@ 2022-02-21  8:26 Maximilian Reichel
  0 siblings, 0 replies; 3+ messages in thread
From: Maximilian Reichel @ 2022-02-21  8:26 UTC (permalink / raw)
  To: git

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
Running the following two scripts.
Script one:
'#!/bin/bash

mkdir parent
git -C parent init
git -C parent -c user.name="P" -c user.email="m@example.com" commit -m one --allow-empty 

mkdir cloneDir
cd cloneDir
git init

git pull -v --rebase "../parent"
echo git pull exit code: $?'

script two:
'#!/bin/bash

mkdir parent
git -C parent init
git -C parent -c user.name="P" -c user.email="m@example.com" commit -m one --allow-empty 

mkdir cloneDir
cd cloneDir
git init
git commit -m "foo" --dry-run
git pull -v --rebase "../parent"
echo git pull exit code: $?'

What did you expect to happen? (Expected behavior)
Since they only differ in the 'git commit -m "foo" --dry-run' invocation, I would expect the same outcome for both scripts.
Expected output of the last two lines:
'From ../parent
 * branch            HEAD       -> FETCH_HEAD
git pull exit code: 0'

What happened instead? (Actual behavior)
The second script is not able to pull from ../parent.
Output of the last lines of the second script:
'fatal: Updating an unborn branch with changes added to the index.
git pull exit code: 128’


Anything else you want to add:
I tested this on git 2.35.1, 2.34.1 and 2.21.0 and they are all affected. 


[System Info]
git version:
git version 2.35.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.31
$SHELL (typically, interactive shell): <unset>


[Enabled Hooks]
not run from a git repository - no hooks to show

^ permalink raw reply	[flat|nested] 3+ messages in thread
* pull fails after commit dry-run
@ 2022-02-22  6:11 Maximilian Reichel
  2022-02-22 23:15 ` Rafael Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Maximilian Reichel @ 2022-02-22  6:11 UTC (permalink / raw)
  To: git

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
Running the following two scripts.


Script one:
'#!/bin/bash

mkdir parent
git -C parent init
git -C parent -c user.name="P" -c user.email="m@example.com" commit -m one --allow-empty 

mkdir cloneDir
cd cloneDir
git init

git pull -v --rebase "../parent"
echo git pull exit code: $?'




script two:
'#!/bin/bash

mkdir parent
git -C parent init
git -C parent -c user.name="P" -c user.email="m@example.com" commit -m one --allow-empty 

mkdir cloneDir
cd cloneDir
git init
git commit -m "foo" --dry-run
git pull -v --rebase "../parent"
echo git pull exit code: $?'



What did you expect to happen? (Expected behavior)
Since they only differ in the 'git commit -m "foo" --dry-run' invocation, I would expect the same outcome for both scripts.
Expected output of the last two lines:
'From ../parent
* branch            HEAD       -> FETCH_HEAD
git pull exit code: 0'

What happened instead? (Actual behavior)
The second script is not able to pull from ../parent.
Output of the last lines of the second script:
'fatal: Updating an unborn branch with changes added to the index.
git pull exit code: 128’


Anything else you want to add:
I tested this on git 2.35.1, 2.34.1 and 2.21.0 and they are all affected. 


[System Info]
git version:
git version 2.35.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.31
$SHELL (typically, interactive shell): <unset>


[Enabled Hooks]
not run from a git repository - no hooks to show

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-23 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21  8:26 pull fails after commit dry-run Maximilian Reichel
  -- strict thread matches above, loose matches on Subject: below --
2022-02-22  6:11 Maximilian Reichel
2022-02-22 23:15 ` Rafael Silva

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).