author | Eric Wong <normalperson@yhbt.net> | |
Sun, 29 Mar 2009 05:10:08 +0000 (22:10 -0700) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Sun, 29 Mar 2009 06:00:05 +0000 (23:00 -0700) | ||
commit | 4f821012c3feb7c0a36be3849e971fbeff4fbc3b | |
tree | eac92ce2407d6c3129c053ac52ff7b71890a0b99 | tree | snapshot |
parent | b0085a716770d9d2876edd74c6119c48d9d6f232 | commit | diff |
git-svn: fix ls-tree usage with dash-prefixed paths
To find the blob object name given a tree and pathname, we were
incorrectly calling "git ls-tree" with a "--" argument followed
by the pathname of the file we wanted to get.
git ls-tree <TREE> -- --dashed/path/name.c
Unlike many command-line interfaces, the "--" alone does not
symbolize the end of non-option arguments on the command-line.
ls-tree interprets the "--" as a prefix to match against, thus
the entire contents of the --dashed/* hierarchy would be
returned because the "--" matches "--dashed" and every path
under it.
Thanks to Anton Gyllenberg for pointing me toward the
Twisted repository as a real-world example of this case.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
To find the blob object name given a tree and pathname, we were
incorrectly calling "git ls-tree" with a "--" argument followed
by the pathname of the file we wanted to get.
git ls-tree <TREE> -- --dashed/path/name.c
Unlike many command-line interfaces, the "--" alone does not
symbolize the end of non-option arguments on the command-line.
ls-tree interprets the "--" as a prefix to match against, thus
the entire contents of the --dashed/* hierarchy would be
returned because the "--" matches "--dashed" and every path
under it.
Thanks to Anton Gyllenberg for pointing me toward the
Twisted repository as a real-world example of this case.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | diff | blob | history |