Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3316
Closed
Open
Issue 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
Time tracking