Skip to content

Commit 98b7078

Browse files
Merge pull request #1106 from Ecordonnier/eco/git-ceiling-directories
respect GIT_CEILING_DIRECTORIES
2 parents 7d4e94c + 0b82e5d commit 98b7078

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/setuptools_scm/_file_finders/git.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def _git_ls_files_and_dirs(toplevel: str) -> tuple[set[str], set[str]]:
7272
# export-ignore git attribute
7373

7474
cmd = ["git", "archive", "--prefix", toplevel + os.path.sep, "HEAD"]
75+
log.info("running %s" % " ".join(str(x) for x in cmd))
7576
proc = subprocess.Popen(
7677
cmd, stdout=subprocess.PIPE, cwd=toplevel, stderr=subprocess.DEVNULL
7778
)

src/setuptools_scm/_run_cmd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ def no_git_env(env: Mapping[str, str]) -> dict[str, str]:
9898
k: v
9999
for k, v in env.items()
100100
if not k.startswith("GIT_")
101-
or k in ("GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND")
101+
or k
102+
in ("GIT_CEILING_DIRECTORIES", "GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND")
102103
}
103104

104105

0 commit comments

Comments
 (0)