ek9_git_pull
Reports commitsPulled, newSha and previousSha, changedFiles and changedFileCount; a dirty tree is refused and a rebase/merge conflict is aborted with the tree restored.
When to use it
'Get the latest from upstream' - one call, no arguments; the default mode:'ff-only' never conflicts, mode:'rebase' or 'merge' when the branch has diverged. Operates on the current branch.
When not to use it
- checking what is upstream without changing the branch - use
ek9_git_fetch. - a dirty working tree - commit (
ek9_git_commit) or stash (ek9_git_stash) first; pull refuses it and never auto-stashes. - publishing local commits - use
ek9_git_push.
Details
status is one of up-to-date / fast-forward / rebased / merged; commitsPulled and changedFiles cover previousSha..HEAD; shas are the 8-hex short form; default remote origin. mode:'ff-only' only advances the pointer, and on divergence is refused so you choose mode:'rebase' (linear, rewrites local shas - never on already-pushed commits) or mode:'merge' (records a merge commit). A dirty tree is refused (dirty-tree); a rebase/merge conflict is aborted with treeRestored:true, never a half-done state.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
mode | string: ff-only | rebase | merge | How to integrate. Default ff-only (advance the pointer only, never conflicts); rebase (linear, rewrites local shas); merge (records a merge commit). | |
remote | string | Remote name. Default origin. |