git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: skottkuk@wp.pl
To: git@vger.kernel.org
Subject: Logical bug during MERGE or REBASE
Date: Fri, 2 Jul 2021 19:25:55 +0300	[thread overview]
Message-ID: <1932019063.20210702192555@wp.pl> (raw)

[-- 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]

             reply	other threads:[~2021-07-02 16:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02 16:25 skottkuk [this message]
2021-07-03  7:57 ` Logical bug during MERGE or REBASE 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1932019063.20210702192555@wp.pl \
    --to=skottkuk@wp.pl \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).