Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
Caleb Maclennan [Sun, 20 Oct 2013 01:11:52 +0000 (19:11 -0600)]
add hooks to enable auto handing of merge conflicts
These hooks before and after the actual checkout process
will enable a pair of hook scripts to automatically handle
conflicts and potentially allow the checkout of repositories
over existing file sets
Dato Simó [Mon, 23 Sep 2013 20:47:43 +0000 (21:47 +0100)]
vcsh: don't allow `clone` to choke on filenames with spaces
By replacing the "for" loop with a "while" loop, it is easy to read
line-oriented output without worrying about spaces. However, now the
loop executes in a subshell, and VCSH_CONFLICT won't be available in
the parent shell. In this case, a trivial, portable solution is to
have the comparison as the last command in the subshell.
Dato Simó [Mon, 23 Sep 2013 21:13:54 +0000 (22:13 +0100)]
vcsh: strip host part from GIT_REMOTE when inferring VCSH_REPO_NAME
`vcsh clone` does:
VCSH_REPO_NAME=$(basename "${GIT_REMOTE}" .git)
Typically, most remote paths will have a non-empty directory component,
so using basename works well in all common cases. However, when doing
something like:
% vcsh clone example.org:repo.git
VCSH_REPO_NAME will be set to "example.org:repo" instead of "repo". This
also happens when using url.<x>.insteadOf, à-la:
% vcsh clone v:repo
Stripping everything up to the first colon in the remote URL fixes the
issue.
N.B.: remote URLs with protocol (e.g. http://, git://, or ssh://) do
not exhibit this problem, and are unaffected by this change.
Turns out the shell implementation didn't account for trailing
slashes. While, arguably, a proper interactive shell should eat
them before execution anyway, this can also be called in script
context.
Markus Martin [Sun, 1 Dec 2013 21:42:33 +0000 (16:42 -0500)]
Fix missing blank repository name when cloning
If the repository path given to 'vcsh clone' contains a trailing slash,
the resulting cloned directory will be '.git' and vcsh will not
recognize the cloned repository by name. This change ensures that a
trailing slash will be stripped and the repository name will be
populated.
The previous faulty behavior is due to the custom implementation of the
basename command first introduced in 794f0aac.
Caleb Maclennan [Sun, 20 Oct 2013 01:58:22 +0000 (19:58 -0600)]
Removed newline escape sequence that was not properly being obeyed anyway, was printing to the console as is. Not needed because the echo being used already terminates with a newline.
Make Makefile more configurable (doc and zsh dirs)
Some distributions expect the documentation in /usr/share/doc/name, and
others in /usr/share/doc/name-version. The zsh directory for completion
is also configurable due to differences between distributions.
martin f. krafft [Fri, 19 Jul 2013 17:21:14 +0000 (19:21 +0200)]
Get rid of GIT_WORK_TREE during vcsh sessions
This patch gets rid of GIT_WORK_TREE completely, which makes the whole thing a
bit more transparent, I find. Git uses core.worktree anyway, so the
environment variable isn't needed.
Signed-off-by: martin f. krafft <madduck@madduck.net>
martin f. krafft [Sat, 27 Apr 2013 06:17:30 +0000 (08:17 +0200)]
Keep worktree relative to GIT_DIR
core.worktree can be set relatively to GIT_DIR, thereby preventing the
hard-coding of the home directory path, which should make a vcsh setup
more portable.
On the other hand, this means that the vcsh repo.d is now invariably
linked to its position, relative to the base directory. Apply this patch
only if you think it to be less likely that people change
~/.config/vcsh/repo.d to something else, than they would rsync/tar/mv
a whole tree to a different $HOME.
Paths are resolved using Git itself, for maximum portability.
In addition to making sure the new method works on new repositories,
I checked that
- "old" repositories can be used with the new code just fine;
- upgrading works.
Signed-off-by: martin f. krafft <madduck@madduck.net>