Thread (37 messages) flat view 37 messages, 5 authors, 2016-06-15

Re: [regression?] trailing slash required in .gitattributes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:29

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] writes:
  if (pathlen && pathname[pathlen-1] == '/')
          pathlen--;

would work. But it seems that match_basename, despite taking the length
of all of the strings we pass it, will happily use NUL-terminated
functions like strcmp or fnmatch. Converting the former to check lengths
should be pretty straightforward. But there is no version of fnmatch
that does what we want. I wonder if we using wildmatch can get around
this limitation.
Or save away pathname[pathlen], temporarily NUL terminate and call
these functions?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help