summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/extracts_path.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 721ed97bb6b..fe4c619e4d4 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -116,11 +116,14 @@ module ExtractsPath
@commit = @repo.commit(@ref)
- if @path.empty? && !@commit && @id.ends_with?('.atom')
- @id = @ref = extract_ref_without_atom(@id)
- @commit = @repo.commit(@ref)
-
- request.format = :atom if @commit
+ if @path.empty? && @id.ends_with?('.atom')
+ if @commit
+ request.format = :html
+ else
+ @id = @ref = extract_ref_without_atom(@id)
+ @commit = @repo.commit(@ref)
+ request.format = :atom if @commit
+ end
end
raise InvalidPathError unless @commit