{"thread":{"id":"2986","subject":"needs merge","startedAt":"2006-01-07T08:32:36Z","lastAt":"2006-01-07T10:28:47Z","messageCount":4,"participants":["Len Brown","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14229","messageId":"200601070332.36654.len.brown@intel.com","threadId":"2986","inReplyTo":null,"subject":"needs merge","fromName":"Len Brown","fromEmail":"len.brown@intel.com","sentAt":"2006-01-07T08:32:36Z","receivedAt":"2006-01-07T08:32:36Z","isPatch":false,"sender":{"key":"len.brown@intel.com","avatar":"https://gravatar.com/avatar/a091f34f66caadb51d85a8a496800c6ccae73737e2f45762373e6b8c55fa5dd6?d=mp&s=160"},"body":"a merge results in multiple conflict files.\n\nsome of the files are resolved by editing and picking changes from both branches.\n\nbut some files I want to ignore the new changes and keep what was originally there.\nHowever, if I restore what was originally in the destination\neither by editing the destination and ending up with what i started with,\nor via git checkout on the file, i get\n\n$ git commit\nmy-file needs merge\n\nhow do i tell git that there is no merge to do and the (unchanged) working file is what\ni want to keep as the result of the merge?\n\ni recall running into this a long time ago and i added blank line to the destination file\nand that made git happy, but maybe i shouldn't have to resort to that, yes?\n\nthanks,\n-Len\n"},{"id":"14231","messageId":"7v1wzko2f5.fsf@assigned-by-dhcp.cox.net","threadId":"2986","inReplyTo":"200601070332.36654.len.brown@intel.com","subject":"Re: needs merge","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-07T08:41:34Z","receivedAt":"2006-01-07T08:41:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Len Brown <len.brown@intel.com> writes:\n\n> $ git commit\n> my-file needs merge\n>\n> how do i tell git that there is no merge to do and the (unchanged) working file is what\n> i want to keep as the result of the merge?\n\nDo you mean running\n\n    $ git update-index my-file\n\nto mark the path resolved?\n"},{"id":"14233","messageId":"200601070357.13954.len.brown@intel.com","threadId":"2986","inReplyTo":"200601070332.36654.len.brown@intel.com","subject":"Re: needs merge","fromName":"Len Brown","fromEmail":"len.brown@intel.com","sentAt":"2006-01-07T08:57:13Z","receivedAt":"2006-01-07T08:57:13Z","isPatch":false,"sender":{"key":"len.brown@intel.com","avatar":"https://gravatar.com/avatar/a091f34f66caadb51d85a8a496800c6ccae73737e2f45762373e6b8c55fa5dd6?d=mp&s=160"},"body":"> git-update-index my-file\n\nyes, that allowed the git commit to complete, thanks.\n\nhowever, when i then merged that branch into another there seem to\nbe some phantom conflicts on the very same files.\nDo I understand all this output to mean that git attempted two\ndifferent merges, and discarded the 1st attempt in favor of the second?\n\nthanks,\n-Len\n\n$ /lab/bin/git.merge acpica test\nMerging test with ed03f430cdc8c802652467e9097606fedc2c7abc\nMerging:\ne3627f3165301a7d946c2dc40be93f744f441c30 Auto-update from upstream\ned03f430cdc8c802652467e9097606fedc2c7abc Pull pnpacpi into acpica branch\nfound 2 common ancestor(s):\n0aec63e67c69545ca757a73a66f5dcf05fa484bf [PATCH] Fix posix-cpu-timers sched_time accumulation\ned349a8a0a780ed27e2a765f16cee54d9b63bfee [ACPI] fix pnpacpi regression resulting from ACPICA 20051117\n  Merging:\n  0aec63e67c69545ca757a73a66f5dcf05fa484bf [PATCH] Fix posix-cpu-timers sched_time accumulation\n  ed349a8a0a780ed27e2a765f16cee54d9b63bfee [ACPI] fix pnpacpi regression resulting from ACPICA 20051117\n  found 1 common ancestor(s):\n  927fe18397b3b1194a5b26b1d388d97e391e5fd2 Pull 5165 into release branch\n  Auto-merging arch/i386/kernel/mpparse.c\n  Auto-merging include/asm-x86_64/mpspec.h\n  Auto-merging arch/ia64/pci/pci.c\n  Auto-merging drivers/acpi/utilities/utmisc.c\n  CONFLICT (content): Merge conflict in drivers/acpi/utilities/utmisc.c\n  Auto-merging include/acpi/acglobal.h\n  CONFLICT (content): Merge conflict in include/acpi/acglobal.h\n  Auto-merging drivers/acpi/scan.c\n  Auto-merging drivers/acpi/pci_link.c\n\nMerge bfaa3a0777f0fc3b82831cb1daf286f8ac3b4c8d, made by recursive.\n drivers/pnp/pnpacpi/rsparser.c |   48 +++++++++++++++++++++++++++++++++++++---\n 1 files changed, 44 insertions(+), 4 deletions(-)\n$\n"},{"id":"14237","messageId":"7voe2ol4bk.fsf@assigned-by-dhcp.cox.net","threadId":"2986","inReplyTo":"200601070357.13954.len.brown@intel.com","subject":"Re: needs merge","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-07T10:28:47Z","receivedAt":"2006-01-07T10:28:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Len Brown <len.brown@intel.com> writes:\n\n> however, when i then merged that branch into another there seem to\n> be some phantom conflicts on the very same files.\n\nFirst of all, does the final merge result look correct, without\nconflict markers?  I've slurped from your tree and tried the\nmerge myself and it seems that both branches and the merge\nresult of these branches have the conflicting path the same way,\nso I think it did the right thing for you, but I am just trying\nto make sure.\n\n> Do I understand all this output to mean that git attempted two\n> different merges, and discarded the 1st attempt in favor of the second?\n\nNot really.  This is Fredrik's \"recursive\" merge in action.\n\nacpica (ed03f4) is merged into test (e3627f), but these two\nbranches have criss-cross merge history and there are two\nequally valid common ancestors, 0aec63 and ed349a.\n\nWhat it did was first to find a merge between these two common\nancestors, during which it found conflicting merge on those\npaths.\n\nIt then used this merge result (with conflict markers still in\nthem!) as the \"virtual common ancestor\" to merge the ed03f4 and\ne3627f commits; because both branches have resolved the\nconflicting part the same way earlier, this three-way merge\ncancels out the part that are marked with conflict markers in\nthe virtual common ancestor (this is the cutest part of Fredrik\nmerge algorithm).\n"}]}