Git - gitremote-helpers Documentation (2024)

Commands are given by the caller on the helper’s standard input, one per line.

capabilities

Lists the capabilities of the helper, one per line, endingwith a blank line. Each capability may be preceded with *,which marks them mandatory for Git versions using the remotehelper to understand. Any unknown mandatory capability is afatal error.

Support for this command is mandatory.

list

Lists the refs, one per line, in the format "<value> <name>[<attr> …​]". The value may be a hex sha1 hash, "@<dest>" fora symref, ":<keyword> <value>" for a key-value pair, or"?" to indicate that the helper could not get the value of theref. A space-separated list of attributes follows the name;unrecognized attributes are ignored. The list ends with ablank line.

See REF LIST ATTRIBUTES for a list of currently defined attributes.See REF LIST KEYWORDS for a list of currently defined keywords.

Supported if the helper has the "fetch" or "import" capability.

list for-push

Similar to list, except that it is used if and only ifthe caller wants to the resulting ref list to preparepush commands.A helper supporting both push and fetch can use thisto distinguish for which operation the output of listis going to be used, possibly reducing the amountof work that needs to be performed.

Supported if the helper has the "push" or "export" capability.

option <name> <value>

Sets the transport helper option <name> to <value>. Outputs asingle line containing one of ok (option successfully set),unsupported (option not recognized) or error <msg>(option <name> is supported but <value> is not validfor it). Options should be set before other commands,and may influence the behavior of those commands.

See OPTIONS for a list of currently defined options.

Supported if the helper has the "option" capability.

fetch <sha1> <name>

Fetches the given object, writing the necessary objectsto the database. Fetch commands are sent in a batch, oneper line, terminated with a blank line.Outputs a single blank line when all fetch commands in thesame batch are complete. Only objects which were reportedin the output of list with a sha1 may be fetched this way.

Optionally may output a lock <file> line indicating the full path ofa file under $GIT_DIR/objects/pack which is keeping a pack untilrefs can be suitably updated. The path must end with .keep. This isa mechanism to name a <pack,idx,keep> tuple by giving only the keepcomponent. The kept pack will not be deleted by a concurrent repack,even though its objects may not be referenced until the fetch completes.The .keep file will be deleted at the conclusion of the fetch.

If option check-connectivity is requested, the helper must outputconnectivity-ok if the clone is self-contained and connected.

Supported if the helper has the "fetch" capability.

push +<src>:<dst>

Pushes the given local <src> commit or branch to theremote branch described by <dst>. A batch sequence ofone or more push commands is terminated with a blank line(if there is only one reference to push, a single push commandis followed by a blank line). For example, the following wouldbe two batches of push, the first asking the remote-helperto push the local ref master to the remote ref master andthe local HEAD to the remote branch, and the secondasking to push ref foo to ref bar (forced update requestedby the +).

push refs/heads/master:refs/heads/masterpush HEAD:refs/heads/branch\npush +refs/heads/foo:refs/heads/bar\n

Zero or more protocol options may be entered after the last pushcommand, before the batch’s terminating blank line.

When the push is complete, outputs one or more ok <dst> orerror <dst> <why>? lines to indicate success or failure ofeach pushed ref. The status report output is terminated bya blank line. The option field <why> may be quoted in a Cstyle string if it contains an LF.

Supported if the helper has the "push" capability.

import <name>

Produces a fast-import stream which imports the current valueof the named ref. It may additionally import other refs asneeded to construct the history efficiently. The script writesto a helper-specific private namespace. The value of the namedref should be written to a location in this namespace derivedby applying the refspecs from the "refspec" capability to thename of the ref.

Especially useful for interoperability with a foreign versioningsystem.

Just like push, a batch sequence of one or more import isterminated with a blank line. For each batch of import, the remotehelper should produce a fast-import stream terminated by a donecommand.

Note that if the bidi-import capability is used the complete batchsequence has to be buffered before starting to send data to fast-importto prevent mixing of commands and fast-import responses on the helper’sstdin.

Supported if the helper has the "import" capability.

export

Instructs the remote helper that any subsequent input ispart of a fast-import stream (generated by git fast-export)containing objects which should be pushed to the remote.

Especially useful for interoperability with a foreign versioningsystem.

