3

I need help getting git extensions to run with msysgit. I have had bad luck with extensions git-tfs and git-fetchall, in both cases it is the same problem. The addon will require a file to be placed where git can find it (git-tfs.exe and git-fetchall.sh). I understand this to mean the files need to be in a directory that is in the 'PATH' environment variable. In both cases I get stuck at this point:

$ git-diffall
bash: git-diffall: command not found

or:

$ git-tfs
bash: git-tfs: command not found

When I run echo %PATH% from a regular command shell, it shows my path variable includes the directories where git-diffall and git-tfs are. How can I debug this, or am I missing something? Is there a way within msysgit to verify the command search path is what I expect?

5
  • 1
    On OSX I use git diff HEAD to diff my most recent changes before a commit.
    – Greg K
    Commented Apr 18, 2010 at 22:42
  • I am not asking how to diff. I am asking how to get addons to work, when git says it cannot find them. Commented Apr 18, 2010 at 22:44
  • It's not git saying it can't find them. It's the shell saying it.
    – Yuliy
    Commented Apr 18, 2010 at 22:50
  • Sounds true. I'm a windows user, don't spend much time in unix shells. Commented Apr 18, 2010 at 22:55
  • Warning, starting with git 2.0.X/2.1 (Q3 2014), git diffall will always return "command not found: it has been removed. See my answer below
    – VonC
    Commented Jul 27, 2014 at 8:27

4 Answers 4

8

Ok, I found the disconnect. It was elusive until I started running "echo $PATH" from the shell (rather then echo %PATH% from the windows command shell, which had a different result).

Two problems:

  1. When I configured the environment variables, I originally had a '\' at the end of the path. This seemed to caused echo $PATH to show invalid pathnames like '/c:/directory' instead of '/c/directory/.

  2. A reboot was necessary for changes to the system environment variables made through the windows UI to be reflected in the msysgit/bash/git shell.

1
  • 3
    +1, thanks. Jees, it's nearly 2012 and we still need to reboot to reflect PATH changes :(
    – CharlesB
    Commented Oct 20, 2011 at 13:02
1

In addition to being in the $PATH, they also need to be executable. So, in Cygwin (I'm asssuming Windows because you used "%PATH%" instead of "$PATH" in your question, which is a Windows-specific thing), you should navigate to the directory in which the program git-difall is located, and then type:

chmod a+x git-diffall

Also, unlike Windows which ignores the ".exe", ".com", ".bat", etc. extensions, BASH does care about these extensions, so if you have git-diffall.sh on your path, you would need to invoke it as git-diffall.sh and not as git-diffall. If you want to invoke it as git-diffall, then simply remove the file extension. You can do this using the Cygwin commandline as well, using:

mv git-diffall.sh git-diffall

Also, the first chmod needs to use git-diffall or git-diffall.sh depending on the actual name.

2
  • Thanks for reading my question before responding. It seems I can use the commands when my msysgit shell is navigated to the folder they are in, so it seems to be more related to where msysgit is looking for them. How would you set your path to include them? Commented Apr 18, 2010 at 22:53
  • Debugging with $PATH from the msysgit/bash/git shell helped reveal where the disconnect was. Commented Apr 18, 2010 at 23:09
1

I faced today with the same problem, but solution isn't here, so I'll add my two cents.

If you have %HOME% path set in windows - make sure that:

  1. it is created within -user- environment settings, not -system- ones. git itself seems working with system variable correctly, but GitExtensions take HOME from user variables only.
  2. it is not equal to Git base directory. The thing is msysgit treats C:\Program Files (x86)\Git (or wherever you have it installed) as root / and adds /bin to it literally similarly to command PATH=$HOME/bin:$PATH. Thus if your %HOME% is C:\Program Files (x86)\Git you'll have $PATH starting with //bin: which is obviously incorrect.
0

Warning, starting with git 2.0.X/2.1 (Q3 2014), git diffall will always return "command not found": it has been removed.

See commit 502b0a1 by Jonathan Nieder (jrn) (with the assistance of Tim Henigan (thenigan)):

contrib: remove git-diffall

The functionality of the "git diffall" script in contrib/ was incorporated into "git difftool" when the --dir-diff option was added in v1.7.11 (ca. June, 2012).
Once difftool learned those features, the diffall script became obsolete.

The only difference in behavior is that when comparing to the working tree, difftool copies any files modified by the user back to the working tree when the diff tool exits.
"git diffall" required the --copy-back option to do the same.
All other diffall options have the same meaning in difftool.

Make life easier for people choosing a tool to use by removing the old diffall script. A pointer in the release notes should be enough to help current users migrate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.