Kevin Sawicki
8af55a04d8
Use a single worker for status refreshes
...
There still appear to be crashes occurring when
using libgit2 from multiple workers at the same time.
So only start a new status worker once the current one
completes if a refresh was requested while a worker was
running.
Closes #367
2013-03-06 14:59:12 -08:00
Kevin Sawicki
60c2829af4
Move ahead/behind defaults to Git class
2013-03-04 21:47:21 -08:00
Kevin Sawicki
165dffc15d
Always return array from Git.getLineDiffs()
2013-03-04 21:43:34 -08:00
Kevin Sawicki
c9ef846727
Only replace .git segment if trailing
2013-03-04 21:43:34 -08:00
Kevin Sawicki
c14aa3b86f
Default status to 0 if undefined
...
This keeps the status-changed event from triggering
the first time the status is requested as it goes
from undefined to 0 which should be treated as no
change.
2013-03-04 21:43:34 -08:00
Kevin Sawicki
1be0b817de
Specify text as second parameter
2013-03-04 21:43:34 -08:00
Kevin Sawicki
ab5043f890
Add method to get line diffs for path and text
2013-03-04 21:43:34 -08:00
Kevin Sawicki
e3ebda7d30
Show commits ahead/behind upstream in status bar
2013-03-04 21:43:34 -08:00
Kevin Sawicki
fd82f3f8a4
Add method to get ahead/behind commit counts
2013-03-04 21:43:34 -08:00
Kevin Sawicki
3703877ae8
Default status flags to 0
2013-03-04 21:43:34 -08:00
Kevin Sawicki
4384c69dcf
Delete cached statuses unless non-zero
2013-03-04 21:43:34 -08:00
Kevin Sawicki
3852b7212b
Remove git-status-changed event from Buffer
...
This is now fired as a status-changed event from
the Git class when the checkout completes normally
and the status of the path changes.
2013-03-04 21:43:33 -08:00
Kevin Sawicki
77a5f4775a
Show Git status indicators on directories
...
Closes #301
2013-03-04 21:43:33 -08:00
Kevin Sawicki
4fe6db240b
Consolidate Git status checking
...
Now the status bar and tree view both listen for
status change events and use the cached information
available from the git object to update their views.
2013-03-04 21:43:33 -08:00
Kevin Sawicki
94449f772c
Initialize statuses and task variables correctly
2013-03-04 21:43:33 -08:00
Kevin Sawicki
68b61d71c6
Trigger event when path status changes
2013-03-04 21:43:32 -08:00
Kevin Sawicki
083562e1aa
Abort status task when destroyed
2013-03-04 21:43:32 -08:00
Kevin Sawicki
c6e89d33f8
Git.refreshStatuses() -> Git.refreshStatus()
2013-03-04 21:43:32 -08:00
Kevin Sawicki
50bc1aac74
Add task to refresh status of repository
...
By default this will occur when the window gains
focus and the Git class can now be subscribed to
so listeners can become notified when the status
of a repository changes.
2013-03-04 21:43:32 -08:00
Kevin Sawicki
4add7b6213
Support getting status of entire repository
...
New Git.getAllStatuses() method returns all non-ignored
status entries in the repository.
2013-03-04 21:43:32 -08:00
Corey Johnson
595cf71d93
Return absolute path for Git repo
2013-03-01 13:54:19 -08:00
Kevin Sawicki
745a3ef9f2
Use class methods to create native object shims
...
CoffeeScript 1.5 complains if a constructor has
a returns a value.
2013-02-27 13:25:10 -08:00
Kevin Sawicki
f730672e9d
Use ? instead of or
2013-02-15 09:56:03 -08:00
Kevin Sawicki
5cd3c04702
Load fuzzy finder paths in web worker at startup
...
Previously the paths were first loaded when the fuzzy finder
view was first attached.
Now a web worker is started when the package activates that
sets the paths on the fuzzy finder view the first time it
displays if the worker has completed by the time an event occurs
that displays the view.
2013-02-02 12:47:46 -08:00
Corey Johnson & Nathan Sobo
74d7d48dcc
Don't make GitRepository a window global
2013-01-24 17:22:49 -08:00
Kevin Sawicki & Nathan Sobo
bb6bed85c6
Raise exception when destroyed repo is accessed
2013-01-09 17:12:15 -08:00
Kevin Sawicki & Nathan Sobo
caffda6027
Add Git.destroy() that frees native repository
2013-01-09 17:07:29 -08:00
Kevin Sawicki
ba614d5549
Throw error from GitRepository constructor
2013-01-09 11:53:13 -08:00
Kevin Sawicki
8d0d62b486
Add Git.open that returns null on exceptions
2013-01-08 21:15:42 -08:00
Kevin Sawicki
6f5e29d48e
Throw exception when repository fails to open
...
Removes need to check if the repository is valid before
each native API call and also removes calling into the
native-side if no repository can be opened for the project
page.
2013-01-08 21:15:41 -08:00
Kevin Sawicki
f5344080f1
Only compute Git status flags once
...
Previously the status was fetched twice, once for
if modified and once for if new.
Now the flags are fetched once and Git now provides
helpers to check the status flags directly for
modified and new status.
2013-01-07 17:35:57 -08:00
Kevin Sawicki
146ae9d776
Refresh the Git index when the window gains focus
...
Closes #121
2013-01-07 17:29:48 -08:00
Kevin Sawicki
a300146f2a
Display submodule icon in tree-view
2013-01-06 09:52:53 -08:00
Kevin Sawicki
59d631879d
Start substring after trailing slash
2013-01-06 08:45:07 -08:00
Kevin Sawicki
f11f85e87b
Show octicon for project's that are repos
2013-01-05 19:24:53 -08:00
Kevin Sawicki
219aaca0f5
Show diff stat in status bar
...
Include the number of lines added and removed for
new and modified files
2012-12-27 10:41:29 -08:00
Kevin Sawicki
50e4602f7c
Use getPath() internally
2012-12-10 17:44:59 -08:00
Kevin Sawicki
6954edd8a2
Show status icon for staged changes
2012-12-10 10:28:53 -08:00
Kevin Sawicki
1019154db6
Add Git.checkoutHead(path)
2012-11-03 15:09:52 -07:00
Corey Johnson & Kevin Sawicki
be533d4342
Add Git.isPathNew(path)
...
Renamed other method to Git.isPathModified
2012-11-02 15:36:35 -07:00
Corey Johnson
81fc8d417d
Add Git.isModified(path)
2012-11-02 15:35:21 -07:00
Kevin Sawicki
094b5a3604
💄
2012-11-02 15:33:39 -07:00
Kevin Sawicki
20c69118ff
Decorate ignored files/folders in tree-view
2012-11-02 15:33:38 -07:00
Kevin Sawicki
8e8ab4ff94
Add getPath helper
2012-11-02 15:33:37 -07:00
Kevin Sawicki
a3ef53f8e6
Return repository for all paths
2012-11-02 15:33:07 -07:00
Kevin Sawicki
88cdff9d26
Return full HEAD when unshortened
2012-11-02 15:31:11 -07:00
Kevin Sawicki
d66315dd21
Abbreviate SHA-1s when HEAD is detached
2012-11-02 15:31:10 -07:00
Kevin Sawicki
14302c491d
Show current branch in status bar
2012-11-02 15:31:10 -07:00