threads / discuss / 13928

merge weirdness

Subject: merge weirdness

## tl;dr

2 messages between Jun 13, 2008 and Jun 13, 2008.

replies: 1people: 1as markdown or json

Len Brown· Jun 13, 2008, 04:42 UTC · lore

I merged about a dozen small branches earlier this week and sent the batch to Linus, who pulled them upstream with da50ccc6a0f32ad29c1168837330a78e6e2e2923

I pulled Linus' tree and then went to compare which of my branches had made it upstream, and my topic branches "git.status" script (pasted below) said that none of them had!

Looking at Linus' history, it seems that my merge is gone. Instead there is a series of patches that look like they've been cherry-picked -- same commit but different commit id.

I run the top-of-tree version of git. Did something strange happen with git a few days ago in this department?

I still had my merge in command history so I checked out an old branch and did the same merge using today's git (git version 1.5.6.rc2.26.g8c37) and gitk shows it as an octopus, as expected.

clues?

thanks, -Len

--- #!/bin/bash # report on status of my ia64 GIT tree cd ~/src/acpi

gb=$(tput setab 2) rb=$(tput setab 1) restore=$(tput setab 9)

#if [ `git-rev-list release ^test | wc -c` -gt 0 ]
if [ `git rev-list test..release | wc -c` -gt 0 ]
then
	echo $rb Warning: commits in release that are not in test $restore
	git-whatchanged release ^test
fi
#for branch in `ls .git/refs/heads`
for branch in `git show-ref --heads | sed 's|^.*/||'`
do
	if [ $branch = linus -o $branch = test -o $branch = release ]
	then
		continue
	fi
	echo -n $gb ======= $branch ====== $restore " "
	status=
	for ref in test release linus
	do
		if [ `git-rev-list $branch ^$ref | wc -c` -gt 0 ]
		then
			status=$status${ref:0:1}
		fi
	done
	case $status in
	trl)
		echo $rb Need to pull into test $restore
		;;
	rl)
		echo "In test"
		;;
	l)
		echo "Waiting for linus"
		;;
	"")
		echo $rb All done $restore
		;;
	*)
		echo $rb "<$status>" $restore
		;;
	esac
#	git-whatchanged $branch ^linus | git-shortlog | cat
	git log linus..$branch | git shortlog | cat
done
Len Brown· Jun 13, 2008, 05:00 UTC · re: Len Brown · lore

Re: merge weirdness

On Fri, 13 Jun 2008, Len Brown wrote:
Show 18 quoted lines
> I merged about a dozen small branches earlier this week and sent the batch 
> to Linus, who pulled them upstream with 
> da50ccc6a0f32ad29c1168837330a78e6e2e2923
> 
> I pulled Linus' tree and then went to compare which of my branches had 
> made it upstream, and my topic branches "git.status" script (pasted 
> below) said that none of them had!
> 
> Looking at Linus' history, it seems that my merge is gone.  Instead there 
> is a series of patches that look like they've been cherry-picked -- same 
> commit but different commit id.
> 
> I run the top-of-tree version of git.
> Did something strange happen with git a few days ago in this department?
> 
> I still had my merge in command history so I checked out an old branch and 
> did the same merge using today's git (git version 1.5.6.rc2.26.g8c37)
> and gitk shows it as an octopus, as expected.
I think I figured out what happened.

I prepared the original history, as shown in the commit-id's in this shortlog:

http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.26/acpi-release-20080321-2.6.26-rc5.diff.bz2

Then some time passed and Linus pushed a few more things into his tree.

I figured I'd merge with his latest to avoid any last minute merge conflicts for him.

But instead of "git pull" to merge linus into release, for some reason I did a "git rebase linus release" -- which re-checked in my commits and flattened all of my branches into a random sequence of patches.

I'll not do that again...
sorry for the noise.

thanks, -Len

← back to recent threads