![]() const rslt = await myAnx.addAnx(relativePaths, Command result The following JavaScript adds files using at most two CPU cores. In single or double quotation marks to be valid JavaScript identifiers.Īrrays of the appropriate type are used for options accepting more than one value and options which may be repeated. To pass options, construct an object with the desired keys and values.Īny keys in the object not for the command are ignored.Ĭommand option names containing hyphens must be enclosed The string array approach is intended to meet atypical requirements. When an object is passed, easy-git-annex handles the mechanics of generating the correct command syntax. Options may be passed in an object or a string array. Many git-annex and Git commands accept one or more options. The ApiOptions parameter, described below, may be used to influence process creation. Low-level methods runGit and runAnx are capable of invoking any Git or git-annex command.Ī process is spawned to run each command asynchronously. Git and git-annex commands are exposed by methods on theįrequently used commands, such as commit, have a specific method to invoke the command. const myAnx = anx.createAccessor(repositoryPath) Īn application may hold multiple accessors simultaneously. The directory passed to createAccessor must exist but may be empty. Obtain an accessor to use the GitAnnexAPI interface with the desired repository. Installation of easy-git-annex may be performed with the command ![]() It is not necessary to install git-annex to use easy-git-annex only with Git.Ĭurrent versions of git-annex are available from the developer. Install git-annex and verify it runs from the command line to use git-annex commands Git must be installed and verified to run from the command line. Helper functions assist your application with parsing command responses.Īdditional methods return JavaScript objects for tasks common to many applications,įor example getStatusAnx and getStatusGit.Ĭallbacks for stdout and stderr are available to show progress of time-consuming commands.Įnvironment variables may also be specified. Includes the command and its arguments, repository path, exit code, stdout, and stderr. The Promise returned from every command has the same structure and To easy-git-annex which generates the appropriate command line and runs the command.Įach command is run asynchronously without blocking the Node.js event loop. The easy-git-annex API is a wrapper over git-annex and Git commands.Īpplications pass JavaScript objects with command options and parameters It is changed to remote.pushDefault = Y or removed when set in a repo configuration though.The easy-git-annex package is a JavaScript/TypeScript API for git-annex and Git commands. In such a case only a warning is printed, such as: warning: The global configuration remote.pushDefault in: However remote.pushDefault needs a more gentle approach, as this may be set in a non-repo configuration file. Git already renames or removes any branch.remote and branch.pushRemote configurations if their value is X. When renaming a remote with git remote rename X Y Git already renames/removes any config values from branch.remote = XĪs branch.pushRemote also names a remote, it now also renames or removes these config values from branch.pushRemote = XĪnd: remote rename/remove: gently handle remote.pushDefault config When renaming or removing a remote with git remote rename X Y (Merged by Junio C Hamano - gitster - in commit d0038f4, ) remote rename/remove: handle branch.pushRemote config values See commit b3fd6cb (), and commit f2a2327, commit 923d4a5, commit ceff1a1, commit 1a83068, commit 88f8576 () by Bert Wesarg ( bertwesarg). branch.remote) whose value used to be X to Y. With Git 2.26 (Q1 2020), " git remote rename X Y" needs to adjust configuration variables (e.g. ![]() Repository), " git remote rename" and other commands misinterpretedĪnd behaved as if such a non-existing remote actually existed. May not actually be " origin" remote defined in a particular Git " " set to true, even though there may or With anticipatory tweaking for remotes defined in ~/.gitconfig (e.g. (Merged by Junio C Hamano - gitster - in commit fe575f0, ) remote rename: more carefully determine whether a remote is configured That is fixed in Git 2.12 (Q1 2017): See commit e459b07, commit af5bacf () by Johannes Schindelin ( dscho). Be aware that until Git 2.11, git remote rename might try to rename a non-existing remote!
0 Comments
Leave a Reply. |