[BUG] log --graph corrupts patch

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

 



I've just been reviewing some patches with 'git log --graph --patch' and
came across what looked like a bug:

| @@ -272,6 +272,9 @@ do
|       --keep-empty)
|               keep_empty=yes
|               ;;
|       --allow-empty-message)
| +     --no-keep-empty)
| +             keep_empty=
| +             ;;
|               allow_empty_message=--allow-empty-message
|               ;;

However when I looked at the file it was fine, "--allow-empty-message)"
was actually below the insertions. 'git log --patch' gives the correct
patch:

@@ -272,6 +272,9 @@ do
        --keep-empty)
                keep_empty=yes
                ;;
+       --no-keep-empty)
+               keep_empty=
+               ;;
        --allow-empty-message)
                allow_empty_message=--allow-empty-message
                ;;

for some reason adding --graph causes the patch to get corrupted. I've
tried all combinations of --[no-]-indent-heuristic and
--diff-algorithm={patience|minimal|histogram|myers} and they all give
the same result. I've no idea what is going on, it happens with 2.16.2
and recent next and master. I've pushed the commit to github so anyone
who is interested can get it with

git fetch https://github.com/phillipwood/git.git log-graph-breaks-patch

Best Wishes

Phillip



[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