1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2024-10-27 20:34:27 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Tim Byrne
31071d9ac9
Clarify error message
Conflicts are not stashed anymore
2021-02-04 00:06:00 -06:00
Erik Flodin
f45e66d4da
Rework clone
Instead of doing work to find the default branch just to be able to
set up the repository before doing a fetch, do a "git clone" and let
git handle it.

Use -c core.sharedrepository=0600 to get the same result as
--shared=0600 passed to init.

Use --separate-git-dir to get the git directory in $YADM_REPO. Use a
temporary dir as work tree and remove it right after the clone is
done.

When the clone is done, iterate over all missing files in $YADM_WORK
and perform a checkout. If local files exists that differ compared
with the cloned ones the local files are left intact and the user is
instructed to deal with the conflicts.
2021-01-08 22:05:46 +01:00
Erik Flodin
6378fe3073
Print errors to stderr
This makes it possible to run e.g. "yadm -Y foo introspect repo
2>/dev/null" and get an empty output instead of getting the error
message about foo not being fully qualified.
2021-01-05 21:57:32 +01:00
Tim Byrne
4b5f16d73a
Improve support for default branches (#231, #232)
Unless a branch is specified, the default remote HEAD is used during
clone. Also a local master branch is not created if it is not the remote
HEAD.
2020-12-06 13:23:25 -06:00
Tim Byrne
62b109ad2d
Rename yadm_y -> yadm_cmd
-Y is no longer used when running commands
2020-11-22 17:09:44 -06:00
Tim Byrne
18e5fcfacc
Only assert private dirs, when worktree = $HOME 2019-12-11 08:37:45 -06:00
Tim Byrne
e51166b7e8
Improve clone testing 2019-10-08 17:28:56 -05:00
Tim Byrne
f3bde37f78
Support -b <branch> when cloning (#133) 2019-10-08 17:28:53 -05:00
Tim Byrne
d2afab6846
Fix newly discovered linting errors 2019-10-02 15:16:09 -05:00
Tim Byrne
e7f9616b39
Rewrite testing system (#119)
The new test system is written with py.test. These tests are more
comprehensive, run faster by an order of magnitude, and are far more
maintainable. The tests themselves conform to PEP8.
2019-02-20 07:48:25 -06:00