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
  • #3927
Closed
Open
Issue created May 22, 2022 by Marcono1234@Marcono1234

Support deleted files for "Compare two files"

In the Diff or Commit window, the context action "Compare two files" does not work when two files are selected and one of them has been deleted from the repository (status "Missing").

  • If the other, non-deleted file has been added to the Git index (status "Added"), it shows the following dialog:
    Dialog screenshot

  • If the other, non-deleted has not been added to the Git index yet (status "Unknown"), it shows the following error dialog:
    Error dialog screenshot

This is rather unfortunate, because for example when Git is unable to tell that a file has been both renamed and edited, and instead shows two files, one as deleted and one as added, then it would be quite useful to at least manually compare the changes by selecting the files and using "Compare two files".

What steps will reproduce the problem?

  1. Create a new local Git repository
  2. Commit a file test.txt with content test (commit message does not matter)
  3. Rename the file to test-new.txt and change the content to hello
  4. Open the Git Commit dialog
  5. Select both files test.txt and test-new.txt
  6. Right click either of them and select "Compare two files"
    ❌ A warning or error dialog appears

What is the expected output? What do you see instead?

Expected: It is possible to compare a deleted file with another one. Additionally:

  • If one of the files has the status "Missing", and the other doesn't have this status, then it might be useful to show the "Missing" file always on the left pane of TortoiseGitMerge, regardless on which file of the two the "Compare two files" was invoked.
  • The content of the "Missing" file(s) in TortoiseGitMerge should be read-only, or should properly handle the case when the user tries to save changes to that non-existent file (e.g. create the file, or show a save file dialog).

Actual: It is not possible to compare the content of the deleted file.

What version of TortoiseGit and Git are you using? On what operating system?

TortoiseGit 2.13.0.1
git version 2.36.1.windows.1

Microsoft Windows [Version 10.0.19043.1706]

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking