[racket-dev] [racket-bug] all/11365: syntax definitions in interactions -- namespace mismatch: errortrace-key

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Nov 1 17:30:43 EDT 2010

Two hours ago, Stevie Strickland wrote:
> 
> Just tried it two ways: launching directly from the Dock and by
> finding the .app package in the Finder and launching it there.  Both
> ways failed to pick up the git information.  Feel free to drop by my
> desk to try things.

As almost expected now, this turned out to be a result of the fact
that OSX ignores your environment scripts when you run stuff from the
Finder.  I solved this by adding two things:

* If it's OSX, and no `git' was found in the path, then try
  "/opt/local/bin/git".  This looks like the common place to get it
  installed on OSX (please correct me if it's wrong).

* If no `git' executable was found, try to see if there's a toplevel
  ".git/HEAD" file, and if it leads to a SHA1 (usually it's a symbolic
  reference to a branch file with the SHA1).  (This should cover
  almost all cases -- it could break since git makes it possible to
  have the git tree be in a different place, but there's no git
  command to run to do this accurately.)

I also added a comment to the file that explains the string.

(Note: git does have a $Id$ facility, but that inserts the SHA1 of the
containing file -- that's a constant checksum that depends only on the
file contents, and therefore it is useless in identifying the actual
revision that was used.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.