Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] git-r3.eclass: Remove SGR control sequences from messages.
Date: Sat, 14 Dec 2019 12:13:08
Message-Id: f93b06c202bbd5ed99d816c67e42053fc4950453.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] git-r3.eclass: Remove SGR control sequences from messages. by "Ulrich Müller"
1 On Sat, 2019-12-14 at 12:29 +0100, Ulrich Müller wrote:
2 > These prevent NOCOLOR in make.conf or emerge --color=n from working
3 > correctly, and may also be problematic for accessibility.
4 >
5 > Signed-off-by: Ulrich Müller <ulm@g.o>
6 > ---
7 > eclass/git-r3.eclass | 18 +++++++++---------
8 > 1 file changed, 9 insertions(+), 9 deletions(-)
9 >
10 > diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
11 > index e0d2bbb5edc0..144236c6ac38 100644
12 > --- a/eclass/git-r3.eclass
13 > +++ b/eclass/git-r3.eclass
14 > @@ -227,19 +227,19 @@ _git-r3_env_setup() {
15 > ;;
16 > single)
17 > if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
18 > - einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
19 > + einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting"
20 > EGIT_CLONE_TYPE=single
21 > fi
22 > ;;
23 > single+tags)
24 > if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
25 > - einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
26 > + einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting"
27 > EGIT_CLONE_TYPE=single+tags
28 > fi
29 > ;;
30 > mirror)
31 > if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
32 > - einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
33 > + einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
34 > EGIT_CLONE_TYPE=mirror
35 > fi
36 > ;;
37 > @@ -439,7 +439,7 @@ _git-r3_set_submodules() {
38 > done
39 >
40 > if [[ ! ${res} ]]; then
41 > - einfo "Skipping submodule \e[1m${subname}\e[22m"
42 > + einfo "Skipping submodule ${subname}"
43 > continue
44 > fi
45 > fi
46 > @@ -658,7 +658,7 @@ git-r3_fetch() {
47 > fi
48 > for r in "${repos[@]}"; do
49 > if [[ ! ${EVCS_OFFLINE} ]]; then
50 > - einfo "Fetching \e[1m${r}\e[22m ..."
51 > + einfo "Fetching ${r} ..."
52 >
53 > local fetch_command=( git fetch "${r}" )
54 > local clone_type=${EGIT_CLONE_TYPE}
55 > @@ -892,7 +892,7 @@ git-r3_checkout() {
56 > local -x GIT_DIR
57 > _git-r3_set_gitdir "${repos[0]}"
58 >
59 > - einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
60 > + einfo "Checking out ${repos[0]} to ${out_dir} ..."
61 >
62 > if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
63 > die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
64 > @@ -1042,7 +1042,7 @@ git-r3_peek_remote_ref() {
65 >
66 > local r success
67 > for r in "${repos[@]}"; do
68 > - einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
69 > + einfo "Peeking ${remote_ref} on ${r} ..." >&2
70 >
71 > local lookup_ref
72 > if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
73 > @@ -1098,9 +1098,9 @@ git-r3_pkg_needrebuild() {
74 > [[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
75 >
76 > if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
77 > - einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
78 > + einfo "Update from ${EGIT_VERSION} to ${new_commit_id}"
79 > else
80 > - einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
81 > + einfo "Local and remote at ${EGIT_VERSION}"
82 > fi
83 >
84 > [[ ${EGIT_VERSION} != ${new_commit_id} ]]
85
86 Sure.
87
88 --
89 Best regards,
90 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature