Commit Graph

39 Commits

Author SHA1 Message Date
André Berg 3541acf4a2 Post merge fix: Use the git_oid_mkhex function again from Pieter's libgit2 version. 2010-03-24 09:15:51 +01:00
André Berg 5598eef737 Add preference options for refreshing the view + controller automatically on windowDidBecomeMain.
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?
2010-03-24 09:14:52 +01:00
André Berg 38177ed968 Merge remote branch 'brotherbard/experimental' into local branch 'bb/experimental' 2010-03-24 01:41:00 +01:00
Nathan Kinsinger 46b6057ce1 Speed up commit's isOnSameBranch
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.
2010-03-13 22:16:47 -07:00
Nathan Kinsinger b61028a06a Add support methods needed for future commits.
PBGitCommit
PBGitRevSpecifier
PBGitRepository
2010-03-06 15:56:54 -07:00
Nathan Kinsinger 39def32a1b Add <PBGitRefish> protocol.
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.
2010-02-19 22:55:07 -07:00
Morgan Schweers fa929eb7c9 Use the libgit2 allocfmt method, instead of hacking it by hand. 2009-10-26 15:54:31 +01:00
Morgan Schweers 611687e7c5 Use the newer libgit2 method for extracting a hex digest from an object id. 2009-10-26 15:52:47 +01:00
Steven Michalske c13474e7a3 Added weeks to the strings of time. 2009-10-24 14:55:54 +08:00
Steven Michalske 4f7e155ec0 Adding relitive dates to history view
This is not all that sortable as 1 year will sort before 2 minutes.

To fix this the sorter on the table would neet to learn about units of
time.
2009-10-24 14:54:45 +08:00
Pieter de Bie 0363eea494 HistoryView: don't load in commit information in a separate thread anymore
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.
2009-09-17 23:29:06 +02:00
Pieter de Bie c00f736053 Add preference to ignore whitespace differences in history view
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 :)
2009-06-11 19:40:08 +01:00
Johannes Gilger 6912add00e PBGitCommit: Call git show with --no-color to be safe
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>
2009-05-18 23:18:25 +01:00
Pieter de Bie d38c195149 Fix moving of refs
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.
2009-03-23 23:33:43 +00:00
Pieter de Bie 22f4ac3f13 Show renames changes by default
Now that we have support to show file renames, we can
enable it by default in all the diffs that we use.
2009-01-25 17:46:23 +00:00
Pieter de Bie ddc9ae7654 PBGitCommit: Don't store 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 :)
2009-01-25 02:14:09 +00:00
Pieter de Bie 2bab86cf32 GitCommit: Fix patch generation
This was broken when converting to libgit2's sha's.
We need to use the stringSha, rather than the raw object.
2008-11-26 17:44:24 +01:00
Pieter de Bie 483cbc9de3 GitCommit: store the date as a timestamp
This should speed up commit loading, as we don't
need the date of all commits
2008-11-24 22:54:05 +01:00
Pieter de Bie 8372aee404 PBGitCommit: Use git_oids for parent shas
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.
2008-11-24 22:54:04 +01:00
Pieter de Bie d2eafc2d52 Include libgit2 as submodule and use it to store sha's
This reduces GitX's memory usage and makes some operations much faster,
like graphing, by having a cheaper comparison
2008-11-24 22:53:48 +01:00
Bryce Kerley d8b926c13d use outputForCommand instead of handleForCommand to save code, remove zombie-leaking bug 2008-11-17 16:07:30 -05:00
Pieter de Bie 8a399c0793 GitCommit: Add a 'removeRef' function
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
2008-11-01 22:51:10 +01:00
Pieter de Bie 4cefe8ee92 HistoryView: Allow dragging of refs to move them 2008-11-01 21:14:24 +01:00
Pieter de Bie b7645ec967 PBWebHistoryController: show the commit diff async
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.
2008-10-31 23:45:39 +01:00
Pieter de Bie d4f2b4a120 GitCommit: Add a GitX identifier to the patch output
This is a nice way to track patches that appear on the
internets :)
2008-10-10 21:59:22 +02:00
Pieter de Bie c6966ade41 HistoryView: Add a method to put a commit online 2008-09-25 22:25:46 +02:00
Pieter de Bie 6e978dcea4 Refactor cellInfo structure
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').
2008-09-18 01:27:05 +02:00
Pieter de Bie 78e45bd22c Add support for --left-right
This draws rectangles instead of circles when someone supplies
--left-right as a GitX argument
2008-09-12 20:29:09 +02:00
Pieter de Bie 447a8dc48c PBGitRepository: Also request parents when doing our revwalk
This is necessary for cool graph displaying, to be made.
2008-06-17 19:18:40 +02:00
Pieter de Bie 39797876fe Optimize rev-list parsing
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!
2008-06-17 15:04:49 +02:00
Pieter de Bie 7cdfdf0954 Use UTF-8 for data decoding 2008-06-16 05:31:12 +02:00
Pieter de Bie e6da252ee0 Add shortcuts and menu items for different views 2008-06-16 03:19:01 +02:00
Pieter de Bie 3a672aee16 Cache commit details so we have to fork less 2008-06-16 02:01:38 +02:00
Pieter de Bie 3106379334 Use unified interface and display tree contents 2008-06-15 23:10:05 +02:00
Pieter de Bie 9be3c50a75 Add a Tree displayer
This displays the tree of a specific commit in an NSBrowser.
2008-06-15 20:35:07 +02:00
Pieter de Bie a3d0d66d31 Use a stylesheet for detailed view
This simplifies the HTML code somewhat
2008-06-14 20:08:01 +02:00
Pieter de Bie 79e9ba9fb6 Add a detailed HTML view 2008-06-14 17:38:29 +02:00
Pieter de Bie d444c9d5d1 Add an author field 2008-06-14 02:31:29 +02:00
Pieter de Bie b752f5bc02 Add a search field and subject 2008-06-14 02:24:55 +02:00