Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
TortoiseGit
TortoiseGit
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 302
    • Issues 302
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3316

Closed
Open
Created Dec 23, 2018 by Frederik Kaiser@Frederik_Kaiser

Misleading Messagebox after pull with rebase, when branch is behind origin/branch, but origin/branch=remote/origin/master

What steps will reproduce the problem?

  1. Assume you have a repository where origin/branchname is equal to remote/origin/branchname, but branchname (local) branch is behind orinin/branchname (for example because a git fetch was executed before)
  2. Press pull, check "Launch rebase after fetch"
  3. The message IDS_REBASE_BRANCH_UNCHANGED "The remote branch has not changed. Open the rebase dialog anyway?"

What is the expected output? What do you see instead?
In my opinion the message "The remote branch has not changed. Open the rebase dialog anyway?" is a bit misleading, because the fact that the current branch is behind origin/branch is not clearly visible.
In my opinion the message IDS_REBASE_BRANCH_FF "The fetched branch fast-forwards upon the current branch. Merge or open the rebase dialog anyway?" would make more sense.

What version of TortoiseGit and Git are you using? On what operating system?
Latest version on Windows 7

Suggested Solution:
I suggest to check if the headHash is equal to the remoteBranchHast before the IDS_REBASE_BRANCH_UNCHANGED message is displayed:

Open src/TortoiseProc/AppUtils.cpp
L 2663:

Replace

if (remoteBranchHash == oldUpstreamHash
  && !oldUpstreamHash.IsEmpty()
  && CMessageBox::ShowCheck(hWnd, IDS_REBASE_BRANCH_UNCHANGED, IDS_APPNAME, MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2, L"OpenRebaseRemoteBranchUnchanged", IDS_MSGBOX_DONOTSHOWAGAIN) == IDNO)
     return;

by

if (remoteBranchHash == oldUpstreamHash
  && remoteBranchHash == headHash 
  && !oldUpstreamHash.IsEmpty()
  && CMessageBox::ShowCheck(hWnd, IDS_REBASE_BRANCH_UNCHANGED, IDS_APPNAME, MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2, L"OpenRebaseRemoteBranchUnchanged", IDS_MSGBOX_DONOTSHOWAGAIN) == IDNO)
     return;
Edited Dec 24, 2018 by Yue Lin Ho
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking