Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/scripts/treemacs-count-mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def main():
shell=True,
stdout=PIPE,
bufsize=100,
encoding='utf-8'
encoding='utf-8',
env={"LC_ALL": "C"}
).communicate()[0][:-1]

if unread == "0":
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/treemacs-find-ignored-files.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main():

for root in roots:
if exists(root + "/.git"):
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100, cwd=root)
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100, cwd=root, env={"LC_ALL": "C"})
procs.append((root, proc))

STDOUT.write(b"(")
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/treemacs-git-commit-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
STATUS_CMD = "{} status -sb".format(GIT_BIN)

def main():
proc = Popen(STATUS_CMD, shell=True, stdout=PIPE, bufsize=100)
proc = Popen(STATUS_CMD, shell=True, stdout=PIPE, bufsize=100, env={"LC_ALL": "C"})

if (proc.wait() != 0):
sys.exit(2)
Expand Down
5 changes: 2 additions & 3 deletions src/scripts/treemacs-git-status.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from subprocess import Popen, PIPE
from os import listdir, environ
from os import listdir
from os.path import isdir, islink
from posixpath import join
import sys
Expand Down Expand Up @@ -54,8 +54,7 @@ def find_recursive_entries(path, state):
def main():
global output, ht_size
# Don't lock Git when updating status.
environ["GIT_OPTIONAL_LOCKS"] = "0"
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100)
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100, env={"LC_ALL": "C", "GIT_OPTIONAL_LOCKS": "0"})
dirs_added = {}

for item in proc.stdout:
Expand Down
8 changes: 4 additions & 4 deletions src/scripts/treemacs-single-file-git-status.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def main():
print(elisp_alist)

def add_git_processes(status_listings, path):
ignored_proc = Popen(IS_IGNORED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL)
tracked_proc = Popen(IS_TRACKED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL)
changed_proc = Popen(IS_CHANGED_CMD + path, shell=True, stdout=PIPE, stderr=DEVNULL)
ignored_proc = Popen(IS_IGNORED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL, env={"LC_ALL": "C"})
tracked_proc = Popen(IS_TRACKED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL, env={"LC_ALL": "C"})
changed_proc = Popen(IS_CHANGED_CMD + path, shell=True, stdout=PIPE, stderr=DEVNULL, env={"LC_ALL": "C"})

status_listings.append((path, ignored_proc, tracked_proc, changed_proc))

def determine_file_git_state():
proc = Popen(FILE_STATE_CMD + FILE, shell=True, stdout=PIPE, stderr=DEVNULL)
proc = Popen(FILE_STATE_CMD + FILE, shell=True, stdout=PIPE, stderr=DEVNULL, env={"LC_ALL": "C"})
line = proc.stdout.readline()
if line:
state = line.lstrip().split(b" ")[0]
Expand Down