The export-marks and import-marks capabilities, if specified,affect this command in so far as they are passed on to gitfast-export, which then will load/store a table of marks forlocal objects. This can be used to implement for incrementaloperations.

Supported if the helper has the "export" capability.

connect <service>

Connects to given service. Standard input and standard outputof helper are connected to specified service (git prefix isincluded in service name so e.g. fetching uses git-upload-packas service) on remote side. Valid replies to this command areempty line (connection established), fallback (no smarttransport support, fall back to dumb transports) and justexiting with error message printed (can’t connect, don’tbother trying to fall back). After line feed terminating thepositive (empty) response, the output of service starts. Afterthe connection ends, the remote helper exits.

Supported if the helper has the "connect" capability.

stateless-connect <service>

Experimental; for internal use only.Connects to the given remote service for communication usinggit’s wire-protocol version 2. Valid replies to this commandare empty line (connection established), fallback (no smarttransport support, fall back to dumb transports) and justexiting with error message printed (can’t connect, don’t bothertrying to fall back). After line feed terminating the positive(empty) response, the output of the service starts. Messages(both request and response) must consist of zero or morePKT-LINEs, terminating in a flush packet. Response messages willthen have a response end packet after the flush packet toindicate the end of a response. The client must notexpect the server to store any state in between request-responsepairs. After the connection ends, the remote helper exits.

Supported if the helper has the "stateless-connect" capability.

get <uri> <path>

Downloads the file from the given <uri> to the given <path>. If<path>.temp exists, then Git assumes that the .temp file is apartial download from a previous attempt and will resume thedownload from that position.

If a fatal error occurs, the program writes the error message tostderr and exits. The caller should expect that a suitable errormessage has been printed if the child closes the connection withoutcompleting a valid response for the current command.

Additional commands may be supported, as may be determined fromcapabilities reported by the helper.

Git - gitremote-helpers Documentation (2024)

References

Top Articles
Control Tutorials for MATLAB and Simulink
Control Tutorials for MATLAB and Simulink
Why Are Fuel Leaks A Problem Aceable
Sprinter Tyrone's Unblocked Games
Obor Guide Osrs
Retro Ride Teardrop
His Lost Lycan Luna Chapter 5
Snarky Tea Net Worth 2022
Fallout 4 Pipboy Upgrades
Www.paystubportal.com/7-11 Login
Sitcoms Online Message Board
Phillies Espn Schedule
Knaben Pirate Download
Med First James City
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
Notisabelrenu
Job Shop Hearthside Schedule
Simon Montefiore artikelen kopen? Alle artikelen online
The Superhuman Guide to Twitter Advanced Search: 23 Hidden Ways to Use Advanced Search for Marketing and Sales
Dutch Bros San Angelo Tx
Highland Park, Los Angeles, Neighborhood Guide
Simplify: r^4+r^3-7r^2-r+6=0 Tiger Algebra Solver
Hennens Chattanooga Dress Code
Outlet For The Thames Crossword
Quick Answer: When Is The Zellwood Corn Festival - BikeHike
Is Windbound Multiplayer
Mega Personal St Louis
Dewalt vs Milwaukee: Comparing Top Power Tool Brands - EXTOL
MyCase Pricing | Start Your 10-Day Free Trial Today
2487872771
Sofia the baddie dog
Elite Dangerous How To Scan Nav Beacon
Black Panther 2 Showtimes Near Epic Theatres Of Palm Coast
Angel Haynes Dropbox
Things to do in Pearl City: Honolulu, HI Travel Guide by 10Best
How rich were the McCallisters in 'Home Alone'? Family's income unveiled
Broken Gphone X Tarkov
Advance Auto Parts Stock Price | AAP Stock Quote, News, and History | Markets Insider
Does Circle K Sell Elf Bars
Autopsy, Grave Rating, and Corpse Guide in Graveyard Keeper
Craigslist Dallastx
Myanswers Com Abc Resources
159R Bus Schedule Pdf
Join MileSplit to get access to the latest news, films, and events!
Letter of Credit: What It Is, Examples, and How One Is Used
Craigslist Odessa Midland Texas
Cl Bellingham
Mother Cabrini, the First American Saint of the Catholic Church
Tropical Smoothie Address
Www.homedepot .Com
Kenmore Coldspot Model 106 Light Bulb Replacement
Kindlerso
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6145

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.