summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/changed_path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/changed_path.rb')
-rw-r--r--lib/gitlab/git/changed_path.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitlab/git/changed_path.rb b/lib/gitlab/git/changed_path.rb
new file mode 100644
index 00000000000..033779466f6
--- /dev/null
+++ b/lib/gitlab/git/changed_path.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Git
+ class ChangedPath
+ attr_reader :status, :path
+
+ def initialize(status:, path:)
+ @status = status
+ @path = path
+ end
+
+ def new_file?
+ status == :ADDED
+ end
+ end
+ end
+end