diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-20 16:13:16 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-20 16:13:16 -0800 |
commit | 9e7bd0110b41f9bb16377e322300629f8c4d6c12 (patch) | |
tree | daf39390f7fcc9436ad3c8e9565ac9092f36ab9d /builtin-blame.c | |
parent | 23f12912d1b6c608a7418d242e257b7239861f61 (diff) | |
parent | 744dacd3f5045240a304e687f3ef7135398e7865 (diff) | |
download | git-9e7bd0110b41f9bb16377e322300629f8c4d6c12.tar.gz |
Merge branch 'jc/setup'
* jc/setup:
builtin-mv: minimum fix to avoid losing files
git-add: adjust to the get_pathspec() changes.
Make blame accept absolute paths
setup: sanitize absolute and funny paths in get_pathspec()
Diffstat (limited to 'builtin-blame.c')
-rw-r--r-- | builtin-blame.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-blame.c b/builtin-blame.c index 2d4a3e1500..59d7237f21 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -1894,9 +1894,7 @@ static unsigned parse_score(const char *arg) static const char *add_prefix(const char *prefix, const char *path) { - if (!prefix || !prefix[0]) - return path; - return prefix_path(prefix, strlen(prefix), path); + return prefix_path(prefix, prefix ? strlen(prefix) : 0, path); } /* |