{"thread":{"id":"13928","subject":"merge weirdness","startedAt":"2008-06-13T04:42:25Z","lastAt":"2008-06-13T05:00:33Z","messageCount":2,"participants":["Len Brown"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"79670","messageId":"alpine.LFD.1.10.0806130028080.8340@localhost.localdomain","threadId":"13928","inReplyTo":null,"subject":"merge weirdness","fromName":"Len Brown","fromEmail":"lenb@kernel.org","sentAt":"2008-06-13T04:42:25Z","receivedAt":"2008-06-13T04:42:25Z","isPatch":false,"sender":{"key":"lenb@kernel.org","avatar":null},"body":"I merged about a dozen small branches earlier this week and sent the batch \nto Linus, who pulled them upstream with \nda50ccc6a0f32ad29c1168837330a78e6e2e2923\n\nI pulled Linus' tree and then went to compare which of my branches had \nmade it upstream, and my topic branches \"git.status\" script (pasted \nbelow) said that none of them had!\n\nLooking at Linus' history, it seems that my merge is gone.  Instead there \nis a series of patches that look like they've been cherry-picked -- same \ncommit but different commit id.\n\nI run the top-of-tree version of git.\nDid something strange happen with git a few days ago in this department?\n\nI still had my merge in command history so I checked out an old branch and \ndid the same merge using today's git (git version 1.5.6.rc2.26.g8c37)\nand gitk shows it as an octopus, as expected.\n\nclues?\n\nthanks,\n-Len\n\n---\n#!/bin/bash\n# report on status of my ia64 GIT tree\ncd ~/src/acpi\n\ngb=$(tput setab 2)\nrb=$(tput setab 1)\nrestore=$(tput setab 9)\n\n#if [ `git-rev-list release ^test | wc -c` -gt 0 ]\nif [ `git rev-list test..release | wc -c` -gt 0 ]\nthen\n\techo $rb Warning: commits in release that are not in test $restore\n\tgit-whatchanged release ^test\nfi\n\n#for branch in `ls .git/refs/heads`\nfor branch in `git show-ref --heads | sed 's|^.*/||'`\ndo\n\tif [ $branch = linus -o $branch = test -o $branch = release ]\n\tthen\n\t\tcontinue\n\tfi\n\n\techo -n $gb ======= $branch ====== $restore \" \"\n\tstatus=\n\tfor ref in test release linus\n\tdo\n\t\tif [ `git-rev-list $branch ^$ref | wc -c` -gt 0 ]\n\t\tthen\n\t\t\tstatus=$status${ref:0:1}\n\t\tfi\n\tdone\n\tcase $status in\n\ttrl)\n\t\techo $rb Need to pull into test $restore\n\t\t;;\n\trl)\n\t\techo \"In test\"\n\t\t;;\n\tl)\n\t\techo \"Waiting for linus\"\n\t\t;;\n\t\"\")\n\t\techo $rb All done $restore\n\t\t;;\n\t*)\n\t\techo $rb \"<$status>\" $restore\n\t\t;;\n\tesac\n#\tgit-whatchanged $branch ^linus | git-shortlog | cat\n\tgit log linus..$branch | git shortlog | cat\ndone\n"},{"id":"79678","messageId":"alpine.LFD.1.10.0806130049420.8340@localhost.localdomain","threadId":"13928","inReplyTo":"alpine.LFD.1.10.0806130028080.8340@localhost.localdomain","subject":"Re: merge weirdness","fromName":"Len Brown","fromEmail":"lenb@kernel.org","sentAt":"2008-06-13T05:00:33Z","receivedAt":"2008-06-13T05:00:33Z","isPatch":false,"sender":{"key":"lenb@kernel.org","avatar":null},"body":"\nOn Fri, 13 Jun 2008, Len Brown wrote:\n\n> I merged about a dozen small branches earlier this week and sent the batch \n> to Linus, who pulled them upstream with \n> da50ccc6a0f32ad29c1168837330a78e6e2e2923\n> \n> I pulled Linus' tree and then went to compare which of my branches had \n> made it upstream, and my topic branches \"git.status\" script (pasted \n> below) said that none of them had!\n> \n> Looking at Linus' history, it seems that my merge is gone.  Instead there \n> is a series of patches that look like they've been cherry-picked -- same \n> commit but different commit id.\n> \n> I run the top-of-tree version of git.\n> Did something strange happen with git a few days ago in this department?\n> \n> I still had my merge in command history so I checked out an old branch and \n> did the same merge using today's git (git version 1.5.6.rc2.26.g8c37)\n> and gitk shows it as an octopus, as expected.\n\nI think I figured out what happened.\n\nI prepared the original history, as shown in the commit-id's\nin this shortlog:\n\nhttp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.26/acpi-release-20080321-2.6.26-rc5.diff.bz2\n\nThen some time passed and Linus pushed a few more things\ninto his tree.\n\nI figured I'd merge with his latest to avoid any last minute merge\nconflicts for him.\n\nBut instead of \"git pull\" to merge linus into release, for some reason I \ndid a \"git rebase linus release\" -- which re-checked in my commits\nand flattened all of my branches into a random sequence of patches.\n\nI'll not do that again...\n\nsorry for the noise.\n\nthanks,\n-Len\n"}]}