aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_commit_test.go
Commit message (Collapse)AuthorAgeFilesLines
* git: worktree, Fix tests affected by changed Commit method.onee-only2024-04-121-3/+122
|
* git: worktree_commit, Fix amend commit to apply changes. Fixes #1024onee-only2024-03-101-1/+22
|
* git: Worktree.AddWithOptions, add skipStatus option. #993Moran Cohen2024-01-171-1/+112
|
* Merge branch 'master' into jc/commit-ammendPaulo Gomes2023-08-051-1/+25
|\
| * Return error instead of creating empty commitsPaulo Gomes2022-12-031-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BuildTree now returns an ErrEmptyCommit error, when there are no changes to be committed. This can be opted-out via CommitOptions.AllowEmptyCommits. This is a breaking change which enables applications to detect when empty commits are to be created. Some instances in which this can occur is when the fs (e.g. `billy/osfs`) make changes to the underlying files, causing a conflict between what the previous Git worktree state was, and the current state. Changes to the fs implementations are orthogonal to this, and will be dealt with separately. The new behaviour aligns with the Git CLI, in which empty commits returns the error message: 'nothing to commit, working tree clean'. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* | Add Amend option to CommitOptionsJohn Cai2022-01-031-0/+31
|/ | | | | | Adds an Amend option to CommitOptions that behaves like git --amend. This change includes modifications to the Validate function to disallow a Commit call with both Amend and either Parents or All enabled.
* Remove unused variables/types/functionsAbhinav Gupta2021-11-271-2/+3
| | | | | | | | [staticcheck](https://staticcheck.io/) reported a number of unused fields, functions, types, and variables across the code. Where possible, use them (assert unchecked errors in tests, for example) and otherwise remove them.
* *: use go-billy instead of os callsMáximo Cuadros2021-05-021-12/+9
|
* *: replace golang.org/x/crypto/openpgp by ↵Johan Fleury2021-04-061-3/+3
| | | | github.com/ProtonMail/go-crypto/openpgp (#283)
* *: fix flaky testMáximo Cuadros2021-03-261-1/+1
|
* transport: ssh, fix cloning large repositories (#272)David Cuadrado2021-03-261-0/+4
| | | | | | | | | | | | | | | | | * Fix cloning large repositories Ignore the error on close when the connection is already closed Fixes #70 * Compatibility for go 1.13 Because it's required by the pipeline * Add test for allowing to close a command when the client is already closed This test is for issue #70 * Add debug information for broken test
* git: worktree_commit, just store objects not already stored (#224)jsteuer2021-02-091-0/+59
| | | * git: worktree_commit, just store objects not already stored
* Repository.ConfigScoped and Repository.Commit with empty author supportMáximo Cuadros2020-05-241-4/+8
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-101-10/+10
|
* *: added missing error checks in testsChristian Muehlhaeuser2019-07-291-1/+1
| | | | | | | | | | When we assign a value to err, make sure to also check for it being nil afterwards. If those were intentionally unchecked, we should remove the assignment in the first place. Those checks certainly never harm, but please review thoroughly and let me know. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit 19d6f42a4d814a50bd262fbb69a9b670db9756a2)
* Merge branch 'master' of github.com:src-d/go-git into f-add-tagging-supportMáximo Cuadros2018-09-101-3/+56
|\
| * Expose Storage cache.kuba--2018-09-071-2/+2
| | | | | | | | Signed-off-by: kuba-- <kuba@sourced.tech>
| * worktree: solve merge conflictsv4.7.0Máximo Cuadros2018-09-061-3/+56
| |\
| | * worktree: address PR comments: sort imports appropriatelyMark Bartel2018-07-071-5/+5
| | | | | | | | | | | | Signed-off-by: Mark Bartel <github@spottybenny.ca>
| | * worktree: add test for correct tree sorting (issue #881)Mark Bartel2018-07-031-0/+54
| | | | | | | | | | | | Signed-off-by: Mark Bartel <github@spottybenny.ca>
* | | git: Replace test signing key with one with longer expiryChris Marchesi2018-08-211-53/+53
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old one was created with defaults, which would have caused CI failures in 2 years. The new one is valid for 10 years: > gpg --list-secret-keys /root/.gnupg/pubring.kbx ------------------------ sec rsa4096 2018-08-22 [SC] [expires: 2028-08-19] 93A17FF01E54328546087C8E029395402EFCCD53 uid [ unknown] foo bar <foo@foo.foo> Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* | git: Add extra test for testing bad key error caseChris Marchesi2018-08-161-55/+85
| | | | | | | | | | | | I'm hoping this helps get codecov to a tolerable delta. :) Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* | git: Remove old hash validation codeChris Marchesi2018-08-161-5/+0
| | | | | | | | | | | | | | | | | | | | This will not work for a signed commit as with the GPG signature being a part of the commit, the hash is now non-deterministic. Verification of the commit is done through the validation of the signature. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* | git: Remove use of strings.BuilderChris Marchesi2018-08-161-1/+2
| | | | | | | | | | | | | | This was added in Go 1.10 and is not supported on Go 1.9. Switched to bytes.Buffer to ensure compatibility. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* | git: Add ability to PGP sign commitsChris Marchesi2018-08-161-0/+115
|/ | | | | | | | | | This adds the ability to sign commits by adding the SignKey field to CommitOptions. If present, the commit will be signed during the WorkTree.Commit call. The supplied SignKey must already be decrypted by the caller. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-231-2/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Worktree.Add: Support Add deleted files, fixes #571 (#577)grunenwflorian2017-09-051-0/+36
|
* worktree: expose underlying filesystemMáximo Cuadros2017-07-261-4/+4
|
* *: upgrade to go-billy.v3, mergeMáximo Cuadros2017-06-181-6/+6
|
* worktree: Commit, tests improvementsMáximo Cuadros2017-05-041-0/+13
|
* worktree: Commit method implementationMáximo Cuadros2017-05-041-0/+126