Opened 6 years ago

Closed 6 years ago

#7246 closed defect (worksforme)

[git] git_bin doesn't strip # comments and spaces correctly.

Reported by: anonymous Owned by: hvr
Priority: low Component: GitPlugin
Severity: major Keywords: giterror retrieve version synchronize
Cc: Trac Release: 0.12


Trac 0.12, git, tracgit

If you have comments and spaces after the filename in git_bin, GitPlugin will report

Warning: Can't synchronize with repository "(default)" (GIT backend not available). Look in the Trac log for more information.

due to

Trac[git_fs] ERROR: GitError: Could not retrieve GIT version

For example, this will fail :

git_bin = path\to\git.exe # Abandon all hope.

Whereas this will succeed

git_bin = path\to\git.exe
# Sunshine & kittens!

This caused me hours of grief. Hope I help others.

Attachments (0)

Change History (3)

comment:1 in reply to: ↑ description Changed 6 years ago by anonymous

Could I (initial poster) also suggest a more informative error message? Perhaps...

  • The full path- & filename that GitPlugin is attempting to use.
  • The OS response in case of error (if any).
  • The version string or error returned by git.exe which GitPlugin then attempts to parse.

comment:2 Changed 6 years ago by asn@…

I still get:

ERROR: GitError: Could not retrieve GIT version

and don't get it fixed.

openSUSE 11.1 trac 0.12 git 1.7.1

comment:3 Changed 6 years ago by hvr

  • Resolution set to worksforme
  • Status changed from new to closed

Made error message slightly more informative in c50d90dacb59001fc1d40f92f55a187f2ef012f8

Add Comment

Modify Ticket

as closed The owner will remain hvr.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.