git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Logical bug during MERGE or REBASE
@ 2021-07-02 16:25 skottkuk
  2021-07-03  7:57 ` Atharva Raykar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: skottkuk @ 2021-07-02 16:25 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

Hello.

I got a strange result in the process of "merge" and/or "rebase".

I'm not a git professional, so maybe this is not a bug, but a feature.
But as for me, it would be logical to consider the construction inside {} as something whole, and not just put all the changes into one heap with notification what all OK, no conflicts.

All the details are inside the git-bugreport-2021-07-02-1737.txt.
I hope this log will be useful. Feel free to write me for extra details.  

Best regards,
Skott

[-- Attachment #2: git-bugreport-2021-07-02-1737.txt --]
[-- Type: text/plain, Size: 1862 bytes --]

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

I did:
$git init
$git add Program.cs
Inside:
{
 Console.Writeline("1");
 Console.Readline();
}
$git commit -m "Init commit"

$git checkout -b dev
Did this changes in Program.cs:
{
 Console.Writeline("1");
 Console.Readline();
 Console.Readline();
 Console.Readline();
}
$git commit -a -m "dev commit"

$git checkout master
Did this changes in Program.cs:
{
 Console.Writeline("1");
 Console.Writeline("2");
 Console.Readline();
 Console.Readline();
}
$git commit -a -m "master commit"

And I get a logical bug inside Program.cs when I want merge or rebase:
1)git merge dev
OR
2)git rebase dev
 
What did you expect to happen? (Expected behavior)
I expected conflict in my Program.cs like:
{
 Console.Writeline("1");
<<<<<<< HEAD
 Console.Writeline("2");
=======
 Console.Readline();
>>>>>>> dev
 Console.Readline();
 Console.Readline();
}

What happened instead? (Actual behavior)
Just sum of 2 commits without any conflicts:
{
 Console.Writeline("1");
 Console.Writeline("2");
 Console.Readline();
 Console.Readline();
 Console.Readline();
 Console.Readline();
}

What's different between what you expected and what actually happened?
Extra lines was added in "silent" mode without any notification.

Anything else you want to add:
Now necessary to revice all lines, even if there are no any conflicts :(

[System Info]
git version:
git version 2.32.0.windows.1
cpu: x86_64
built from commit: 4c204998d0e156d13d81abe1d1963051b1418fc0
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 6.1 7601 
compiler info: gnuc: 10.3
libc info: no libc information available
$SHELL (typically, interactive shell): <unset>


[Enabled Hooks]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-04  6:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 16:25 Logical bug during MERGE or REBASE skottkuk
2021-07-03  7:57 ` Atharva Raykar
2021-07-04  6:12   ` Bagas Sanjaya
2021-07-04  6:30     ` Atharva Raykar
2021-07-03  9:07 ` martin
2021-07-03 11:03 ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).