Ubuntu

GREP_OPTIONS variable hinders interactive git-rebase functionality

Reported by Jeenu V on 2009-07-12
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-core (Ubuntu)
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 Edit Tag help
Anders Kaseorg (anders-kaseorg) 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.

Anders Kaseorg (anders-kaseorg) 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
Jeenu V (jeenuv) wrote :

Thanks for the update.

Anders Kaseorg (anders-kaseorg) 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  Edit
Everyone can see this information.

Other bug subscribers