git add intent-to-add then git add patch no longer allows edit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What did you do before the bug happened? (Steps to reproduce your issue)

    rm -rf .git
    cat << EOF > file
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
    EOF
    git init .
    git add --intent-to-add file
    git add --patch file

What did you expect to happen? (Expected behavior)

To be able to edit the single hunk (`e` option)

What happened instead? (Actual behavior)

The `e` option isn't available (and providing it anyway errors with
`Sorry, cannot edit this hunk`)

Anything else you want to add:

Output of version 2.28.0:

    diff --git a/file b/file
    index 0000000..85e73d4
    --- /dev/null
    +++ b/file
    new file mode 100644
    @@ -0,0 +1 @@
    +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
    (1/1) Stage addition [y,n,q,a,d,?]?

Output of version 2.27.0:

    diff --git a/file b/file
    index e69de29..85e73d4 100644
    --- a/file
    +++ b/file
    @@ -0,0 +1 @@
    +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
    (1/1) Stage this hunk [y,n,q,a,d,e,?]?

Bisecting between the two tags reports this commit as the one
introducing the change:

    [feea6946a5b746ff4ebf8ccdf959e303203a6011] diff-files: treat
"i-t-a" files as "not-in-index"

[System Info]
git version:
git version 2.28.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 18 21:21:34
PDT 2020; root:xnu-4570.71.82.5~1/RELEASE_X86_64 x86_64
compiler info: clang: 10.0.0 (clang-1000.10.44.4)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

Regards,

Tom Sullivan

Head Developer
Most Significant Bit Software

e:  tom@xxxxxxxxxxxx
p:  +61 407 890 821



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux