2 * Copyright 2000-2019 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package jetbrains.buildServer.buildTriggers.vcs.git.agent.command;
19 import jetbrains.buildServer.vcs.VcsException;
20 import org.jetbrains.annotations.NotNull;
21 import org.jetbrains.annotations.Nullable;
24 * Interface for 'update-ref --stdin'
25 * Requires at least git v1.8.5
27 public interface UpdateRefBatchCommand extends BaseCommand {
30 // update SP <ref> SP <newValue> [SP <oldValue>] LF
31 // create SP <ref> SP <newValue> LF
32 // delete SP <ref> [SP <oldValue>] LF
33 // verify SP <ref> [SP <oldValue>] LF
38 UpdateRefBatchCommand update(@NotNull String ref, @NotNull String value, @Nullable String oldValue) throws VcsException;
41 UpdateRefBatchCommand create(@NotNull String ref, @NotNull String value) throws VcsException;
44 UpdateRefBatchCommand delete(@NotNull String ref, @Nullable String oldValue) throws VcsException;
47 UpdateRefBatchCommand verify(@NotNull String ref, @Nullable String oldValue) throws VcsException;
50 UpdateRefBatchCommand option(@NotNull String option) throws VcsException;
52 void call() throws VcsException;