Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Refactor for pr #519
Browse files Browse the repository at this point in the history
  • Loading branch information
akonwi committed Oct 31, 2016
1 parent 1061037 commit d962bb1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Changelog

### 5.19.1
### 5.20.0
- Fix #510 [pr #514](https://github.com/akonwi/git-plus/issues/514)
- Add new command (Add Modified) [pr #519](https://github.com/akonwi/git-plus/issues/519)

### 5.19.0
- Add new command (Merge without fast-forward) [pr #492](https://github.com/akonwi/git-plus/issues/492)
Expand Down
2 changes: 1 addition & 1 deletion lib/git-plus-commands.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ getCommands = ->
git.refresh()
commands = []
commands.push ['git-plus:add', 'Add', -> GitAdd(repo)]
commands.push ['git-plus:add-modified', 'Add Modified', -> git.addModified(repo).then -> GitCommit(repo)]
commands.push ['git-plus:add-modified', 'Add Modified', -> git.add(repo, update: true)]
commands.push ['git-plus:add-all', 'Add All', -> GitAdd(repo, addAll: true)]
commands.push ['git-plus:log', 'Log', -> GitLog(repo)]
commands.push ['git-plus:log-current-file', 'Log Current File', -> GitLog(repo, onlyCurrentFile: true)]
Expand Down
2 changes: 1 addition & 1 deletion lib/git-plus.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports =
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:init', -> GitInit()
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:menu', -> new GitPaletteView()
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:add', -> git.getRepo().then((repo) -> GitAdd(repo))
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:add-modified', -> git.getRepo().then((repo) -> git.addModified(repo).then -> GitCommit(repo))
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:add-modified', -> git.getRepo().then((repo) -> git.add(repo, update: true))
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:add-all', -> git.getRepo().then((repo) -> GitAdd(repo, addAll: true))
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:commit', -> git.getRepo().then((repo) -> GitCommit(repo))
@subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:commit-all', -> git.getRepo().then((repo) -> GitCommit(repo, stageChanges: true))
Expand Down
8 changes: 0 additions & 8 deletions lib/git.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@ module.exports = git =
notifier.addSuccess "Added #{file ? 'all files'}"
.catch (msg) -> notifier.addError msg

addModified: (repo) ->
args = ['add', '-u']
git.cmd(args, cwd: repo.getWorkingDirectory())
.then (output) ->
if output isnt false
notifier.addSuccess "Added #{file ? 'all files'}"
.catch (msg) -> notifier.addError msg

getRepo: ->
new Promise (resolve, reject) ->
getRepoForCurrentFile().then (repo) -> resolve(repo)
Expand Down

0 comments on commit d962bb1

Please sign in to comment.