GREP_OPTIONS variable hinders interactive git-rebase functionality

Bug #398393 reported by Jeenu V
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-core (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I get the following error when running interactive git mergebase:

/usr/lib/git-core/git-rebase--interactive: 1: arithmetic expression: expecting ')': "(standard input):1+(standard input):2"

I'm sure that's because I've GREP_OPTIONS environment variable exported, and contain the value: "-nHI --exclude=\*.svn-base". Thus grep results obtained by "/usr/lib/git-core/git-rebase--interactive" script differs from standard grep output. The solution would be that /usr/lib/git-core/git-rebase--interactive should always invoke grep as: "GREP_OPTIONS= grep"

Description: Ubuntu 9.04
Release: 9.04

git-core:
  Installed: 1:1.6.0.4-1ubuntu2
  Candidate: 1:1.6.0.4-1ubuntu2
  Version table:
 *** 1:1.6.0.4-1ubuntu2 0
        500 http://in.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Tags: git
Revision history for this message
Anders Kaseorg (andersk) wrote :

Instead of setting GREP_OPTIONS in your dotfiles, I recommend setting an alias in your ~/.bashrc:
  alias grep='grep -nHI --exclude=\*.svn-base'
since aliases do not propagate into other scripts.

A patch to sanitize GREP_OPTIONS appeared a little while ago on the upstream mailing list, but so far it has not been committed:
  http://article.gmane.org/gmane.comp.version-control.git/127980
If you still think this is a bug, I recommend following up with upstream.

Revision history for this message
Anders Kaseorg (andersk) wrote :

This is now fixed upstream in Git 1.6.5.5.
http://git.kernel.org/?p=git/git.git;a=commitdiff;h=e1622bfcbad680225ad5c337e4778df88389227e

Git 1.6.5.5 will probably make its way into Debian soon and Lucid soon after that. You can also get current Git packages for all versions of Ubuntu here:
https://launchpad.net/~git-core/+archive/ppa

Changed in git-core (Ubuntu):
status: New → In Progress
Revision history for this message
Jeenu V (jeenuv) wrote :

Thanks for the update.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Fixed in Lucid’s git-core 1:1.7.0-1.

Changed in git-core (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.