aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
Commit message (Collapse)AuthorAgeFilesLines
* Support `.git/commondir` repository layoutTimofey Kirillov2020-06-151-0/+3
| | | | | | | | | | | | | | | | Git creates `.git/commondir` when there are custom worktrees (see "git worktree add" related commands). `.git/commondir` in such case contains a link to another dot-git repository tree, which could contain some folders like: - objects; - config; - refs; - etc. In this PR a new dotgit.RepositoryFilesystem struct is defined, which is billy.Filesystem interface compatible object-wrapper, that can handle commondir and dispatch all operations to the correct file path. `git.PlainOpen` remain unchanged, but `git.PlainOpenWithOptions` has a new option: `PlainOpenOptions.EnableDotGitCommonDir=true|false` (which is false by default). When `EnableDotGitCommonDir=true` repository-open procedure will read `.git/commondir` (if it exists) and then create dotgit.RepositoryFilesystem object initialized with 2 filesystems. This object then passed into storage and then into dotgit.DotGit as `billy.Filesystem` interface. This object will catch all filesystem operations and dispatch to the correct repository-filesystem (dot-git or common-dot-git) according to the rules described in the doc: https://git-scm.com/docs/gitrepository-layout#Documentation/gitrepository-layout.txt. EnableDotGitCommonDir option will only work with the filesystem-backed storage. Also worktree_test.go has been adopted from an older, already existing existing PR: https://github.com/src-d/go-git/pull/1098. This PR needs new fixtures added in the following PR: https://github.com/go-git/go-git-fixtures/pull/1.
* Worktree.AddWithOptions: improve documentation and interfaceMáximo Cuadros2020-06-141-1/+20
|
* feat: add file with using .gitignore, fixed src-d/go-git#1219jk2k2020-06-101-0/+6
|
* CreateTagOptions.Validate: load Tagger from configMáximo Cuadros2020-06-051-2/+34
|
* Merge branch 'master' of github.com:go-git/go-git into scope-configMáximo Cuadros2020-05-241-0/+3
|\
| * Remote.Push: support force optionkappyhappy2020-05-211-1/+4
| |
* | Repository.ConfigScoped and Repository.Commit with empty author supportMáximo Cuadros2020-05-241-3/+43
|/
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-101-5/+5
|
* add `PathFilter func(string) bool` to LogOptionsSaeed Rasooli2019-11-291-0/+7
| | | | Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
* Add limiting options to git logknqyf2632019-08-041-0/+9
| | | | Signed-off-by: knqyf263 <knqyf263@gmail.com>
* add Prune option to PushOptionsStanislav Seletskiy2019-07-251-0/+3
| | | | Signed-off-by: Stanislav Seletskiy <s.seletskiy@gmail.com>
* Keep local changes when checkout branch in worktree.Linuxer Wang2019-05-151-0/+5
| | | | Signed-off-by: Linuxer Wang <linuxerwang@gmail.com>
* Merge pull request #1072 from jeremyschlatter/patch-3Máximo Cuadros2019-03-041-1/+1
|\ | | | | git: Fix typo
| * git: Fix typoJeremy Schlatter2019-02-221-1/+1
| | | | | | Signed-off-by: Jeremy Schlatter <jeremy.schlatter@gmail.com>
* | git: Fix typoJeremy Schlatter2019-02-221-1/+1
|/ | | Signed-off-by: Jeremy Schlatter <jeremy.schlatter@gmail.com>
* Implement git log --allkuba--2019-01-071-0/+5
| | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* repository: improve CheckoutOption.Hash docMáximo Cuadros2018-10-161-2/+3
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Plumbing: object, Add support for Log with filenames. Fixes #826 (#979)Nithin Gangadharan2018-10-111-0/+4
| | | plumbing: object, Add support for Log with filenames. Fixes #826
* git: s/TagObjectOptions/CreateTagOptions/Chris Marchesi2018-09-071-3/+3
| | | | | | | Just renaming the TagObjectOptions type to CreateTagOptions so that it's consistent with the other option types. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* git: Discern tag target type from supplied hashChris Marchesi2018-08-231-12/+0
| | | | | | | | | | I figured there was a way to do this without having to have TagObjectOptions supply this in - there is. Added support for this in and removed the object type from TagObjectOptions. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* git: Canonicalize incoming annotated tag messagesChris Marchesi2018-08-211-1/+7
| | | | | | | | | | Tag messages are highly sensitive to being in the expected format, especially when encoding/decoding for PGP verification. As such, we do a simple trimming of whitespace on the incoming message and add a newline on the end, to ensure there are no surprises here. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* git: Add tagging supportChris Marchesi2018-08-211-2/+45
| | | | | | | | | | | | | | | | | | | | | | | This adds a few methods: * CreateTag, which can be used to create both lightweight and annotated tags with a supplied TagObjectOptions struct. PGP signing is possible as well. * Tag, to fetch a single tag ref. As opposed to Tags or TagObjects, this will also fetch the tag object if it exists and return it along with the output. Lightweight tags just return the object as nil. * DeleteTag, to delete a tag. This simply deletes the ref. The object is left orphaned to be GCed later. I'm not 100% sure if DeleteTag is the correct behavior - looking for details on exactly *what* happens to a tag object if you delete the ref and not the tag were sparse, and groking the Git source did not really produce much insight to the untrained eye. This may be something that comes up in review. If deletion of the object is necessary, the in-memory storer may require some updates to allow DeleteLooseObject to be supported. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
* git: Add ability to PGP sign commitsChris Marchesi2018-08-161-0/+4
| | | | | | | | | | 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>
* add PlainOpen variant to find .git in parent dirsDaniel Martí2018-04-031-0/+11
| | | | | | | | | This is the git tool's behavior that people are used to; if one runs a git command in a repository's subdirectory, git still works. Fixes #765. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
* add LogOrder, LogOptions.Order, implement Order=LogOrderCommitterTime and ↵Saeed Rasooli2018-03-051-0/+15
| | | | | | Order=LogOrderBSF Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
* Support for clone without checkoutMichael Rykov2018-01-171-0/+2
|
* git: Worktree.Grep() support multiple patterns and pathspecsSunny2017-12-201-4/+4
| | | | Signed-off-by: Sunny <me@darkowlzz.space>
* git: worktree, add Grep() method for git grep (#686)Sunny2017-12-121-0/+38
| | | This change implemented grep on worktree with options to invert match and specify pathspec. Also, a commit hash or reference can be used to specify the worktree to search.
* git: worktree, add Clean() method for git cleanSunny2017-12-041-0/+5
| | | | | | | This change implement git clean with a `Dir` option. By default, clean removes only the untracked files in the working directory. If `Dir` option is set to true, untracked files under other directories are also cleaned.
* Support non-force fetchesNick Thomas2017-11-271-0/+6
|
* Create ListOptions and rename LSRemote to List.Sunny2017-10-041-0/+6
|
* Repository.Clone added Tags option, and set by default AllTags as git doesMáximo Cuadros2017-09-041-6/+18
|
* Merge pull request #573 from orirawlings/pushSidebandMáximo Cuadros2017-09-011-0/+3
|\ | | | | Add sideband support for push
| * Add sideband support for pushOri Rawlings2017-09-011-0/+3
| |
* | Worktree.Reset ignore untracked files on Merge modeMáximo Cuadros2017-09-011-4/+8
|/
* Submodule.Update, add Auth to SubmoduleUpdateOption, fixes #520Máximo Cuadros2017-07-281-0/+2
|
* Implement a NoTags mode for fetch that mimics git fetch --no-tagsNick Thomas2017-07-221-0/+2
|
* worktree: checkout, create branchMáximo Cuadros2017-07-181-1/+16
|
* remote: fetch, correct behaviour on tagsMáximo Cuadros2017-07-171-0/+15
|
* worktree: Commit, tests improvementsMáximo Cuadros2017-05-041-7/+6
|
* worktree: Commit method implementationMáximo Cuadros2017-05-041-1/+46
|
* worktree, reset implementation and status improvementsMáximo Cuadros2017-04-121-7/+21
|
* merge, Repository.LogMáximo Cuadros2017-04-111-0/+8
|\
| * Add Repository.Log() method (fix #298)Antonio Jesus Navarro Perez2017-04-111-0/+8
| | | | | | | | | | | | | | | | | | | | - CommitIter is now an interface - The old CommitIter implementation is now called StorerCommitIter - CommitWalker and CommitWalkerPost are now iterators (CommitPreIterator and CommitPostIterator). - Remove Commit.History() method. There are so many ways to iterate a commit history, depending of the use case. Now, instead of use the History() method, you must use CommitPreIterator or CommitPostIterator. - Move commitSorterer to references.go because is the only place that it is used, and it must not be used into another place. - Make References method private, it must only be used into blame logic. - Added a TODO into references method, where the sortCommits is used to remove it in a near future.
* | worktree, status implementation based on merkletrie and reset and checkout ↵Máximo Cuadros2017-04-111-0/+52
|/ | | | implementations
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-4/+4
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* documentation and API improvementsMáximo Cuadros2017-02-211-30/+30
|
* submodule update implementationMáximo Cuadros2017-02-151-2/+27
|
* submodule init implementationMáximo Cuadros2017-02-121-0/+4
|
* config: RefSpec.Validate returning errors and doc (Fixes #232)Máximo Cuadros2017-01-311-6/+5
|