GitHub changed their site to use SSL.
On error GitHub may return the "All Gists" page which will have several "gist: #", so check for the edit link instead.
Something in webkit doesn't like the button html element nor the -webkit-appearance: button css tag. Ends up crashing in one of various WebCore::ThemeMac::paint functions.
This would crash for anyone on 10.5 with the Gist it button enabled (which it is by default so that means anyone who ran it for the first time).
Changing the button back to the way it was before SHA:b557d6b5c6e675216d340d20833f39d0096b7ccc
If there is no network connection then the reachability test will take the system default time (90 seconds I think?) to time out. During this time the UI is blocked (spinning beach ball).
The test was being done even if gravatar use was turned off. It doesn't really matter if the site is unreachable, the image will not load but that's not a big deal.
This is a convenience class to replace using NSStrings to store and compare SHAs. PBGitSHA has a much faster isEqual: function.
It is <NSCopying> compliant and implements isEqual: and hash so it can be used as a key in dictionaries.
If the commit's detail is not UTF8 then PBWebHistoryController's commitDetailsLoaded: method will drop down to Latin1. That can cause character's in the committer's name to not be converted correctly.
Move parsing the name to PBGitRevList where the correct encoding can be determined.
- make the "Gist it" button a Mac OS X style button
- remove the default name from each field
- move the author's gravatar and include the committer's
- move the gravatar to the left of the author's name
- add a gravatar for the committer
- move the author and commiter info to it's own table to allow for putting the gravatar image in a center column
- setGravatar() now uses the email address passed in
* pu/pb/index_refactor: (24 commits)
PBGitIndex: post notifications when index stuff fails
GitIndexController: reorder methods a bit, remove unnecessary stuff
PBGitIndex: Migrate discardChanges to the GitIndex
CommitController: Make commit message editable after commit failed
GitIndex: Fix a few comments
GitIndex: explicitly tell when stuff is updated
Remove cruft
Show previous commit message when amending
CommitController: Empty commit title when commit is successful
CommitView: Remove cruft
Add failed commit notifications
GitIndex: add commit notifications
CommitController: Add status messages for index operations
GitIndex: Add a few notifications
CommitView: Migrate patch apply stuff to GitIndex
GitIndex: Add support for applying patches
CommitController: Replace commit method with the one from GitIndex
GitIndex: add basic commit method
GitIndexController: Migrate stageFiles functions to GitIndex
GitIndex: Add methods to stage and unstage files
...
Conflicts:
PBGitCommitController.m
PBGitIndexController.h
PBGitIndexController.m
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.
When rewriting big parts of commit.js, JD forgot to use the new function
for the "Discard hunk" functionality as well. This fixes that.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
* commit 'origin/jg/tree_context':
HistoryController: Add "Open Files" menu item
WebHistoryView: Also use the tree context menu
HistoryController: Use a programatically created context menu
WebHistoryController: Refactor menu search to be recursive
HistoryController: Add some marks
PBGitHistory: Add "Show in Finder" to files
Display context menu in the history tree to show related commits
History fileview: select current item on rightclick
* stable:
PBGitConfig: Add missing sentinel
Remove use of deprecated stringWithCString
HistoryView: only add parents if parents array exists
keyboardNavigation: Fix keys 'c' and 'v' from webView
Site: add link to Twitter
Conflicts:
Site/text/contact.markdown
This used to break if a commit had no parents. This wasn't noticed
before because the breakage is only minor -- the only way you see it
is because the detail view didn't scroll up afterwards.
It used to be displayed in bold, but this can be easily overlooked when
visualizing all branches. It's easier to see the HEAD when it has its own
colour.
This enables a "discard" button for unstaged hunks which simply gets rid of the
changes (by using "git apply --reverse").
To avoid repetition, the stageHunk method was split into a more generic
processHunk method. The "discard" functionality is called through
discardHunk.
The NSAlert shown when discarding can be bypassed by pressing "Alt"
while clicking the discard-button.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Pieter rewrote history.js in cfbcfc1f38, avoiding the use of
.innerHTML for performance reasons. This broke the HTML-arrows when
dealing with renames / mode-changes because createTextNode quotes them.
This is a simple work-around.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This speeds up the diff display by using DOM manipulation instead
of .innerHTML. Apparently incremental .innerHTML is really expensive
compared to DOM manipulation (which is expensive compared to a single .innerHTML=).
For example, the v0.2.1 commit, which introduces Sparkle, now loads in 70ms
rather than 230.
* stable:
Make confirmation of Gists optional
Add more defaults for handling Gists
HistoryView: Confirm paste to Gist if github.user is unset
GitX: CFBuildVersion as x.x.x.xx
UserManual: Explain the concept of the Amend-button
This makes use of the rules that are explicit in the
preferences. By default, Gists are always private and there
will always be a confirmation message.
Both options can be changed from the preferences menu.
This patch relates to ticket #58. It adds a method which will ask for
confirmation when pasting to Gist as an anonymous user. Since users
which have github.user and github.token set can easily delete pasted
snippets no confirmation is needed for them.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>