Skip to content

Commit

Permalink
Merge branch 'rs/leave-base-name-in-name-field-of-tar' into maint
Browse files Browse the repository at this point in the history
A tar archive created by "git archive" recorded a directory in a
way that made NetBSD's implementation of "tar" sometimes unhappy.

* rs/leave-base-name-in-name-field-of-tar:
  archive-tar: split long paths more carefully
  • Loading branch information
gitster committed Jan 14, 2013
2 parents 32e820b + 22f0dcd commit f0c103b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions archive-tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ static unsigned int ustar_header_chksum(const struct ustar_header *header)
static size_t get_path_prefix(const char *path, size_t pathlen, size_t maxlen)
{
size_t i = pathlen;
if (i > 1 && path[i - 1] == '/')
i--;
if (i > maxlen)
i = maxlen;
do {
Expand Down

0 comments on commit f0c103b

Please sign in to comment.