{
    "content": [
        {
            "type": "text",
            "text": "# Git (man)\n\n## NAME\n\nGit - Perl interface to the Git version control system\n\n## SYNOPSIS\n\nuse Git;\nmy $version = Git::commandoneline('version');\ngitcmdtry { Git::commandnoisy('update-server-info') }\n'%s failed w/ code %d';\nmy $repo = Git->repository (Directory => '/srv/git/cogito.git');\nmy @revs = $repo->command('rev-list', '--since=last monday', '--all');\nmy ($fh, $c) = $repo->commandoutputpipe('rev-list', '--since=last monday', '--all');\nmy $lastrev = <$fh>; chomp $lastrev;\n$repo->commandclosepipe($fh, $c);\nmy $lastrev = $repo->commandoneline( [ 'rev-list', '--all' ],\nSTDERR => 0 );\nmy $sha1 = $repo->hashandinsertobject('file.txt');\nmy $tempfile = tempfile();\nmy $size = $repo->catblob($sha1, $tempfile);\n\n## DESCRIPTION\n\nThis module provides Perl scripts easy way to interface the Git version control system. The\nmodules have an easy and well-tested way to call arbitrary Git commands; in the future, the\ninterface will also provide specialized methods for doing easily operations which are not\ntotally trivial to do over the generic command interface.\n\n## TLDR\n\n> Distributed version control system.\n\n- Create an empty Git repository:\n  `git init`\n- Clone a remote Git repository from the internet:\n  `git clone {{https://example.com/repo.git}}`\n- View the status of the local repository:\n  `git status`\n- Stage all changes for a commit:\n  `git add {{-A|--all}}`\n- Commit changes to version history:\n  `git commit {{-m|--message}} {{message_text}}`\n- Push local commits to a remote repository:\n  `git push`\n- Pull any changes made to a remote:\n  `git pull`\n- Reset everything the way it was in the latest commit:\n  `git reset --hard; git clean {{-f|--force}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONSTRUCTORS**\n- **METHODS**\n- **ERROR HANDLING**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Git",
        "section": "",
        "mode": "man",
        "summary": "Git - Perl interface to the Git version control system",
        "synopsis": "use Git;\nmy $version = Git::commandoneline('version');\ngitcmdtry { Git::commandnoisy('update-server-info') }\n'%s failed w/ code %d';\nmy $repo = Git->repository (Directory => '/srv/git/cogito.git');\nmy @revs = $repo->command('rev-list', '--since=last monday', '--all');\nmy ($fh, $c) = $repo->commandoutputpipe('rev-list', '--since=last monday', '--all');\nmy $lastrev = <$fh>; chomp $lastrev;\n$repo->commandclosepipe($fh, $c);\nmy $lastrev = $repo->commandoneline( [ 'rev-list', '--all' ],\nSTDERR => 0 );\nmy $sha1 = $repo->hashandinsertobject('file.txt');\nmy $tempfile = tempfile();\nmy $size = $repo->catblob($sha1, $tempfile);",
        "tldr_summary": "Distributed version control system.",
        "tldr_examples": [
            {
                "description": "Create an empty Git repository",
                "command": "git init"
            },
            {
                "description": "Clone a remote Git repository from the internet",
                "command": "git clone {{https://example.com/repo.git}}"
            },
            {
                "description": "View the status of the local repository",
                "command": "git status"
            },
            {
                "description": "Stage all changes for a commit",
                "command": "git add {{-A|--all}}"
            },
            {
                "description": "Commit changes to version history",
                "command": "git commit {{-m|--message}} {{message_text}}"
            },
            {
                "description": "Push local commits to a remote repository",
                "command": "git push"
            },
            {
                "description": "Pull any changes made to a remote",
                "command": "git pull"
            },
            {
                "description": "Reset everything the way it was in the latest commit",
                "command": "git reset --hard; git clean {{-f|--force}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "CONSTRUCTORS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 368,
                "subsections": []
            },
            {
                "name": "ERROR HANDLING",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Git - Perl interface to the Git version control system\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Git;\n\nmy $version = Git::commandoneline('version');\n\ngitcmdtry { Git::commandnoisy('update-server-info') }\n'%s failed w/ code %d';\n\nmy $repo = Git->repository (Directory => '/srv/git/cogito.git');\n\nmy @revs = $repo->command('rev-list', '--since=last monday', '--all');\n\nmy ($fh, $c) = $repo->commandoutputpipe('rev-list', '--since=last monday', '--all');\nmy $lastrev = <$fh>; chomp $lastrev;\n$repo->commandclosepipe($fh, $c);\n\nmy $lastrev = $repo->commandoneline( [ 'rev-list', '--all' ],\nSTDERR => 0 );\n\nmy $sha1 = $repo->hashandinsertobject('file.txt');\nmy $tempfile = tempfile();\nmy $size = $repo->catblob($sha1, $tempfile);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides Perl scripts easy way to interface the Git version control system. The\nmodules have an easy and well-tested way to call arbitrary Git commands; in the future, the\ninterface will also provide specialized methods for doing easily operations which are not\ntotally trivial to do over the generic command interface.\n\nWhile some commands can be executed outside of any context (e.g. 'version' or 'init'), most\noperations require a repository context, which in practice means getting an instance of the\nGit object using the repository() constructor.  (In the future, we will also get a\nnewrepository() constructor.) All commands called as methods of the object are then executed\nin the context of the repository.\n\nPart of the \"repository state\" is also information about path to the attached working copy\n(unless you work with a bare repository). You can also navigate inside of the working copy\nusing the \"wcchdir()\" method. (Note that the repository object is self-contained and will\nnot change working directory of your process.)\n\nTODO: In the future, we might also do\n\nmy $remoterepo = $repo->remoterepository (Name => 'cogito', Branch => 'master');\n$remoterepo ||= Git->remoterepository ('http://git.or.cz/cogito.git/');\nmy @refs = $remoterepo->refs();\n\nCurrently, the module merely wraps calls to external Git tools. In the future, it will\nprovide a much faster way to interact with Git by linking directly to libgit. This should be\ncompletely opaque to the user, though (performance increase notwithstanding).\n",
                "subsections": []
            },
            "CONSTRUCTORS": {
                "content": "repository ( OPTIONS )\nrepository ( DIRECTORY )\nrepository ()\nConstruct a new repository object.  \"OPTIONS\" are passed in a hash like fashion, using\nkey and value pairs.  Possible options are:\n\nRepository - Path to the Git repository.\n\nWorkingCopy - Path to the associated working copy; not strictly required as many commands\nwill happily crunch on a bare repository.\n\nWorkingSubdir - Subdirectory in the working copy to work inside.  Just left undefined if\nyou do not want to limit the scope of operations.\n\nDirectory - Path to the Git working directory in its usual setup.  The \".git\" directory\nis searched in the directory and all the parent directories; if found, \"WorkingCopy\" is\nset to the directory containing it and \"Repository\" to the \".git\" directory itself. If no\n\".git\" directory was found, the \"Directory\" is assumed to be a bare repository,\n\"Repository\" is set to point at it and \"WorkingCopy\" is left undefined.  If the $GITDIR\nenvironment variable is set, things behave as expected as well.\n\nYou should not use both \"Directory\" and either of \"Repository\" and \"WorkingCopy\" - the\nresults of that are undefined.\n\nAlternatively, a directory path may be passed as a single scalar argument to the\nconstructor; it is equivalent to setting only the \"Directory\" option field.\n\nCalling the constructor with no options whatsoever is equivalent to calling it with\n\"Directory => '.'\". In general, if you are building a standard porcelain command, simply\ndoing \"Git->repository()\" should do the right thing and setup the object to reflect\nexactly where the user is right now.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "command ( COMMAND [, ARGUMENTS... ] )\ncommand ( [ COMMAND, ARGUMENTS... ], { Opt => Val ... } )\nExecute the given Git \"COMMAND\" (specify it without the 'git-' prefix), optionally with\nthe specified extra \"ARGUMENTS\".\n\nThe second more elaborate form can be used if you want to further adjust the command\nexecution. Currently, only one option is supported:\n\nSTDERR - How to deal with the command's error output. By default (\"undef\") it is\ndelivered to the caller's \"STDERR\". A false value (0 or '') will cause it to be thrown\naway. If you want to process it, you can get it in a filehandle you specify, but you must\nbe extremely careful; if the error output is not very short and you want to read it in\nthe same process as where you called \"command()\", you are set up for a nice deadlock!\n\nThe method can be called without any instance or on a specified Git repository (in that\ncase the command will be run in the repository context).\n\nIn scalar context, it returns all the command output in a single string (verbatim).\n\nIn array context, it returns an array containing lines printed to the command's stdout\n(without trailing newlines).\n\nIn both cases, the command's stdin and stderr are the same as the caller's.\n\ncommandoneline ( COMMAND [, ARGUMENTS... ] )\ncommandoneline ( [ COMMAND, ARGUMENTS... ], { Opt => Val ... } )\nExecute the given \"COMMAND\" in the same way as command() does but always return a scalar\nstring containing the first line of the command's standard output.\n\ncommandoutputpipe ( COMMAND [, ARGUMENTS... ] )\ncommandoutputpipe ( [ COMMAND, ARGUMENTS... ], { Opt => Val ... } )\nExecute the given \"COMMAND\" in the same way as command() does but return a pipe\nfilehandle from which the command output can be read.\n\nThe function can return \"($pipe, $ctx)\" in array context.  See \"commandclosepipe()\" for\ndetails.\n\ncommandinputpipe ( COMMAND [, ARGUMENTS... ] )\ncommandinputpipe ( [ COMMAND, ARGUMENTS... ], { Opt => Val ... } )\nExecute the given \"COMMAND\" in the same way as commandoutputpipe() does but return an\ninput pipe filehandle instead; the command output is not captured.\n\nThe function can return \"($pipe, $ctx)\" in array context.  See \"commandclosepipe()\" for\ndetails.\n\ncommandclosepipe ( PIPE [, CTX ] )\nClose the \"PIPE\" as returned from \"command*pipe()\", checking whether the command\nfinished successfully. The optional \"CTX\" argument is required if you want to see the\ncommand name in the error message, and it is the second value returned by\n\"command*pipe()\" when called in array context. The call idiom is:\n\nmy ($fh, $ctx) = $r->commandoutputpipe('status');\nwhile (<$fh>) { ... }\n$r->commandclosepipe($fh, $ctx);\n\nNote that you should not rely on whatever actually is in \"CTX\"; currently it is simply\nthe command name but in future the context might have more complicated structure.\n\ncommandbidipipe ( COMMAND [, ARGUMENTS... ] )\nExecute the given \"COMMAND\" in the same way as commandoutputpipe() does but return both\nan input pipe filehandle and an output pipe filehandle.\n\nThe function will return \"($pid, $pipein, $pipeout, $ctx)\".  See\n\"commandclosebidipipe()\" for details.\n\ncommandclosebidipipe ( PID, PIPEIN, PIPEOUT [, CTX] )\nClose the \"PIPEIN\" and \"PIPEOUT\" as returned from \"commandbidipipe()\", checking\nwhether the command finished successfully. The optional \"CTX\" argument is required if you\nwant to see the command name in the error message, and it is the fourth value returned by\n\"commandbidipipe()\".  The call idiom is:\n\nmy ($pid, $in, $out, $ctx) = $r->commandbidipipe('cat-file --batch-check');\nprint $out \"000000000\\n\";\nwhile (<$in>) { ... }\n$r->commandclosebidipipe($pid, $in, $out, $ctx);\n\nNote that you should not rely on whatever actually is in \"CTX\"; currently it is simply\nthe command name but in future the context might have more complicated structure.\n\n\"PIPEIN\" and \"PIPEOUT\" may be \"undef\" if they have been closed prior to calling this\nfunction.  This may be useful in a query-response type of commands where caller first\nwrites a query and later reads response, eg:\n\nmy ($pid, $in, $out, $ctx) = $r->commandbidipipe('cat-file --batch-check');\nprint $out \"000000000\\n\";\nclose $out;\nwhile (<$in>) { ... }\n$r->commandclosebidipipe($pid, $in, undef, $ctx);\n\nThis idiom may prevent potential dead locks caused by data sent to the output pipe not\nbeing flushed and thus not reaching the executed command.\n\ncommandnoisy ( COMMAND [, ARGUMENTS... ] )\nExecute the given \"COMMAND\" in the same way as command() does but do not capture the\ncommand output - the standard output is not redirected and goes to the standard output of\nthe caller application.\n\nWhile the method is called commandnoisy(), you might want to as well use it for the most\nsilent Git commands which you know will never pollute your stdout but you want to avoid\nthe overhead of the pipe setup when calling them.\n\nThe function returns only after the command has finished running.\n\nversion ()\nReturn the Git version in use.\n\nexecpath ()\nReturn path to the Git sub-command executables (the same as \"git --exec-path\"). Useful\nmostly only internally.\n\nhtmlpath ()\nReturn path to the Git html documentation (the same as \"git --html-path\"). Useful mostly\nonly internally.\n\ngettzoffset ( TIME )\nReturn the time zone offset from GMT in the form +/-HHMM where HH is the number of hours\nfrom GMT and MM is the number of minutes.  This is the equivalent of what strftime(\"%z\",\n...) would provide on a GNU platform.\n\nIf TIME is not supplied, the current local time is used.\n\ngetrecord ( FILEHANDLE, INPUTRECORDSEPARATOR )\nRead one record from FILEHANDLE delimited by INPUTRECORDSEPARATOR, removing any\ntrailing INPUTRECORDSEPARATOR.\n\nprompt ( PROMPT , ISPASSWORD  )\nQuery user \"PROMPT\" and return answer from user.\n\nHonours GITASKPASS and SSHASKPASS environment variables for querying the user. If no\n*ASKPASS variable is set or an error occurred, the terminal is tried as a fallback.  If\n\"ISPASSWORD\" is set and true, the terminal disables echo.\n\nrepopath ()\nReturn path to the git repository. Must be called on a repository instance.\n\nwcpath ()\nReturn path to the working copy. Must be called on a repository instance.\n\nwcsubdir ()\nReturn path to the subdirectory inside of a working copy. Must be called on a repository\ninstance.\n\nwcchdir ( SUBDIR )\nChange the working copy subdirectory to work within. The \"SUBDIR\" is relative to the\nworking copy root directory (not the current subdirectory).  Must be called on a\nrepository instance attached to a working copy and the directory must exist.\n\nconfig ( VARIABLE )\nRetrieve the configuration \"VARIABLE\" in the same manner as \"config\" does. In scalar\ncontext requires the variable to be set only one time (exception is thrown otherwise), in\narray context returns allows the variable to be set multiple times and returns all the\nvalues.\n\nconfigbool ( VARIABLE )\nRetrieve the bool configuration \"VARIABLE\". The return value is usable as a boolean in\nperl (and \"undef\" if it's not defined, of course).\n\nconfigpath ( VARIABLE )\nRetrieve the path configuration \"VARIABLE\". The return value is an expanded path or\n\"undef\" if it's not defined.\n\nconfigint ( VARIABLE )\nRetrieve the integer configuration \"VARIABLE\". The return value is simple decimal number.\nAn optional value suffix of 'k', 'm', or 'g' in the config file will cause the value to\nbe multiplied by 1024, 1048576 (1024^2), or 1073741824 (1024^3) prior to output.  It\nwould return \"undef\" if configuration variable is not defined.\n\nconfigregexp ( RE )\nRetrieve the list of configuration key names matching the regular expression \"RE\". The\nreturn value is a list of strings matching this regex.\n\ngetcolorbool ( NAME )\nFinds if color should be used for NAMEd operation from the configuration, and returns\nboolean (true for \"use color\", false for \"do not use color\").\n\ngetcolor ( SLOT, COLOR )\nFinds color for SLOT from the configuration, while defaulting to COLOR, and returns the\nANSI color escape sequence:\n\nprint $repo->getcolor(\"color.interactive.prompt\", \"underline blue white\");\nprint \"some text\";\nprint $repo->getcolor(\"\", \"normal\");\n\nremoterefs ( REPOSITORY [, GROUPS [, REFGLOBS ] ] )\nThis function returns a hashref of refs stored in a given remote repository.  The hash is\nin the format \"refname =\\\" hash>. For tags, the \"refname\" entry contains the tag object\nwhile a \"refname^{}\" entry gives the tagged objects.\n\n\"REPOSITORY\" has the same meaning as the appropriate \"git-ls-remote\" argument; either a\nURL or a remote name (if called on a repository instance).  \"GROUPS\" is an optional\narrayref that can contain 'tags' to return all the tags and/or 'heads' to return all the\nheads. \"REFGLOB\" is an optional array of strings containing a shell-like glob to further\nlimit the refs returned in the hash; the meaning is again the same as the appropriate\n\"git-ls-remote\" argument.\n\nThis function may or may not be called on a repository instance. In the former case,\nremote names as defined in the repository are recognized as repository specifiers.\n\nident ( TYPE | IDENTSTR )\nidentperson ( TYPE | IDENTSTR | IDENTARRAY )\nThis suite of functions retrieves and parses ident information, as stored in the commit\nand tag objects or produced by \"var GITtypeIDENT\" (thus \"TYPE\" can be either author or\ncommitter; case is insignificant).\n\nThe \"ident\" method retrieves the ident information from \"git var\" and either returns it\nas a scalar string or as an array with the fields parsed.  Alternatively, it can take a\nprepared ident string (e.g. from the commit object) and just parse it.\n\n\"identperson\" returns the person part of the ident - name and email; it can take the\nsame arguments as \"ident\" or the array returned by \"ident\".\n\nThe synopsis is like:\n\nmy ($name, $email, $timetz) = ident('author');\n\"$name <$email>\" eq identperson('author');\n\"$name <$email>\" eq identperson($name);\n$timetz =~ /^\\d+ [+-]\\d{4}$/;\n\nhashobject ( TYPE, FILENAME )\nCompute the SHA1 object id of the given \"FILENAME\" considering it is of the \"TYPE\" object\ntype (\"blob\", \"commit\", \"tree\").\n\nThe method can be called without any instance or on a specified Git repository, it makes\nzero difference.\n\nThe function returns the SHA1 hash.\n\nhashandinsertobject ( FILENAME )\nCompute the SHA1 object id of the given \"FILENAME\" and add the object to the object\ndatabase.\n\nThe function returns the SHA1 hash.\n\ncatblob ( SHA1, FILEHANDLE )\nPrints the contents of the blob identified by \"SHA1\" to \"FILEHANDLE\" and returns the\nnumber of bytes printed.\n\ncredentialread( FILEHANDLE )\nReads credential key-value pairs from \"FILEHANDLE\".  Reading stops at EOF or when an\nempty line is encountered.  Each line must be of the form \"key=value\" with a non-empty\nkey.  Function returns hash with all read values.  Any white space (other than new-line\ncharacter) is preserved.\n\ncredentialwrite( FILEHANDLE, CREDENTIALHASHREF )\nWrites credential key-value pairs from hash referenced by \"CREDENTIALHASHREF\" to\n\"FILEHANDLE\".  Keys and values cannot contain new-lines or NUL bytes characters, and key\ncannot contain equal signs nor be empty (if they do Error::Simple is thrown).  Any white\nspace is preserved.  If value for a key is \"undef\", it will be skipped.\n\nIf 'url' key exists it will be written first.  (All the other key-value pairs are written\nin sorted order but you should not depend on that).  Once all lines are written, an empty\nline is printed.\n\ncredential( CREDENTIALHASHREF [, OPERATION ] )\ncredential( CREDENTIALHASHREF, CODE )\nExecutes \"git credential\" for a given set of credentials and specified operation.  In\nboth forms \"CREDENTIALHASHREF\" needs to be a reference to a hash which stores\ncredentials.  Under certain conditions the hash can change.\n\nIn the first form, \"OPERATION\" can be 'fill', 'approve' or 'reject', and function will\nexecute corresponding \"git credential\" sub-command.  If it's omitted 'fill' is assumed.\nIn case of 'fill' the values stored in \"CREDENTIALHASHREF\" will be changed to the ones\nreturned by the \"git credential fill\" command.  The usual usage would look something\nlike:\n\nmy %cred = (\n'protocol' => 'https',\n'host' => 'example.com',\n'username' => 'bob'\n);\nGit::credential \\%cred;\nif (trytoauthenticate($cred{'username'}, $cred{'password'})) {\nGit::credential \\%cred, 'approve';\n... do more stuff ...\n} else {\nGit::credential \\%cred, 'reject';\n}\n\nIn the second form, \"CODE\" needs to be a reference to a subroutine.  The function will\nexecute \"git credential fill\" to fill the provided credential hash, then call \"CODE\" with\n\"CREDENTIALHASHREF\" as the sole argument.  If \"CODE\"'s return value is defined, the\nfunction will execute \"git credential approve\" (if return value yields true) or \"git\ncredential reject\" (if return value is false).  If the return value is undef, nothing at\nall is executed; this is useful, for example, if the credential could neither be verified\nnor rejected due to an unrelated network error.  The return value is the same as what\n\"CODE\" returns.  With this form, the usage might look as follows:\n\nif (Git::credential {\n'protocol' => 'https',\n'host' => 'example.com',\n'username' => 'bob'\n}, sub {\nmy $cred = shift;\nreturn !!trytoauthenticate($cred->{'username'},\n$cred->{'password'});\n}) {\n... do more stuff ...\n}\n\ntempacquire ( NAME )\nAttempts to retrieve the temporary file mapped to the string \"NAME\". If an associated\ntemp file has not been created this session or was closed, it is created, cached, and set\nfor autoflush and binmode.\n\nInternally locks the file mapped to \"NAME\". This lock must be released with\n\"temprelease()\" when the temp file is no longer needed. Subsequent attempts to retrieve\ntemporary files mapped to the same \"NAME\" while still locked will cause an error. This\nlocking mechanism provides a weak guarantee and is not threadsafe. It does provide some\nerror checking to help prevent temp file refs writing over one another.\n\nIn general, the File::Handle returned should not be closed by consumers as it defeats the\npurpose of this caching mechanism. If you need to close the temp file handle, then you\nshould use File::Temp or another temp file faculty directly. If a handle is closed and\nthen requested again, then a warning will issue.\n\ntempislocked ( NAME )\nReturns true if the internal lock created by a previous \"tempacquire()\" call with \"NAME\"\nis still in effect.\n\nWhen tempacquire is called on a \"NAME\", it internally locks the temporary file mapped to\n\"NAME\".  That lock will not be released until \"temprelease()\" is called with either the\noriginal \"NAME\" or the File::Handle that was returned from the original call to\ntempacquire.\n\nSubsequent attempts to call \"tempacquire()\" with the same \"NAME\" will fail unless there\nhas been an intervening \"temprelease()\" call for that \"NAME\" (or its corresponding\nFile::Handle that was returned by the original \"tempacquire()\" call).\n\nIf true is returned by \"tempislocked()\" for a \"NAME\", an attempt to \"tempacquire()\"\nthe same \"NAME\" will cause an error unless \"temprelease\" is first called on that \"NAME\"\n(or its corresponding File::Handle that was returned by the original \"tempacquire()\"\ncall).\n\ntemprelease ( NAME )\ntemprelease ( FILEHANDLE )\nReleases a lock acquired through \"tempacquire()\". Can be called either with the \"NAME\"\nmapping used when acquiring the temp file or with the \"FILEHANDLE\" referencing a locked\ntemp file.\n\nWarns if an attempt is made to release a file that is not locked.\n\nThe temp file will be truncated before being released. This can help to reduce disk I/O\nwhere the system is smart enough to detect the truncation while data is in the output\nbuffers. Beware that after the temp file is released and truncated, any operations on\nthat file may fail miserably until it is re-acquired. All contents are lost between each\nrelease and acquire mapped to the same string.\n\ntempreset ( FILEHANDLE )\nTruncates and resets the position of the \"FILEHANDLE\".\n\ntemppath ( NAME )\ntemppath ( FILEHANDLE )\nReturns the filename associated with the given tempfile.\n\nprefixlines ( PREFIX, STRING [, STRING... ])\nPrefixes lines in \"STRING\" with \"PREFIX\".\n\nunquotepath ( PATH )\nUnquote a quoted path containing c-escapes as returned by ls-files etc.  when not using\n-z or when parsing the output of diff -u.\n\ngetcommentlinechar ( )\nGets the core.commentchar configuration value.  The value falls-back to '#' if\ncore.commentchar is set to 'auto'.\n\ncommentlines ( STRING [, STRING... ])\nComments lines following core.commentchar configuration.\n",
                "subsections": []
            },
            "ERROR HANDLING": {
                "content": "All functions are supposed to throw Perl exceptions in case of errors.  See the Error module\non how to catch those. Most exceptions are mere Error::Simple instances.\n\nHowever, the \"command()\", \"commandoneline()\" and \"commandnoisy()\" functions suite can throw\n\"Git::Error::Command\" exceptions as well: those are thrown when the external command returns\nan error code and contain the error code as well as access to the captured command's output.\nThe exception class provides the usual \"stringify\" and \"value\" (command's exit code) methods\nand in addition also a \"cmdoutput\" method that returns either an array or a string with the\ncaptured command output (depending on the original function call context; \"commandnoisy()\"\nreturns \"undef\") and $<cmdline> which returns the command and its arguments (but without\nproper quoting).\n\nNote that the \"command*pipe()\" functions cannot throw this exception since it has no idea\nwhether the command failed or not. You will only find out at the time you \"close\" the pipe;\nif you want to have that automated, use \"commandclosepipe()\", which can throw the\nexception.\n\ngitcmdtry { CODE } ERRMSG\nThis magical statement will automatically catch any \"Git::Error::Command\" exceptions\nthrown by \"CODE\" and make your program die with \"ERRMSG\" on its lips; the message will\nhave %s substituted for the command line and %d for the exit status. This statement is\nuseful mostly for producing more user-friendly error messages.\n\nIn case of no exception caught the statement returns \"CODE\"'s return value.\n\nNote that this is the only auto-exported function.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2006 by Petr Baudis <pasky@suse.cz>.\n\nThis module is free software; it may be used, copied, modified and distributed under the\nterms of the GNU General Public Licence, either version 2, or (at your option) any later\nversion.\n\nperl v5.34.0                                2026-02-26                                     Git(3)",
                "subsections": []
            }
        }
    }
}