EINTR errors are recoverable, just need to read() again.
Randomly while looking at files in the file browser the contents view will be empty or files will not be shown when clicking a discloser triangle. Seems to happen more when running in XCode than when running by itself.
When the Subject column is not the first column in the git history table the contextual menu for refs and dragging and dropping refs don't work.
Offset the mouse click's x value by the x origin of the Subject column.
In PBRefController look up the column index of the subject column and check that it's the clicked column (don't assume it's the first one).
We used to increase this variable after
handing it over to the [handle readToEndOfFileInBackgroundAndNotify],
but sometimes a task would quit before getting to that point, causing
a premature index refresh event to be called.
* 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
* stable:
HistoryView: Don't show the 'loading commit' thing until after 500 ms.
HistoryView: Remove raw view
HistoryView: don't load in commit information in a separate thread anymore
Fix UTF-8 bug in NSString_RegEx
CommitView: Don't keep rearranging when iterating over files
IndexController: de-privatize the index-stopping stuff
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.
This class would use the location information provided by
regex(3) as range for for a substring. However, the information
regex(3) returns is a byte-based, while NSString works on characters.
This can cause a problem when there are UTF-8 characters in the string,
as the wrong subsstring will be returned.
This is fixed by taking the UTF bytesequence, and extracting a substring
from that, rather than using NSString's own substring method
These are mostly copies from PBGitIndexController, and
they can be refactored to a common method. I'm not sure of a name
for that yet, so I'll keep it like this for now :)
It's very difficult to determine whether or not we have a path specifier.
Because it's so difficult, it's better to just always run --children. A quick
test indicates that it doesn't matter much in run-time, and it's better to be
conservative in what we accept than to show bogus lines because the children
haven't been rewritten.