summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Antonio Ospite [Mon, 17 Dec 2018 09:03:10 +0000 (10:03 +0100)]
submodule-update.sh: check git version before running submodule commands
Git submodules in vcsh can only be supported reliably with git >= 2.20.0
which supports reading the .gitmodules file even when it is not checked
out in the working tree.
To recap, the need for git >= 2.20 is imposed by the following facts:
- vcsh repositories share their working trees in $HOME;
- if files with the same name (e.g. README, LICENSE) are present in
different repositories they would conflict when checked out in
$HOME;
- sparse-checkout can solve the issue by preventing colliding files
between repositories from being checked out, this includes the
.gitmodules file;
- submodules command require the .gitmodules file;
- from git 2.20 the .gitmodules file can be accessed from the
repository object store when the file is not in the working tree,
this enables submodules usage with "vcsh run".
Now that the version check is in place, re-enable the post-clone hook to
update submodules automatically after cloning a repository.
Antonio Ospite [Fri, 14 Dec 2018 15:07:20 +0000 (16:07 +0100)]
sparse-checkout.sh: don't do anything if the repository does not exist
Antonio Ospite [Thu, 13 Dec 2018 23:51:28 +0000 (00:51 +0100)]
populate-fully.sh: don't enter the repository if updating working tree fails
If updating the working tree failed exit the whole vcsh process to
prevent entering the repository and doing more damage.
Antonio Ospite [Thu, 13 Dec 2018 23:15:05 +0000 (00:15 +0100)]
hooks-available: avoid some errors with empty repositories
When entering a repository which has just been created the HEAD
reference does not exist yet and "git read-tree -mu HEAD" would
complain loudly about that, giving a confusing error to users.
Avoid the error by checking the validity of HEAD before updating the
working tree.
Antonio Ospite [Thu, 13 Dec 2018 23:10:02 +0000 (00:10 +0100)]
populate-fully.sh: force entering the repository if the lock not valid anymore
If the vcsh instance which previously acquired the lock does not exist
anymore, the lock is invalid and can be taken by the current instance
for the repository it is entering.
Antonio Ospite [Thu, 13 Dec 2018 22:54:36 +0000 (23:54 +0100)]
populate-sparsely.sh: explain why the script exits if there is no lock
The reason why the script exits if there is no lock was given in the
commit message when the check was added, but reading the code after some
time I could not remember it, so just put the explanation in a comment
to make the life easier for the reader.
Antonio Ospite [Thu, 13 Dec 2018 22:47:47 +0000 (23:47 +0100)]
populate-fully.sh: don't do anything if the repository does not exist
The pre-enter hook is called even when trying to enter an invalid
repository, vcsh only checks the repository validity later on.
Anticipate the check and avoid calling git commands on an invalid
repository as they would just fail and confuse the user.
Antonio Ospite [Thu, 13 Dec 2018 15:52:16 +0000 (16:52 +0100)]
Fix the git terminology by always referring to the "working tree"
The set of files checked out by git is called the "working tree", avoid
other definitions like "working directory" or "work dir".
Antonio Ospite [Tue, 8 May 2018 16:30:55 +0000 (18:30 +0200)]
populate-sparsely.sh: exit gracefully if LOCKDIR does not exist
If LOCKDIR does not exist it means that the lock is not active so
there's no need to do anything.
Antonio Ospite [Tue, 8 May 2018 11:11:22 +0000 (13:11 +0200)]
hooks-enabled: don't call submodule-update.sh from hooks for now
In the current setup executing git submodules commands from 'vcsh run'
invocations would fail because the '.gitmodules' file would not be
checked out.
For now it's only safe to call git submodules commands after entering
the repository with 'vcsh enter'.
Antonio Ospite [Tue, 8 May 2018 11:07:51 +0000 (13:07 +0200)]
README: mention that the idea came from John Whitley
Antonio Ospite [Tue, 8 May 2018 07:48:34 +0000 (09:48 +0200)]
Initial import