Git::R...thSpec(3pm)

πŸ’– NAME πŸ’–

okay bestie, so Git::Raw::PathSpec β€” it's the Git pathspec class from the Git::Raw family. that's the whole name. short, sweet, iconic. we're in the Git::Raw::PathSpec manual page, and this is your girl explaining it, no cap. πŸ’…


✨ VERSION ✨

we're on version 0.90 β€” periodt. πŸŽ€


🌸 DESCRIPTION 🌸

so a Git::Raw::PathSpec represents a Git pathspec. that's it, that's the vibe. it's the object that holds your pathspec so you can throw it at repos and indexes and trees and diffs and see what hits. πŸ¦‹

⚠️ WARNING, bestie, listen up: the API of this module is unstable and may change without warning. like, any change will be appropriately documented in the changelog, so it's not chaos chaos, but still β€” do not build your whole personality around it. 😭

🌈 METHODS 🌈

πŸ’œ new( @paths )

compile a brand new pathspec, fresh out the box. ✨

  • @paths β€” the list of paths to match.
lowkey the docs also call this list @match in the description, even though the signature says @paths. both are floating around in there, iykyk. πŸ™ˆ

🧚 match( $object [, \%options] )

match the pathspec against $object. πŸ’₯ and $object can be any of these cuties, dependent on what you're matching against:

  • Git::Raw::Repository β€” matches against the working directory 🫢
  • Git::Raw::Index β€” matches against the index πŸŽ€
  • Git::Raw::Tree β€” matches against the tree 🌸
  • Git::Raw::Diff β€” matches against the diff πŸ’«

it returns a Git::Raw::PathSpec::MatchList object, and that's a whole other bestie to go meet.

the valid fields for %options are:

  • "flags" β€” the flags for the matches, bestie. the valid values include:
    • "ignore_case" β€” forces the match to ignore case. otherwise the match will use the native case sensitivity of the platform's filesystem. πŸ‘‘
    • "use_case" β€” forces a case sensitive match. otherwise the match will use the native case sensitivity of the platform's filesystem. πŸ”₯
    • "no_glob" β€” disables glob patterns and just uses simple string comparison for matching. no wildcards, just vibes. ✨
    • "no_match_error" β€” "math" should return an error code if no matches were found. πŸ’€
    • "find_failures" β€” record patterns that did not match. πŸ‘€
    • "failures_only" β€” only determine if there were patterns that did not match. that's the whole job. 🎯

πŸ‘‘ AUTHOR πŸ‘‘

the icons who made this:

  • Alessandro Ghedini <alexbio@cpan.org>
  • Jacques Germishuys <jacquesg@cpan.org>

give them their flowers. πŸ’


Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information. πŸ“œ


aaaaand that's a wrap, bestie!! 🌈✨ this page was brought to you by Git::R...thSpec from the User Contributed Perl Documentation, running on perl v5.42.3, dated 2026-08-19. slay, go match some paths, and remember: unstable API means stay flexible. πŸ«ΆπŸ’– periodt.

πŸ“¦ where this page comes from