Re: [PATCH] ide: Fix bug caused by git merge

From: Steven Rostedt
Date: Wed Jun 01 2011 - 20:01:10 EST

On Wed, 2011-06-01 at 15:01 -0700, Junio C Hamano wrote:

> With --conflict=diff3, it becomes crystal clear that g->events assignment
> needs to be removed for even somebody who does not know the history of
> this part of the kernel at all (like me).

OK, I like this. This has been one of my biggest complaints about
conflicts in git over the old .rej files that patch produced. In fact, I
find myself using a script from Peter Zijlstra that creates .rej files
from git conflicts, and puts back the old file before the commit was

The default git commit shows you change1 and change2. It does not show
you what it was before either change. With a conflict giving a .rej
file, you see what is there now, what it was that you were trying to
commit, as well as what that commit expected to be there but wasn't. The
default git conflict lacks that last part. I have to remember this
option as it shows what I was missing from patch.


-- Steve

> diff --cc drivers/ide/ide-cd.c
> index 6e5123b,a5ec5a7..0000000
> --- a/drivers/ide/ide-cd.c
> +++ b/drivers/ide/ide-cd.c
> @@@ -1781,8 -1781,7 +1781,15 @@@ static int ide_cd_probe(ide_drive_t *dr
> ide_cd_read_toc(drive, &sense);
> g->fops = &idecd_ops;
> ++<<<<<<< ours
> + g->events = DISK_EVENT_MEDIA_CHANGE;
> ++||||||| base
> + g->flags |= GENHD_FL_REMOVABLE;
> ++ g->events = DISK_EVENT_MEDIA_CHANGE;
> ++=======
> ++ g->flags |= GENHD_FL_REMOVABLE;
> ++>>>>>>> theirs
> add_disk(g);
> return 0;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at