<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIsandspecifytheir <ahref="http://openide.netbeans.org/tutorial/api-design.html#category-private"> stabilitycategories</a>. Ifpossiblepleaseprovidesimplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<p>
The library is a facade over a java implementation of Git client - <a href="https://www.eclipse.org/jgit">JGit</a>. Because JGit does not provide a full-featured high-level API
(on the level of whole git commands), this library groups the JGit low-level API into bigger pieces and exports the API in the form of full Git commandline commands
(e.g. status, commit, checkout, reset, etc.).
<api name="GitlibraryAPI" group="java"type="export" category="devel">
Allows clients to work with local Git repositories and invoke a set of Git commands affecting a Git repository.
</api>
</p>
</answer>
<!-- <questionid="arch-quality"when="init"> Howwillthe<ahref="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a> ofyourcodebetestedand howarefutureregressionsgoingtobeprevented? <hint> Whatkindoftestingdo youwanttouse?Howmuchfunctionality,inwhichareas, shouldbecoveredbythetests?Howyoufindoutthatyour projectwassuccessful? </hint> </question>
-->
<answer id="arch-quality">
<p>
Quality of the API is covered by JUnit tests for all exported git commands.
</p>
</answer>
<!-- <questionid="arch-time"when="init"> Whatarethetimeestimatesofthework? <hint> Pleaseexpressyourestimatesofhowlongthedesign,implementation, stabilizationarelikelytolast.Howmanypeoplewillbeneededto implementthisandwhatistheexpectedmilestonebywhichtheworkshouldbe ready? </hint> </question>
-->
<answer id="arch-time">
<ul>
<li>Module and the API already implemented</li>
</ul>
</answer>
<!-- <questionid="arch-usecases"when="init"> <hint> Contentofthisanswerwillbedisplayedaspartofpageat http://www.netbeans.org/download/dev/javadoc/usecases.html Youcanusetags<usecasename="name>regularhtmldescription</usecase> andifyouwanttouseanURLyoucanprefixifwith@TOP@tobegin attherootofyourjavadoc </hint> Describethemain<ahref="http://openide.netbeans.org/tutorial/api-design.html#usecase"> usecases</a>ofthenewAPI.Whowilluseitunder whatcircumstances?Whatkindofcodewouldtypicallyneedtobewritten tousethemodule? </question>
-->
<answer id="arch-usecases">
<usecase id="1" name="Get Git client">
Before you can run preferred Git commands, you must get an instance of <a href="@TOP@/org/netbeans/libs/git/GitClient.html">GitClient</a> bound to a specific repository.<br/>
Instances of <code>GitClient</code> are provided by <a href="@TOP@/org/netbeans/libs/git/GitRepository.html#createClient()">GitRepository</a>.
<code>GitRepository</code> represents a concrete local Git repository and is always bound to a specific folder.
<p></p>
The correct way to achieve this is to call <code><a href="@TOP@/org/netbeans/libs/git/GitRepository.html">GitRepository</a>.getInstance(repositoryRoot).createClient()</code>.
</usecase>
<usecase id="2" name="Run Git commands">
To run a Git command simply call a method mapped to the command on an instance of GitClient.
</usecase>
<usecase id="3" name="Control Git command's workflow">
You are able to control a Git command's work and listen for warning and error messages and informative messages indicating start and finish of the command via
<a href="@TOP@/org/netbeans/libs/git/progress/ProgressMonitor.html">ProgressMonitor</a>. Every method of <code>GitClient</code> mapped to a Git command accepts an instance of
<code>ProgressMonitor</code> as a parameter. Through an instance of this class you can cancel a command, an implementation of such a command periodically calls
<a href="@TOP@/org/netbeans/libs/git/progress/ProgressMonitor.html#isCanceled()">isCanceled</a> and interrupts its work if the method returns <code>true</code>.<br/>
Its basic implementation at <a href="@TOP@/org/netbeans/libs/git/progress/ProgressMonitor.DefaultProgressMonitor.html">ProgressMonitor.DefaultProgressMonitor</a> supports canceling commands
while implementing other methods as no-op.
</usecase>
<usecase id="4" name="Recieve notifications">
Some Git commands may take a noticeable amount of time to finish and waiting that long for the full result returned by the command may not be sufficient. Git API provides a way
to follow the process of building the result of such commands.<br/>
Let's say you want to get all revisions from the Git history. The log command is expensive especially on large repositories and you do not want to wait for it to finish but want to
be notified when a single revision from the history is fetched and added to the result. This way you can <em>incrementally</em> present the result in the UI without the need for
waiting indefinitely for the command to finish.
<p>
Package <a href="@TOP@/org/netbeans/libs/git/progress/package-summary.html">org.netbeans.libs.git.progress</a> offers
a set of listeners extending the <a href="@TOP@/org/netbeans/libs/git/progress/NotificationListener.html">NotificationListener</a> interface which you can attach to an instance of
<code>GitClient</code> via <a href="@TOP@/org/netbeans/libs/git/GitClient.html#addNotificationListener(org.netbeans.libs.git.progress.NotificationListener)">addNotificationListener()</a>
and through which you can closely monitor building of the result.
</p>
</usecase>
</answer>
<!-- <questionid="arch-what"when="init"> Whatisthisprojectgoodfor? <hint> Pleaseprovidehereafewlinesdescribingtheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
<p>
The library provides a Java implementation of git client allowing you to work with and get information about Git repositories and run Git commands.
</p>
</answer>
<!-- <questionid="compat-deprecation"when="init"> Howtheintroductionofyourprojectinfluencesfunctionality providedbypreviousversionoftheproduct? <hint> Ifyouareplanningtodeprecate/remove/changeanyexistingAPIs, listthemhereaccompaniedwiththereasonexplainingwhyyou aredoingso. </hint> </question>
-->
<answer id="compat-deprecation">
<p>
No influence on the product.
</p>
</answer>
<!-- <questionid="compat-i18n"when="impl"> Isyourmodulecorrectlyinternationalized? <hint> Correctinternationalizationmeansthatitobeysinstructions at<ahref="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html"> NetBeansI18Npages</a>. </hint> </question>
-->
<answer id="compat-i18n">
<p>
No plans to internationalize the library. It contains no UI and besides description of enum values and exception messages it returns no strings needed to internationalize.
I think it is best to leave it up to an API client to process and deliver these messages to user in its own way.
</p>
</answer>
<!-- <questionid="compat-standards"when="init"> Doesthemoduleimplementordefineanystandards?Isthe implementationexactordoesitdeviatesomehow? </question>
-->
<answer id="compat-standards">
<p>
The module does not implement or define any standards.
</p>
</answer>
<!-- <questionid="exec-component"when="impl"> Isexecutionofyourcodeinfluencedbyany(string)property ofanyofyourcomponents? <hint> Often<code>JComponent.getClientProperty</code>,<code>Action.getValue</code> or<code>PropertyDescriptor.getValue</code>,etc.areusedtoinfluence abehaviorofsomecode.Thisofcourseformsaninterfacethatshould bedocumented.Alsoifonedependsonsomeinterfacethatanobject implements(<code>componentinstanceofRunnable</code>)thatformsan APIaswell. </hint> </question>
-->
<answer id="exec-component">
<p>
There is no GUI for this module.
</p>
</answer>
<!-- <questionid="exec-introspection"when="impl"> Doesyourmoduleuseanykindofruntimetypeinformation(<code>instanceof</code>, workwith<code>java.lang.Class</code>,etc.)? <hint> CheckforcaseswhenyouhaveanobjectoftypeAandyoualso expectitto(possibly)beoftypeBanddosomespecialaction.That shouldbedocumented.Thesameappliesonoperationsinmeta-level (Class.isInstance(...),Class.isAssignableFrom(...),etc.). </hint> </question>
-->
<answer id="exec-introspection">
<p>
No, it does not.
</p>
</answer>
<!-- <questionid="exec-privateaccess"when="final"> Areyouawareofanyotherpartsofthesystemcallingsomeof yourmethodsbyreflection? <hint> Ifso,describethe"contract"asanAPI.Likelyprivateorfriendone,but stillAPIandconsiderrewriteofit. </hint> </question>
-->
<answer id="exec-privateaccess">
<p>
Not at all.
</p>
</answer>
<!-- <questionid="exec-process"when="impl"> Doyouexecuteanexternalprocessfromyourmodule?Howdoyouensure thattheresultisthesameondifferentplatforms?Doyouparseoutput? Doyoudependonresultcode? <hint> Ifyoufeedaninput,parsetheoutputpleasedeclarethatasanAPI. </hint> </question>
-->
<answer id="exec-process">
<p>
No external process is executed.
</p>
</answer>
<!-- <questionid="exec-property"when="impl"> Isexecutionofyourcodeinfluencedbyanyenvironmentor Javasystem(<code>System.getProperty</code>)property? Onasimilarnote,istheresomethinginterestingthatyou passto<code>java.util.logging.Logger</code>?Ordoyouobserve whatotherslog? <hint> Ifthereisapropertythatcanchangethebehaviorofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthe<ahref="http://openide.netbeans.org/tutorial/api-design.html#life">stabilitycategory</a> ofthisAPI.Youmayuse <pre> <apitype="export"group="property"name="id"category="private"url="http://..."> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </api> </pre> </hint> </question>
-->
<answer id="exec-property">
<p>
Properties:
<api name="org.netbeans.libs.git.trackSymLinks" group="property" category="private"type="import">
Java 6 has no direct support for symbolic links and the library then treats them as regular file and folders. This causes serious inconveniences when traversing
a folder tree. Symbolic links are followed and stepped into as if normal folders, thus taking a lot of time to finish a command. The status of such files and folders
is then incorrectly detected as a pair deleted/added.<br/>
By default this property is set to <code>false</code> and leaves already committed symbolic link untouched and unattended. To start traversing and treating symlinks as normal files,
set the property to <code>true</code>.
</api>
</p>
</answer>
<!-- <questionid="exec-threading"when="init"> Whatthreadingmodels,ifany,doesyourmoduleadhereto?Howthe projectbehaveswithrespecttothreading? <hint> IsyourAPIthreadsafe?Canitbeaccessedfromanythreadsor justfromsomededicatedones?AnyspecialrelationtoAWTand itsEventDispatchthread?Also ifyourmodulecallsforeignAPIswhichhaveaspecificthreadingmodel, indicatehowyoucomplywiththerequirementsformultithreadedaccess (synchronization,mutexes,etc.)applicabletothoseAPIs. IfyourmoduledefinesanyAPIs,orhascomplexinternalstructures thatmightbeusedfrommultiplethreads,declarehowyouprotect dataagainstconcurrentaccess,raceconditions,deadlocks,etc., andwhethersuchrulesareenforcedbyruntimewarnings,errors,assertions,etc. Examples:aclassmightbenon-thread-safe(likeJavaCollections);might befullythread-safe(internallocking);mightrequireaccessthroughamutex (andmayormaynotautomaticallyacquirethatmutexonbehalfofaclientmethod); mightbeabletorunonlyintheeventqueue;etc. Alsodescribewhenanyeventsarefired:synchronously,asynchronously,etc. Ideas:<ahref="http://core.netbeans.org/proposals/threading/index.html#recommendations">ThreadingRecommendations</a>(inprogress) </hint> </question>
-->
<answer id="exec-threading">
<p>
The single-threaded model is used, everything runs in a single thread. Callbacks are called and events are fired synchronously during a command's execution.
</p>
</answer>
<!-- <questionid="format-types"when="impl"> Whichprotocolsandfileformats(ifany)doesyourmodulereadorwriteondisk, ortransmitorreceiveoverthenetwork?Doyougenerateanantbuildscript? Canitbeeditedandmodified? <hint> <p> Filescanbereadandwrittenbyotherprograms,modulesandusers.Iftheyinfluence yourbehaviour,makesureyoueitherdocumenttheformatorclaimthatitisaprivate api(usingthe<api>tag). </p> <p> Ifyougenerateanantbuildfile,thisisverylikelygoingtobeseenbyendusersand theywillbeattemptedtoeditit.Youshouldbereadyforthatandprovideherealink todocumentationthatyouhaveforsuchpurposesandalsodescribehowyouaregoingto understandsuchfilesduringnextrelease,whenyou(verylikely)slightlychangethe format. </p> </hint> </question>
-->
<answer id="format-types">
<p>
The library works with Git metadata, so anything written under the .git folder in a repository root directly affects library's behaviour.
However no module-specific settings are stored inside the folder.
</p>
</answer>
<!-- <questionid="perf-mem"when="final"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
<p>
Repository metadata is cached as long as someone holds a reference to the repository root folder (<a href="@JDK@@JDKMODULE_JAVA_BASE@/java/io/File.html">java.io.File</a>).
The underlying JGit library caches:
</p>
<ul>
<li>Content of the index. The amount of memory consumed is directly proportional to the number of files under the repository root.</li>
<li>Set of references: branches, tags, etc.</li>
</ul>
</answer>
<!-- <questionid="perf-progress"when="final"> Doesyourmoduleexecuteanylong-runningtasks? <hint>Longrunningtasksshouldneverblock AWTthreadasitbadlyhurtstheUI <ahref="http://performance.netbeans.org/responsiveness/issues.html"> responsiveness</a>. Taskslikeconnectingover network,computinghugeamountofdata,compilation bedoneasynchronously(forexample using<code>RequestProcessor</code>),definitivelyitshould notblockAWTthread. </hint> </question>
-->
<answer id="perf-progress">
<p>
All API methods may take a long time because they directly access IO. No API method should be run inside the AWT thread.
</p>
</answer>
<!-- <questionid="perf-scale"when="init"> Whichexternalcriteriainfluencetheperformanceofyour program(sizeoffileineditor,numberoffilesinmenu, insourcedirectory,etc.)andhowwellyourcodescales? <hint> Pleaseincludesomeestimates,thereareothermoredetailed questionstoanswerinlaterphasesofimplementation. </hint> </question>
-->
<answer id="perf-scale">
<p>
The size of a git repository affects the performance and duration of run commands. However caller's responsibility to limit the file tree a git command will be invoked on.
</p>
</answer>
<!-- <questionid="perf-spi"when="init"> Howtheperformanceofthepluggedincodewillbeenforced? <hint> Ifyouallowforeigncodetobepluggedintoyourownmodule,how doyouenforcethatitwillbehavecorrectlyandquicklyandwillnot negativelyinfluencetheperformanceofyourownmodule? </hint> </question>
-->
<answer id="perf-spi">
<p>
The module does not initiate any work by itself, implementors of the module's SPI are also the its API clients at the same time,
so it is their responsibility to ensure the performance quality.
</p>
</answer>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.