Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,916

    Default

    Thanks for that information. I've set up a similar environment, but I am seeing slightly different behavior. git difftool -d always launches at the top of the repository, even if I execute the command line within a subfolder and only that subfolder contains differences. So, I see a Folder Compare view with only the subfolder (which still needs to be expanded) and the different file within. git difftool -d branchname similarly diffs the entire current branch to named branch. In what location are you browsing on the command line and what is the exact command line you are executing?
    Aaron P Scooter Software

  2. #12
    Join Date
    May 2015
    Posts
    21

    Default

    Hi Aaron,

    let's say my git repository is at folder 'foo', and there is a subfolder 'foo/mak'
    My command is 'git difftool -d'.
    If I execute it in 'foo' folder, everything works fine. If I execute it in 'foo/mak' subfolder, my beyond compare launches at the top of the repository, but only the right side shows subfolders with differences that can be expanded. The left side is empty.

  3. #13
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,916

    Default

    Hello,

    If you run git --version does it report at 2.10.1? The Git website has this version if you build from code, but Ubuntu's apt-get install's latest seems to be 2.7.4. My tests have so far been with 2.7.4; I'm working on making from source, but I'm running into missing dependencies since my VM is mostly a fresh install otherwise.
    Aaron P Scooter Software

  4. #14
    Join Date
    May 2015
    Posts
    21

    Default

    Hi,
    yes, i'm using git version 2.10.1. Mi Ubuntu upgraded to this version last week.

  5. #15
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,916

    Default

    Hello,

    I've built from source from git-scm.com. git --version returns
    "git version 2.10.0.GIT"

    git difftool -d always launches at the top level, even if the command line is in a subfolder/, so I always start at the top and both sides fully populate.

    What does your .gitconfig look like? I'd like to verify we have similar setups. If you make any changes to git or the .gitconfig, please reboot to make sure nothing is cached and using old settings or versions. For example, after building, I had to reboot to properly update Git to 2.10.0
    Aaron P Scooter Software

  6. #16
    Join Date
    May 2015
    Posts
    21

    Default

    $ cat .gitconfig
    [user]
    name = xxxxx
    email = xxxxxx@xxxxx.com
    [color]
    ui = true
    [merge]
    tool = bc3
    [diff]
    tool = bc3
    [push]
    default = matching
    [alias]
    hist = log --pretty=format:"%h %ad | %s%d [%an]" --graph \n--date=short
    [difftool "bc3"]
    trustExitCode = true

  7. #17
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,916

    Default

    I've copied your .gitconfig, but still see the same behavior where "subfolder" is still a clickable folder and not the new base folder. Could you post a screenshot of the interface and terminal window, so I can try to configure something closer to what you have? You can also email us at support@scootersoftware.com with the screenshots and a link back to this forum post for our reference.

    If you set up a new test repository on your Desktop\, and commit a few files and a subfolder\ with files, do you see the same behavior as the current repository you are using?
    Aaron P Scooter Software

  8. #18
    Join Date
    May 2015
    Posts
    21

    Default

    Not sure if this is what you are asking for.
    Attached are three images.
    First one, git_diff_subfolder.png shows my current working repository with 'git status' and the results of running 'git difftool -d' from a subfolder.

    Second one, git_diff_folder.png shows the results of running 'git difftool -d' from the root folder in the same working repository.

    Last one, git_diff_new_subfolder.png, is a completely new repository. It has three files, test1.txt in the root 'foo' folder, test2.txt in a 'foo_subdir2' folder and test3.txt in a 'foo_subdir3' folder. As you can see, test2.txt and test3.txt are both modified. If I run git difftool -d from 'foo_subdir2', only foo_subdir2 correctly expands.

    i'm not sure whether this is a git or bc4 issue.

    This is the result of running 'git diff' from 'foo_subdir2':

    ~/foo/foo_subdir2$ git diff
    diff --git a/foo_subdir/test2.txt b/foo_subdir/test2.txt
    index ef6794f..3e48f75 100644
    --- a/foo_subdir/test2.txt
    +++ b/foo_subdir/test2.txt
    @@ -1 +1 @@
    -Second test
    +2. Second test
    diff --git a/foo_subdir2/test3.txt b/foo_subdir2/test3.txt
    index 16df5ea..d7e9789 100644
    --- a/foo_subdir2/test3.txt
    +++ b/foo_subdir2/test3.txt
    @@ -1 +1 @@
    -Third
    +3.- Third






  9. #19
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,916

    Default

    Ah hah! Got it.

    Ok, this shows what I expected and am seeing. Note the Base Folder paths are "left" and "right", even thought you executed at the lower level. From your earlier description, I thought you were implying that "left/subfolder" and "right/subfolder" was also the text up here and that was the difference in behavior we were seeing that lead to one side being blank.

    Now that I see you have multiple subfolders with differences, then you navigate into a specific subfolder and activate a diff on just it, it appears git only passes back that substructure, even though it always starts at the top. One side is only the relative structure from where you executed the diff (so it is missing some items, by request since you launched the diff only on sub-items), while the other side is the current local file system, so it is still showing all current files/entries. I didn't catch this since my simple repo only had one subfolder with multiple items inside it for testing.

    I don't believe this is on our end, since we're loading the two directories and structure as Git gives them to us. Ideally, the base folders would be the base you launched the diff command at "left/subfolder" <-> "right/subfolder", at which point only those loaded folders' subitems would be visible. You could right click and Set As Base Folders for the launched/loaded subfolder to remove the empty items from view and see what this would look like. Or other workarounds would be to launch difftool -d from the top folder to have git build and pass all items into the diff. Or remove any right orphans from view with the Display Filters, as a quick way to remove any ungenerated diffs as long as you do not need to review newly created files (or remove only the specific side's Orphans that are ungenerated).
    Aaron P Scooter Software

  10. #20
    Join Date
    May 2015
    Posts
    21

    Default

    Thanks Aaron,

    actually, once I figured out that it worked from the root folder I always do it there. Funny thing is that both 'git diff' and 'git difftool' (without -d) show all files in the repository, no matter the folder you are in. Anyway, thanks for the support, I agree this is most likely a git issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •