Redmine Diffs
I changed the program in my .profile
used by git diff
to one of my own, which caused the breakage of Redmine’s diffs. Redmine has an interface that makes it easy to display diffs between commits which are far apart, and I have opted to upload a lot of my repos to a Redmine installation to take advantage of it. It isn’t even necessary for the repo to be on the same system, thanks to a plugin from a nice man at Github
Code in .profile for setting diff program to use
# environment variables
GIT_EXTERNAL_DIFF=$HOME/bin/ssdiff.sh
export GIT_EXTERNAL_DIFF
Code for ssdiff.sh
For ssdiff.sh
I have opted vimdiff -R
which displays the side by side diffs I prefer, snarfed from somewhere.
#!/bin/bash
# un-comment one diff tool you'd like to use
# side-by-side diff with custom options:
# /usr/bin/sdiff -w200 -l "$2" "$5"
# using kdiff3 as the side-by-side diff:
# /usr/bin/kdiff3 "$2" "$5"
# using Meld
# /usr/bin/meld "$2" "$5"
# using VIM
/usr/bin/vim -dR "$2" "$5"
# icdiff
# icdiff -N "$2" "$5"
This resulted in diffs in the Redmine app not working.
The moral of the story is something breaks in your Redmine app don’t be so quick to blame it on a bug.
Which leads to the next question. How do you configure a set of environment variables for Rails app which is independent of your profile settings?
Vertical Tabs
- 90446 reads
Add new comment