summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/getters.js
diff options
context:
space:
mode:
authorAndré Luís <me@andr3.net>2018-05-07 17:42:56 +0000
committerPhil Hughes <me@iamphill.com>2018-05-07 17:42:56 +0000
commitb7f3d7470b41292aa484cf2dd821ff91086efe96 (patch)
tree6602c223b5b0100ec678cb295ea29f62570124a2 /app/assets/javascripts/ide/stores/getters.js
parent68b71df67f18f9b57a613610849b619361df246e (diff)
downloadgitlab-ce-b7f3d7470b41292aa484cf2dd821ff91086efe96.tar.gz
Resolve "Clean up bottom status bar Web IDE"
Diffstat (limited to 'app/assets/javascripts/ide/stores/getters.js')
-rw-r--r--app/assets/javascripts/ide/stores/getters.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js
index 75286ed0cd2..b239a605371 100644
--- a/app/assets/javascripts/ide/stores/getters.js
+++ b/app/assets/javascripts/ide/stores/getters.js
@@ -81,5 +81,11 @@ export const getUnstagedFilesCountForPath = state => path =>
export const getStagedFilesCountForPath = state => path =>
getChangesCountForFiles(state.stagedFiles, path);
+export const lastCommit = (state, getters) => {
+ const branch = getters.currentProject && getters.currentProject.branches[state.currentBranchId];
+
+ return branch ? branch.commit : null;
+};
+
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};