Menu

#29 diffuse cannot access history of a git submodule

v1.0 (example)
open
nobody
git (1)
5
2020-02-14
2019-02-19
ansa211
No

A git submodule is a subdirectory of a local git repository that is itself a git repository.
The parent repository knows that this particular subdirectory is a separate repository with a separate history; the parent repository does not track the content of the submodule, but its history contains information about which revision is checked out in the submodule (and this information may be updated as needed).

When running diffuse inside a git submodule, it cannot access git history, so commands like the following do not work as expected:
diffuse -m
diffuse path/to/a/single/file
diffuse -r HEAD~1 -r HEAD path/to/file

I guess that the issue with git submodules is that inside the submodule, there is no .git directory, only a .git file that contains a line like the following:

gitdir: ../.git/modules/pyvallex

The real .git directory for the submodule can be found at the specified path.

Discussion

  • ansa211

    ansa211 - 2019-07-31

    This issue is related to issue #1 diffuse don't honnor GIT_DIR in that git rev-parse --git-dir --is-inside-git-dir --is-inside-work-tree could be helpful here as well.

     
  • ansa211

    ansa211 - 2019-07-31

    This issue actually seems to be solved in diffuse installed from source (I was using version 0.4.8-3 that came with my fresh kubuntu distribution, and there it is not fixed).

    I described the steps to install from source in https://sourceforge.net/p/diffuse/feature-requests/54/

     
  • Michael Harvey

    Michael Harvey - 2020-02-14

    diffuse -m still does not work. I have a patch that enables it to recurse git submodules with the -m option

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.