You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2024/09/06 07:04:38 UTC
(lucene) branch branch_9x updated: jgit/ clean status check should ignore any 'untracked folders' (#13728) (branch 9x backport)
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new d0ee23fade9 jgit/ clean status check should ignore any 'untracked folders' (#13728) (branch 9x backport)
d0ee23fade9 is described below
commit d0ee23fade97370e8e25d3e49820d94574dd8700
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Fri Sep 6 09:01:15 2024 +0200
jgit/ clean status check should ignore any 'untracked folders' (#13728)
(branch 9x backport)
* Ignore any 'untracked folders' #13719
* Upgrade jgit to 6.10.0.202406032230-r.
---
buildSrc/scriptDepVersions.gradle | 2 +-
gradle/validation/git-status.gradle | 18 +-----------------
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/buildSrc/scriptDepVersions.gradle b/buildSrc/scriptDepVersions.gradle
index e909b1c7a46..b90dbbbe560 100644
--- a/buildSrc/scriptDepVersions.gradle
+++ b/buildSrc/scriptDepVersions.gradle
@@ -28,6 +28,6 @@ ext {
"flexmark": "0.61.24",
"javacc": "7.0.12",
"jflex": "1.8.2",
- "jgit": "5.13.1.202206130422-r",
+ "jgit": "6.10.0.202406032230-r",
]
}
diff --git a/gradle/validation/git-status.gradle b/gradle/validation/git-status.gradle
index 37c3d8dce39..4e8bb19d77e 100644
--- a/gradle/validation/git-status.gradle
+++ b/gradle/validation/git-status.gradle
@@ -74,21 +74,6 @@ configure(rootProject) {
logger.warn("WARNING: Directory is not a valid git checkout (won't check dirty files): ${rootProject.projectDir}")
}
} else {
- // git ignores any folders which are empty (this includes folders with recursively empty sub-folders).
- def untrackedNonEmptyFolders = status.untrackedFolders.findAll { path ->
- File location = file("${rootProject.projectDir}/${path}")
- boolean hasFiles = false
- Files.walkFileTree(location.toPath(), new SimpleFileVisitor<Path>() {
- @Override
- FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
- hasFiles = true
- // Terminate early.
- return FileVisitResult.TERMINATE
- }
- })
- return hasFiles
- }
-
def offenders = [
// Exclude staged changes. These are fine in precommit.
// "(added)": status.added,
@@ -97,8 +82,7 @@ configure(rootProject) {
"(conflicting)": status.conflicting,
"(missing)": status.missing,
"(modified)": status.modified,
- "(untracked)": status.untracked,
- "(untracked non-empty dir)": untrackedNonEmptyFolders
+ "(untracked)": status.untracked
].collectMany { fileStatus, files ->
files.collect {file -> " - ${file} ${fileStatus}" }
}.sort()