Re: fatal: git grep: cannot generate relative filenames containing '..'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Or perhaps someone did more than two years ago with --full-name?

Thank you for pointing that out!  It's a bit of a handful to type,
but at least it makes what I want to do possible without having to
write a wrapper script.  And I can reduce the typing with an alias.

I'm still trying to figure out why the basic form doesn't work,
though.  Is there something more subtle than that fact that the
filename simplification in grep_sha1 and grep_file might do the
wrong thing?  If I comment out the check in cmd_grep(), it seems
to work, although it prints out some funky filenames.

That seems like a straightforward thing to fix.  Basically, strip
off the common part of the prefix and name, and for every remaining
component in the prefix, prepend a ../ to the name.

I don't mind doing the coding, but can someone who groks the
code more fully tell me if I'm missing something major?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux