Commit Graph

485 Commits

Author SHA1 Message Date
Christian Jacobsen 0f09401aa6 Add a preferences window
This adds a preference window with default preferences to change the
sparkle options and to set a custom path to a git binary.
2009-01-19 16:38:02 +00:00
Pieter de Bie 85fa5a1d8f GitCommit: Restore revert functionality
This restores the "Revert Changes.." functionality
that was removed when changing the file list stuff.

It's now possible to revert multiple files. Also, it
now uses 'git checkout-index', which should be a bit
more robust.
2008-12-22 22:22:10 +01:00
Pieter de Bie d0c5db47ea Merge branch 'pu/mb/add_gitignore'
* pu/mb/add_gitignore:
  CommitView: Add option to add files to .gitignore
2008-12-22 21:59:45 +01:00
Mark Bestley fc00f6c087 CommitView: Add option to add files to .gitignore
In the commit view, add an option in the context menu to have git
ignore them by adding the file names to .gitignore file in the root
of the workarea.
2008-12-22 21:59:11 +01:00
Pieter de Bie 8d729dae4c CommitView: Don't change selection when refreshing
We used to read in a completely new array when refreshing
the index. The problem with this is that the selection
changes when reading in the new array. We avoid this
by changing the current array, rather than loading in
a completely new one.
2008-12-22 21:31:05 +01:00
Pieter de Bie cd4ee1b993 Update views when switching 2008-12-22 20:47:36 +01:00
Pieter de Bie da89f38546 HistoryView: Accept an empty email address 2008-12-22 20:40:17 +01:00
Pieter de Bie 641d2dbdce GitGrapher: Reduce number of lines we output
We used to output a line for every lane after the
lane in which the current commit is in, and also
make it have the wrong color. This fixes the buglet
and also makes sure not to draw a line when
the commit has no parents.
2008-12-22 20:11:57 +01:00
Kevin Ballard 83fff61b6a Always build in the project-relative build/ folder with rake build_app 2008-12-15 18:05:24 +01:00
Pieter de Bie 530377a121 PBEasyPipe: Fall back to ASCII encoding when UTF-8 fails
This seems to be the only sensible thing to do, as we can't guess
what the encoding would otherwise be.
2008-12-15 18:00:34 +01:00
Pieter de Bie 56a6adc234 GitGrapher: Do not crash on only a single commit
This was somewhat unfortunate, as we don't check
on if we have at least a single parent when adding
new parents. That would cause a wild pointer, or null
dereference when creating a new lane.
2008-12-15 17:33:50 +01:00
Pieter de Bie cbf2608dfa Site: Fix display of the User Manual
This was accidentally broken when 578edf879
changed the 'body' variable to be global.
2008-12-04 20:56:15 +01:00
Kim Does 0434062a7e DiffView: Make the lines and shadows more subtle 2008-12-02 01:00:18 +01:00
Pieter de Bie d977d90b2c Diffs: overflow the text 2008-12-02 01:00:18 +01:00
Pieter de Bie e0d8df63e8 IndexController: Don't try to be smart when diffing staged changes
We previously used some cool git syntax to display changes in the index.
The unfortunate side-effect of this was that the diff headers weren't correct,
so the unstage button didn't work anymore.
2008-12-02 01:00:18 +01:00
Martin Svangren 41154efa15 Rakefile: Fixed broken copy in install_app
Seems like File.copy doesn't do directories (as source, that is),
only files (as far as I can tell from reading the docs and trying
it in irb, punch me if I'm wrong). It only creates a zero byte file
in the target directory on my system.

Replaced File.copy with a system call to 'cp -R ...' to do the job.
Seems like FileUtils could have done it just as well (with cp_r),
but I figured making a system call was better than introducing a
new dependency.
2008-12-02 00:04:40 +01:00
Pieter de Bie 0852f6326c DiffHighlighter: Don't display a diff if there's nothing to display 2008-12-01 15:57:21 +01:00
Pieter de Bie 415ee91b50 WebHistoryView: Add a link to display changed images 2008-12-01 15:57:21 +01:00
Pieter de Bie 359346a2d3 DiffHighlighter: Add a binary file callback
This allows a caller to return custom code when
a file is marked as binary, such as the option
to display the file
2008-12-01 15:57:18 +01:00
Pieter de Bie 7a3166c0e6 WebHistoryView: Use diff callbacks to display history list
This is the start of a callback system we can use to 
make the diff more interactive
2008-12-01 15:09:48 +01:00
Travis Cline 61994be15e reset SDKROOT paths to allow building 2008-12-01 14:28:57 +01:00
Pieter de Bie 4591557e9b WebHistoryView: Fix displaying of parents
This was broken once with the shift away from Prototype,
and even further when using libgit2.
2008-12-01 14:26:42 +01:00
Mark Bestley 35f20cddd5 GitRefController: Fix moving and updating branches
This was also broken with the libgit2 move
2008-12-01 13:59:29 +01:00
Pieter de Bie afcd0b4bc6 GitRevSpecifier: Add NSCoder protocol
This way, the RevSpecs can be loaded from a menu,
so we can use them in the toolbar customization
2008-12-01 13:51:35 +01:00
Pieter de Bie 4dd7a46b86 Allow Toolbar customization
This allows both toolbars to be customized.
2008-12-01 13:50:51 +01:00
Pieter de Bie 578edf879e Site: Add a page title in the header 2008-12-01 13:19:23 +01:00
Pieter de Bie 0b65b54f7f Add a warning about possible error 2008-12-01 13:07:06 +01:00
Pieter de Bie ea0b28d52c Fix copying of commits
This was broken after using libgit2's sha's objects, as we now need to use
realSha
2008-12-01 13:06:08 +01:00
Pieter de Bie 23bb1658d9 WIP: Prettify the diff display by using rounded corners
This wraps each changed file in its own rounded box, making
the diff display easier to the eye :)
2008-11-26 17:44:49 +01:00
Pieter de Bie 07554fbd1f Add toggle function 2008-11-26 17:44:48 +01:00
Pieter de Bie 0a2ddc36f7 GitWindowController: Store multiple views
This keeps the subviews in memory, which means that switching views will
be faster if a view has already been opened. This also allows you to type
a commit message, switch to the history view, and then switch back to
continue typing.
2008-11-26 17:44:25 +01:00
Pieter de Bie 3dd6385440 Fix memory leaks 2008-11-26 17:44:24 +01: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 777f70f24f Remove leftover comment 2008-11-25 18:12:26 +01:00
Pieter de Bie ea30f2bfce JS: Remove stray log 2008-11-25 17:43:11 +01:00
Pieter de Bie 7e2707d979 DiffHilighter: Specific the div in which to hilight
Previously, the diff hilighter was a bit odd in that it would
just search for elements with a diff and highlight those. While
useful in theory, this wasn't used at all. We change it to
receive the diff to hilight, which makes the code somewhat simpler.
2008-11-25 17:43:11 +01:00
Stephen Bannasch f05d0188fc add commit file links and ctrl-arrow navigation
A list of files included in a commit are listed below the
commit message. The list are links which will take you to
that file in the diff display below.

