git/list[1] front-page[2] threads[3] people[4] search[5] about
 

auto merge bug

From
David Krmpotic <david.krmpotic@gmail.com>
Date
Mar 4, 2013, 16:46 UTC
Message-ID
<CAOFaZ+5F1BcWNU=AkcnS53bQt1VfAfsFjp9EvRCL=7kYiU1ejg@mail.gmail.com>
Hi!

We started working on a .NET app and the XML project file (.csproj) got corrupted (a few closing tag missing).

79 <Compile Include="SlovaricaForm.Designer.cs"> 80 <DependentUpon>SlovaricaForm.cs</DependentUpon> 81 + <Compile Include="WebCamForm.cs"> 82 + <SubType>Form</SubType> 83 + </Compile> 84 + <Compile Include="WebCamForm.Designer.cs"> 85 + <DependentUpon>WebCamForm.cs</DependentUpon> 86 </Compile>

between lines 80 and 81 there should be </Compile>
similarly:

121 </EmbeddedResource> 122 <EmbeddedResource Include="SlovaricaForm.resx"> 123 <DependentUpon>SlovaricaForm.cs</DependentUpon> 124 + <EmbeddedResource Include="WebCamForm.resx"> 125 + <DependentUpon>WebCamForm.cs</DependentUpon> 126 </EmbeddedResource> 127 <EmbeddedResource Include="WordsSelectForm.resx"> 128 <DependentUpon>WordsSelectForm.cs</DependentUpon>

between 123 and 124 there is  </EmbeddedResource> missing.
The problematic commit is here:
https://github.com/davidhq/logo_x/commit/e3e5fa4b60b7939999b2a8c44330312755b72f93
it has two parents: ae2a364 and bd1a059

on both parents the project compiles in Visual Studio because Logo.csproj is not corrupted.

How to reproduce and see that really there were no conflicts and the file became corrupted:

C:\temp> git clone git@github.com:davidhq/logo_x.git
C:\temp\logo_x [master]> git checkout ae2a364
Note: checking out 'ae2a364'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name
HEAD is now at ae2a364... general handler for letters
C:\temp\logo_x [(ae2a364...)]> git merge bd1a059
Auto-merging Logo/Logo.csproj
Merge made by the 'recursive' strategy.
 Logo/Logo.csproj            |   7 ++
 Logo/WebCamForm.Designer.cs |  88 +++++++++++++++++++
 Logo/WebCamForm.cs          | 209 ++++++++++++++++++++++++++++++++++++++++++++
 Logo/WebCamForm.resx        | 120 +++++++++++++++++++++++++
 Logo/WordsForm.Designer.cs  |   1 +
 Logo/WordsForm.cs           |   7 ++
 6 files changed, 432 insertions(+)
 create mode 100644 Logo/WebCamForm.Designer.cs
 create mode 100644 Logo/WebCamForm.cs
 create mode 100644 Logo/WebCamForm.resx
Now check Logo.csproj and observe line 81 (it should read </Compile>
If I add both missing closing tags the project compiles again.
Please investigate and thank you!
PS: on Windows I have version 1.8.0.msysgit.0 of git and on Mac I'm
not sure now, it's a bit older, but the same problem happens.
David
Next: Jeff King
Message 1 of 9 in “auto merge bug”
  1. David KrmpoticMar 4, 2013
  2. Jeff KingMar 5, 2013
  3. Jeff KingMar 5, 2013
  4. Junio C HamanoMar 5, 2013
  5. Jeff KingMar 5, 2013
  6. Junio C HamanoMar 5, 2013
  7. Andreas EricssonMar 5, 2013
  8. David KrmpoticMar 5, 2013
  9. Jeff KingMar 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.