Add preference for showing exact or relative dates.
Make the showWhitespaceDifferences preference work.
Make the context slider in the diff views work.
This is done with a minimal version of jQuery 1.3.2 being responsible for the animation and
a small cookie storing the last value between page refreshes so that it can be incremented by the HTML sliders
default value.
TODO: Maybe we can also make the default context value into a preference?
Use the cached commit list to avoid asking git for the info. This is used to update GUI buttons and when opening the contextual menu so making it fast is important. It wasn't possible before because we weren't storing all the commits.
This will simplify methods that execute git commands that can take a ref or an SHA.
Add some string constants so there is only one place for the type strings.
I've seen this hang or crash a few times, so I hope this works better.
Instead of running a task in a separate thread, we just let it go through
the run loop and catch it when the task is done.
This ruins the second subview in the history view, but I don't think
anybody ever used that, so I'm going to remove it.
We don't want to do this in the commit view, as that way you can't
commit whitespace differences. You'll never be able to have a clean
working tree, and you can't see why the files remain 'unstaged'. So, we do this
only for the history view :)
This fixes ticket #132, where setting color.ui = always in the gitconfig
caused GitX to received colorized output for "git show", thereby
destroying the diff-output.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This was seriously broken after we moved to a hash
to store the refs in ddc9ae7654. Apparently nobody
noticed this earlier.
We fix it by doing the right thing. Don't remove the array
if it's empty, but check in the drawing if we really have refs.
We already keep this dictionary in our repository. Rather than adding a
pointer to it on every commit in our rev walk, just look it up lazily in the
dictionary when we need to. That cuts down some time in the initial revwalk
and also removes some stupid code :)
This uses a normal c array to store parent sha's. That means that we
save a lot of room, as they are only 20 bytes rather than 40 + the cost of
an NSArray and the NSStrings.
The ref functionality is somewhat weird right now, in that
some parts of the code require a nil array when there are no
refs. So, we add a good removeRef accessor to keep track of this
This should make the GUI more responsive by allowing the diff
to be read in the background. This assumes that
[PBGitCommit details] is threadsafe, so we should keep it that
way.
This makes the PBGitRevisionCell a bit nicer by retrieving all values
from the PBGitCommit object itself, and using another NSTextFieldCell to
draw the text.
This mean that PBGitGrapher now stores its information in the PBGitCommit's,
rather than in a custom grapher array. Also, because we don't need the
grapher to display refs anymore, the ref labels are also displayed when
using path limiting (for example, 'gitx -- Makefile').
This uses the C fgets() over the weird readLine implementation I found.
It speeds up the rev-parsing significantly: we went from ~4.5 seconds
on the git.git repo to ~0.95 seconds. And that's with the secret new date
parsing!