mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[fragments] implement check if sparse checkout is active
GitOrigin-RevId: e7b68514ea6473a08794fbad51638bee9c3ca543
This commit is contained in:
committed by
intellij-monorepo-bot
parent
23af003173
commit
72f242e291
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package git4idea.config;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -75,6 +75,12 @@ public final class GitConfigUtil {
|
||||
return getValue(h, key);
|
||||
}
|
||||
|
||||
public static @Nullable String getValue(@NotNull Project project, @NotNull File root, @NotNull @NonNls String key)
|
||||
throws VcsException {
|
||||
GitLineHandler h = new GitLineHandler(project, root, GitCommand.CONFIG);
|
||||
return getValue(h, key);
|
||||
}
|
||||
|
||||
private static @Nullable String getValue(@NotNull GitLineHandler h, @NotNull @NonNls String key) throws VcsException {
|
||||
h.setEnableInteractiveCallbacks(false);
|
||||
h.setSilent(true);
|
||||
|
||||
Reference in New Issue
Block a user