Commit Graph

339 Commits

Author SHA1 Message Date
Pieter de Bie 5cb842ca6b PBGitRepositoryWindow: keep toolbar DisplayMode when switching views 2008-10-16 14:58:28 +02:00
Pieter de Bie 85c942f530 Merge branch 'pu/pb/git_config'
* pu/pb/git_config:
  CommitView/Gistie: Use github.user and github.login
  Add a way to retrieve values from .git/config files
2008-10-14 16:45:45 +02:00
Pieter de Bie 87cf92ae96 Merge branch 'pu/pb/git_version'
* pu/pb/git_version:
  cli-tool: Hint at another error if there is a git binary
  Move CLI files to cli group
  GitBinary: Add git version information
  gitx-cli: add a --version option
2008-10-14 16:45:31 +02:00
Pieter de Bie 59e3a181ed cli-tool: Hint at another error if there is a git binary
This will show something like

	Vienna:~ pieter$ gitx
	Error opening repository at /Users/pieter: Could not create document. Perhaps this isn't a git repository?

if you try to open GitX in a directory that isn't supported.
That should be more helpful than the suggestion that GitX can't
find a binary.
2008-10-14 16:35:31 +02:00
Pieter de Bie 7c28f56f77 Move CLI files to cli group 2008-10-14 16:28:57 +02:00
Pieter de Bie 3ba009dcde GitBinary: Add git version information
This makes sure that any git binary found will actually be
version 1.5.4 or higher.
2008-10-14 16:27:50 +02:00
Pieter de Bie 6316b99d0d gitx-cli: add a --version option
This displays GitX version information, handy for debugging. Also shows
where GitX will find a git binary.
2008-10-14 15:51:39 +02:00
Pieter de Bie 406125eee2 GitRepository: Cache HEAD ref
Since 63523d00e8 (History view:
Make lozenge of currently checked out branch (HEAD) bold, same as gitk.),
-[PBGitRepository headRef] was called every time a cell needed redrawing.

This made GitX slow overall, but especially when resizing the window.

So, it's better to cache the value. We'll still reload it with an
explicit refresh though.
2008-10-14 01:38:17 +02:00
Pieter de Bie b4bcc58b3e CommitView/Gistie: Use github.user and github.login
This changes the Gistie paste code to use the github.user
and github.login git config variables for a token and login
name.
2008-10-14 01:02:27 +02:00
Pieter de Bie afb3d45656 Add a way to retrieve values from .git/config files
This introduces the PBGitConfig class. It is KVC compliant as far
as I can see, in that you can actually bind to it in IB and use
ValueForKeyPath to retrieve values. It currently only handles
strings; it should be possible to add functions to process
booleans and numbers to it.
2008-10-14 01:02:27 +02:00
Jeff Mesnil b8161654c5 HistoryView: Add tooltips for subviews 2008-10-13 17:45:34 +02:00
Pieter de Bie 20fc22d4b8 WebController: Fix log bug
The log message wasn't escaped previously,
which would mean that %@ code etc would be
parsed, and fail.
2008-10-10 22:47:47 +02:00
Pieter de Bie 4f212f04b5 CommitView: Remove checking if same file is displayed
This causes trouble if a file was partially staged,
or if we switch from the staged changes to the
unstaged changes.

