Commit Graph

9 Commits

Author SHA1 Message Date
Utkarsh Gupta
22a2d3d5ef New upstream version 1.1.0+dfsg.1 2020-12-07 04:06:37 +05:30
Jongmin Kim
ac3d33df5d New upstream version 0.28.1+dfsg.1 2019-05-12 00:29:21 +09:00
Patrick Steinhardt
883eeb5f90 worktree: switch over worktree pruning to an opts structure
The current signature of `git_worktree_prune` accepts a flags field to
alter its behavior. This is not as flexible as we'd like it to be when
we want to enable passing additional options in the future. As the
function has not been part of any release yet, we are still free to
alter its current signature. This commit does so by using our usual
pattern of an options structure, which is easily extendable without
breaking the API.
2017-05-05 15:39:25 +02:00
Patrick Steinhardt
2a485dabc0 refs: update worktree HEADs when renaming branches
Whenever we rename a branch, we update the repository's symbolic HEAD
reference if it currently points to the branch that is to be renamed.
But with the introduction of worktrees, we also have to iterate over all
HEADs of linked worktrees to adjust them. Do so.
2017-04-05 13:50:38 +02:00
Patrick Steinhardt
602972560a tests: worktree::refs: convert spaces to tabs 2017-04-05 13:44:52 +02:00
Patrick Steinhardt
097f0105b4 refdb: create references in commondir
References for a repository are usually created inside of its gitdir.
When using worktrees, though, these references are not to be created
inside the worktree gitdir, but instead inside the gitdir of its parent
repository, which is the commondir. Like this, branches will still be
available after the worktree itself has been deleted.

The filesystem refdb currently still creates new references inside of
the gitdir. Fix this and have it create references in commondir.
2017-03-17 09:27:56 +01:00
Patrick Steinhardt
384518d09d repository: restrict checking out checked out branches
If a branch is already checked out in a working tree we are not
allowed to check out that branch in another repository. Introduce
this restriction when setting a repository's HEAD.
2017-02-13 11:06:52 +01:00
Patrick Steinhardt
143e539fd0 branch: restrict branch deletion for worktrees
Restrict the ability to delete branches that are checked out in
any linked repository.
2017-02-13 11:05:57 +01:00
Patrick Steinhardt
e0a6c28eb3 refdb: introduce commondir awareness
The refdb_fs_backend is not aware of the git commondir, which
stores common objects like the o bject database and packed/loose
refereensces when worktrees are used.

Make refdb_fs_backend aware of the common directory by
introducing a new commonpath variable that points to the actual
common path of the database and using it instead of the gitdir
for the mentioned objects.
2017-02-13 10:28:15 +01:00