| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\
| |
| | |
examples,plumbing,utils: typo fixes
|
| | |
|
|\ \
| |/
|/| |
format: packfile fix DecodeObjectAt when Decoder has type
|
| |
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\ \
| | |
| | | |
plumbing: object, commit.Parent() method
|
| | |
| | |
| | |
| | | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
First parents are somewhat special in git.
There's even a --first-parent flag to 'git log'.
Add a helper method to look them up.
This avoids boilerplate and spares the client from
having to arrange for a handle to the Storer,
which is stored in the unexported field Commit.s.
|
| |/
|/|
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\ \
| | |
| | | |
Add Stats() to Commit
|
| | | |
|
| | |
| | |
| | |
| | | |
Stats() is similar to `git show --stat <hash>`.
|
|/ / |
|
|\ \
| | |
| | | |
packfile: use buffer pool for diffs
|
| | | |
|
|/ /
| |
| |
| | |
This helps keep memory usage stable while calculating deltas.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add support for signed commits
This change adds `GPGSignature` field to `Commit` object. This is used
to store the signature of the commit, if any.
* Rename gpg to pgp
|
| |
| |
| |
| | |
Fixes #623
|
| |
| |
| |
| | |
URLs should be user@server:port/path instead of user@server:port:path
|
| |
| |
| |
| |
| |
| | |
The port for SCP-like URLs was hardcoded to 22.
This commit modifies the regex to find a port (optional), and adds a new test
case that covers this scenario.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change is the fixed version of the previous performance improvement
that was reverted due to some bogus logic.
Now it's fixed and only stops the iteration if and only if all of the
branches we've come across have been visited, being a branch a parent
commit of a commit we've visited.
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|\ \
| | |
| | | |
plumbing: the commit walker can skip externally-seen commits
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the revlist is computing the set of hashes needed to transfer, it
doesn't need to walk over commits it has already processed. So, it
can instruct the commit walker not to walk those commits by passing in
its own `seen` map.
For a 36K object repo, this brought the time for `revlist.Objects`
down from 50s to 30s.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One use of go-git is to transfer git data from a non-standard git repo
(not stored in a file system, for example) to a "remote" backed by a
standard, local .git repo.
In this scenario, delta compression is not needed to reduce transfer
time over the "network", because there is no network. The underlying
storage layer has already taken care of the data tranfer, and sending
the objects to local .git storage doesn't require compression. So this
PR gives the user the option to turn off compression when it isn't
needed.
Of course, this results in a larger, uncompressed local .git repo, but
the user can then run git gc or git repack on that repo if they care
about the storage costs.
Turning the pack window to 0 on reduces total push time of a 36K repo
by 50 seconds (out of a pre-PR total of 3m26s).
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This sets a default sliding window of 10 for the delta calculation,
just like git CL:
https://git-scm.com/docs/git-pack-objects#git-pack-objects---windowltngt
For a big-ish repo with 35K objects (17K commits), this reduced the
time for calling `deltaSelection.walk` during a push from more than 14
minutes to about a minute.
|
|\ \
| | |
| | | |
plumbing: use LookPath instead of Stat to fix Windows executables
|
| | |
| | |
| | |
| | |
| | |
| | | |
When git-core isn't in the user's PATH, we need to use `LookPath` to
verify the existence of the executable, rather than `os.Stat`, so that
on Windows it will search for files with executable suffixes.
|
|/ /
| |
| |
| |
| |
| |
| | |
This helps avoids iterating down the same trees for every commit. For
a big-ish repo with 35K objects (17K commits), this reduced the time
for calling `revlist.Objects` during a push (with 0 hashes to ignore)
from more than ten minutes to less than a minute.
|
| |
| |
| | |
*stopped instead of stop
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|\ \
| | |
| | | |
*: windows support, skipped receive_pack_test for git transport
|
| | | |
|
|/ /
| |
| |
| |
| | |
user.Current() causes 'Current not implemented' error when
crosscompiled. See https://github.com/golang/go/issues/6376
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* fixed windows failed test: "143 FAIL: worktree_test.go:314: WorktreeSuite.TestFilenameNormalization"
* fixed windows failed test: "489: FAIL: auth_method_test.go:106: SuiteCommon.TestNewSSHAgentAuthNoAgent"
* fixed windows failed test: "279 FAIL: server_test.go:50: ServerSuite.TestClone"
fixed windows failed test: "298 FAIL: server_test.go:37: ServerSuite.TestPush"
* fixed windows failed test: "316 FAIL: <autogenerated>:26: UploadPackSuite.TearDownSuite"
* fixed windows failed test: "FAIL: <autogenerated>:6: IndexSuite.TearDownSuite"
|
|\ \
| |/
|/| |
plumbing: fix pack commands for the file client on Windows
|
| |
| |
| |
| |
| |
| | |
The default git install on Windows doesn't come with commands for
receive-pack and upload-pack in the default $PATH. Instead, use
--exec-path to find pack executables in that case.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* fixed windows failed test: "134 FAIL: repository_test.go:340: RepositorySuite.TestPlainOpenBareRelativeGitDirFileTrailingGarbage"
* fixed windows failed test: "143 FAIL: worktree_test.go:367: WorktreeSuite.TestCheckoutIndexOS"
* fixed windows failed test: "296 FAIL: receive_pack_test.go:36: ReceivePackSuite.TearDownTest"
* fixed windows failed test: "152 FAIL: worktree_test.go:278: WorktreeSuite.TestCheckoutSymlink"
|
|\ \
| | |
| | | |
plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`
|
| |/ |
|
|\ \
| |/
|/| |
config: multiple values in RemoteConfig (URLs and Fetch)
|