It should be quick enough not to matter anyway, so
let's simplify things and remove the check.
2008-10-10 21:59:23 +02:00
Pieter de Bie fe38069e39 HTML: Move tab replacement to start of diffhighlight
This might improve performance, as we don't have to match
again every line.
2008-10-10 21:59:23 +02:00
Pieter de Bie 472d36c7f9 CommitView: Add context menu to revert changes 2008-10-10 21:59:23 +02:00
Pieter de Bie e659e63fc0 CommitView: Add option to amend commits 2008-10-10 21:59:23 +02:00
Pieter de Bie 5010511bdb CommitView: Always use a single PBChangedFile object
This makes sure we don't add a double object to our array,
if a file has both cached and unstaged changes.
2008-10-10 21:59:23 +02:00
Christian Jacobsen 63523d00e8 History view: Make lozenge of currently checked out branch (HEAD) bold, same as gitk. 2008-10-10 21:59:22 +02:00
Pieter de Bie 4b27186a83 Update Sparkle Feed for 0.4.1 2008-10-10 21:59:22 +02:00
Pieter de Bie 2b089a79fe GitX v0.4.1 v0.4.1 2008-10-10 21:59:22 +02: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 70bc282982 HTML: Improve diff display performance
This improves the diff performance by a factor of around 10. Things done
to do this are, among others:

	* user String.replace(//g) instead of String.gsub(). It's
		*much* faster
	* Don't use anonymous inner functions for iteration, but instead
		use for loops
	* Don't use String.startsWith() if we can just compare a
		single character

Because we are now so much faster, we can also show bigger diffs
by default.
2008-10-10 21:59:22 +02:00
Pieter de Bie 5c69f31b5a HTML: Update test script with a bigger diff
This way we can profile the JS diff code
2008-10-10 21:59:22 +02:00
Pieter de Bie 6589279383 WebController: Move common functions to superclass 2008-10-10 21:59:22 +02:00
Pieter de Bie 69e1c6fc45 CommitView: Don't break on oneliners
e2210f7306e4c1647ff068f660db1674ce0391e1 (CommitView: Add a better reflog entry)
created a bug where an exception was thrown if you enter a one-lined commit
message.
2008-10-10 21:59:22 +02:00
Pieter de Bie 64f1957ec9 Gistie: Create private gists by default
We can make this optional once the PrefPane is in
2008-10-10 21:59:22 +02:00
Pieter de Bie fd146bd44b CommitView: Add a better reflog entry
This adds an entry in the form of

	commit: CommitView: Add a better reflog entry

to the reflog upon commit, rather than

	Commit from GitX

which isn't very informative
2008-10-10 21:59:22 +02:00
Pieter de Bie 40e9726254 WebControllers: Refactor to use common code 2008-10-10 21:59:21 +02:00
Pieter de Bie 19750e15a0 Add ~/bin/git to search paths 2008-10-10 21:59:21 +02:00
Pieter de Bie d66a105a4b CommitView: Allow rootless commits
This fixes the committing of rootless commits by not
requiring a HEAD parent if there isn't one.
2008-10-10 21:59:21 +02:00
Pieter de Bie e418878c1b CommitView: Add command-shift-enter shortcut to commit 2008-10-10 21:59:21 +02:00
Pieter de Bie 55da6d5bbc HistoryView: Show whitespace in commit message 2008-10-10 21:59:21 +02:00
Pieter de Bie ca6caee473 UserManual: fix home link 2008-10-10 21:59:21 +02:00
Pieter de Bie d3e945da90 UserManual: Add an upload task 2008-10-10 21:59:21 +02:00
Pieter de Bie 92cbaef70d UserManual: minimum requirements are git v1.5.4, not v1.5.3 2008-10-10 21:59:21 +02:00
Rufus Cable 7f4d6c28a9 Add /usr/local/git/bin/git to binary search path (this is used by the OSX binaries listed on the Git home page). 2008-10-10 21:59:21 +02:00
Pieter de Bie 2797d6aeb6 Update the Sparkle feed for 0.4 2008-10-10 21:59:21 +02:00
Pieter de Bie d16ee44b67 Release version 0.4 2008-10-10 21:59:21 +02:00
Pieter de Bie f26cbee2fc Add a help menu item 2008-10-10 21:59:20 +02:00
Pieter de Bie 97f80a2e51 Remove leftover code 2008-10-10 21:59:18 +02:00
Pieter de Bie 40e29732f4 Update ReleaseNotes 2008-10-04 23:04:12 +02:00
Pieter de Bie b2cd87cb72 GitWindow: Don't try to be smart with the view selector
Previously, we would try to copy the view selector from within
the RepositoryWindow, so we could reuse it and change it if we
need to.

However, that causes problems if you have another window open:
if we try to add an item using the insertItemWithIdentifier:atIndex:
method, the item will be added to _all_ toolbars with the same
identifier, even if those toolbars already have the item!

As I see no easy way to fix that, we completely avoid the issue
by not inserting any objects and just copying the view selector
from view to view.
2008-10-04 23:00:11 +02:00
Pieter de Bie a42adc6d82 CommitView: Allow doubleclick to (un)stage changes 2008-10-04 22:41:21 +02:00
Pieter de Bie 7793e5eed4 GitRepository: Quiet a git error when resolving symbolic ref
We already catch this in our code, so this was just
confusing the debug output.
2008-10-04 22:41:21 +02:00
Pieter de Bie 5a7d1e9d30 EasyPipe: Only show debug when user pref is set 2008-10-04 22:41:21 +02:00
Pieter de Bie 8c9697968b Better handle the cases when a Git binary can't be found 2008-10-04 22:41:16 +02:00
Pieter de Bie a8cb5905ea DiffView: Hilight trailing whitespace 2008-10-04 22:38:57 +02:00
Pieter de Bie 57d5db9d49 Documentation: Add User Manual
This is a first attempt on creating a user manual
for GitX. It's style is currently stolen from
Scott Schacon's git-scm.com website.
2008-10-04 00:56:18 +02:00
Pieter de Bie ffae6a8564 GitRepository: Add an "all branches" option in branches list
This is probably the most common non-branch GitX option, so
let's add it by default
2008-10-03 19:25:50 +02:00
Pieter de Bie bae7566cde HistoryView: Allow tripple-clicking on header to undo sorting 2008-10-03 19:07:05 +02:00