Skip to content

Instantly share code, notes, and snippets.

@jperkin
Created September 17, 2012 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jperkin/3736970 to your computer and use it in GitHub Desktop.
Save jperkin/3736970 to your computer and use it in GitHub Desktop.
If the git authors designed ping...
UPDATE: Solved, looks like a bug in the version of 'git' distributed with OSX Lion.
# OSX Lion version exhibits the problem
$ /usr/bin/git version
git version 1.7.7.5 (Apple Git-26)
# pkgsrc version does not
$ /usr/pkg/bin/git version
git version 1.7.10.5
SUMMARY: Use my OSX Lion packages :)
http://www.perkin.org.uk/posts/7000-packages-for-osx-lion.html
Original issue below:
Let's start with the status
$ git status
# On branch joyent_gccruntime
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# math/pspp/patches/
nothing added to commit but untracked files present (use "git add" to track)
That directory should not be listed, it hasn't changed in a long time. It contains the files I expect it to:
$ ls -1 math/pspp/patches/
patch-aa
patch-ad
patch-lib_gtksheet_gtkitementry.c
Not that I expect this to fix it, but let's try 'git add' and see what changes.
$ git add math/pspp/patches/
<no output>
$ git status
# On branch joyent_gccruntime
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# math/pspp/patches/
nothing added to commit but untracked files present (use "git add" to track)
Nothing. Weird. Ok, so let's rm the directory, and see what happens then..
$ rm -rf math/pspp/patches/
$ git status
# On branch joyent_gccruntime
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: math/pspp/patches/patch-aa
# deleted: math/pspp/patches/patch-ad
# deleted: math/pspp/patches/patch-lib_gtksheet_gtkitementry.c
So, git is clearly aware of these files, but I don't want to delete them. Let's get them back..
$ git checkout -- math/pspp/patches
Did that fix it? No.
$ git status
# On branch joyent_gccruntime
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# math/pspp/patches/
nothing added to commit but untracked files present (use "git add" to track)
I've tried various combinations of reset, checkout, all to no avail. Clues?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment