diff options
author | Tor Norbye <tnorbye@google.com> | 2014-09-18 20:40:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-18 20:40:22 +0000 |
commit | 07d35c37ce79a64bdd905b394d40fc9bbb18fa60 (patch) | |
tree | e8787c45e494dfcc558faf0f75956f8785c39b94 /plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java | |
parent | e222a9e1e66670a56e926a6b0f3e10231eeeb1fb (diff) | |
parent | b5fb31ef6a38f19404859755dbd2e345215b97bf (diff) | |
download | idea-07d35c37ce79a64bdd905b394d40fc9bbb18fa60.tar.gz |
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java')
-rw-r--r-- | plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java b/plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java index d32a0e12f28d..cb0bd9d3dd71 100644 --- a/plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java +++ b/plugins/git4idea/src/git4idea/repo/GitRepositoryFiles.java @@ -45,6 +45,7 @@ public class GitRepositoryFiles { public static final String PACKED_REFS = "packed-refs"; public static final String REFS_HEADS = "refs/heads"; public static final String REFS_REMOTES = "refs/remotes"; + public static final String REFS_TAGS = "refs/tags"; public static final String SQUASH_MSG = "SQUASH_MSG"; public static final String GIT_HEAD = DOT_GIT + slash(HEAD); @@ -64,6 +65,7 @@ public class GitRepositoryFiles { private final String myPackedRefsPath; private final String myRefsHeadsDirPath; private final String myRefsRemotesDirPath; + private final String myRefsTagsPath; private final String myCommitMessagePath; private final String myExcludePath; @@ -85,6 +87,7 @@ public class GitRepositoryFiles { myRebaseMergePath = gitDirPath + slash(REBASE_MERGE); myPackedRefsPath = gitDirPath + slash(PACKED_REFS); myRefsHeadsDirPath = gitDirPath + slash(REFS_HEADS); + myRefsTagsPath = gitDirPath + slash(REFS_TAGS); myRefsRemotesDirPath = gitDirPath + slash(REFS_REMOTES); myExcludePath = gitDirPath + slash(INFO_EXCLUDE); } @@ -99,19 +102,24 @@ public class GitRepositoryFiles { */ @NotNull static Collection<String> getSubDirRelativePaths() { - return Arrays.asList(slash(REFS_HEADS), slash(REFS_REMOTES), slash(INFO)); + return Arrays.asList(slash(REFS_HEADS), slash(REFS_REMOTES), slash(REFS_TAGS), slash(INFO)); } @NotNull String getRefsHeadsPath() { return myRefsHeadsDirPath; } - + @NotNull String getRefsRemotesPath() { return myRefsRemotesDirPath; } + @NotNull + String getRefsTagsPath() { + return myRefsTagsPath; + } + /** * {@code .git/config} */ @@ -148,6 +156,13 @@ public class GitRepositoryFiles { } /** + * .git/refs/tags/* + */ + public boolean isTagFile(@NotNull String path) { + return path.startsWith(myRefsTagsPath); + } + + /** * .git/rebase-merge or .git/rebase-apply */ public boolean isRebaseFile(String path) { |