Package: git-extras
Version: 3.0.0-1
Severity: normal
Tags: patch upstream

The programs installed by ‘git-extras’ all set the ‘GREP_OPTIONS’
environment variable.

This is deprecated since GNU grep version 2.21:

    GREP_OPTIONS
        This variable specifies default options to be placed in front
        of any explicit options. As this causes problems when writing
        portable scripts, this feature will be removed in a future
        release of grep, and grep warns if it is used. Please use an
        alias or script instead. 

    
<URL:https://web.archive.org/web/20141124175547/http://www.gnu.org/software/grep/manual/grep.html#Environment-Variables>

The usage in ‘git-extras’ is explicitly described to “reset” the
environment variable.

Setting the environment variable to any value, even the empty string,
triggers a deprecation warning every time ‘grep’ is run.

This should instead be done with the shell's ‘unset’ command. That
will remove the variable from the environment, and avoid the
deprecation warning.

Attached is a patch that fixes the problem.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_AU.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages git-extras depends on:
ii  git  1:2.6.2-1

git-extras recommends no packages.

git-extras suggests no packages.

-- no debconf information

-- 
 \     “You don't need a book of any description to help you have some |
  `\    kind of moral awareness.” —Dr. Francesca Stavrakoloulou, bible |
_o__)                                              scholar, 2011-05-08 |
Ben Finney <b...@benfinney.id.au>
diff --git a/helper/reset-env b/helper/reset-env
index bef6bf9..11fc61c 100644
--- a/helper/reset-env
+++ b/helper/reset-env
@@ -1,2 +1,2 @@
 # reset environment variables that could interfere with normal usage
-export GREP_OPTIONS=
+unset GREP_OPTIONS

Attachment: signature.asc
Description: PGP signature

Reply via email to