diff options
author | Phil Hughes <me@iamphill.com> | 2018-06-07 19:19:35 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-06-15 13:18:48 +0300 |
commit | e906be2f683f6170a5ee1d5b5f104ab0e08062d1 (patch) | |
tree | 64f388c2f43fd7710456fbc1fdd688f64c8af64e /app/controllers/projects | |
parent | f39582f7b8cc9f1fdb74b58eece944110fc0a625 (diff) |
IDE sends last commit ID when committing changes
Closes #46192
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 64bc6bd5536..1aee83f2f06 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -200,6 +200,7 @@ class Projects::BlobController < Projects::ApplicationController path_segments = @path.split('/') path_segments.pop tree_path = path_segments.join('/') + last_commit = @repository.last_commit_for_path(@commit.id, @blob.path) json = { id: @blob.id, @@ -217,6 +218,7 @@ class Projects::BlobController < Projects::ApplicationController blame_path: project_blame_path(project, @id), commits_path: project_commits_path(project, @id), tree_path: project_tree_path(project, File.join(@ref, tree_path)), + last_commit: last_commit, permalink: project_blob_path(project, File.join(@commit.id, @path)) } |