The title of each fileHeader is now just the path to the file
instead of the full diff command.

While the focus is in the commit ctrl-down_arrow and up_arrow
will navigate to to next and previous file in that commit.
2008-11-25 17:43:11 +01:00
Pieter de Bie 4e915cc68f Remove "extern C" declaration when importing libgit2
libgit2 takes care of thiss now, so we don't have to.
2008-11-25 17:43:11 +01:00
Pieter de Bie bda90606f2 PBGitLane: remove functions with NSString arguments
We don't use these, so let's keep the class clean
2008-11-25 17:43:11 +01:00
Pieter de Bie b4c2a4f3fa GitGrapher: free pointers on dealloc
This frees the std vector and its contents on
dealloc. We also fresh up the header a bit
2008-11-25 17:43:10 +01:00
Pieter de Bie 18954b4a30 Site: Add download button photoshop file 2008-11-24 23:01:41 +01:00
Pieter de Bie e0dcdf62b3 PBGitGrapher: Use std::list rather than vector
This allows us to remove the currentlane if
necessary, fixing a drawing bug
2008-11-24 22:54:05 +01:00
Pieter de Bie eb472e0c86 PBGraphCellInfo: remove unneeded data member
And clean up the file while we're at it
2008-11-24 22:54:05 +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 e570c3e50a Use structs for graph lines
We used to use NSObjects, which was really expensive, because for each commit
as many as 100 graphlines can be created. By preallocating them and not
using NSObjects in general, we gain a massive speedup
2008-11-24 22:54:04 +01:00
Pieter de Bie 6aa28941e1 GitGrapher: Remove unneedded loop
I'm not sure what this loop originally did, but it was buggy and doesn't
seem logical. Removing it speeds up the graphing a lot, so let's kill it.
We can always get it back later if necessary
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
Pieter de Bie 1a7ad9415f PBGitRevList: Rewrite as C++ code
This produces cleaner code and is also significantly faster
than the old obj-c code: linux-2.6 goes from ~8 seconds
to ~6 seconds.

Using the c++ code allows us to do easy optimizations
2008-11-24 22:32:51 +01:00
Pieter de Bie 3d64d83f98 Create a new SpeedTest target
This adds a new target 'SpeedTest', which just loads in a repository
and displays how long it takes to load the revision. This is handy for
testing the speed of the revwalking mechanism
2008-11-24 22:32:46 +01:00