diff --git a/README b/README index 52b8c27..2af80dd 100644 --- a/README +++ b/README @@ -2,6 +2,8 @@ THIS WILL EAT YOUR DATA AND NOT APOLOGIZE FOR TALKING WHILE CHEWING. Probably not but this is not a robust implementation of git so don't let it out on your important code. +This code is released into the public domain. + //////////////////////////////////////////////////////////////// ZIT - the imitation stupid content tracker @@ -38,6 +40,9 @@ to read relevant documentation. The zit code is structured similarly to git v1.0. https://github.com/git/git/tree/v1.0.13 +Also it may be helpful to reference commands.png which diagrams the +dependencies between zit subcommands. + git storytime ~~~~~~~~~~~~~ diff --git a/branch b/branch index e437fac..e6bf360 100755 --- a/branch +++ b/branch @@ -1,7 +1,7 @@ #!/bin/bash -e -if [[ $# -eq 0 ]]; then - headref=$(symbolic-ref HEAD | sed -e 's|^refs/heads/||') # for current branch +if [[ $# -eq 0 ]]; then # for displaying all branches + headref=$(symbolic-ref HEAD | sed -e 's|^refs/heads/||') # get current branch echo "*$headref" cd .zit/refs/heads ls | grep -vxF $headref diff --git a/checkout-index b/checkout-index index 1f7000a..1c2cf6b 100755 --- a/checkout-index +++ b/checkout-index @@ -8,7 +8,7 @@ import index entries = index.read_index() # entry.c:checkout_entry for filename, mode, sha1 in entries: - assert not filename.startswith('/') + assert not filename.startswith('/') # basic safety checks assert '..' not in filename subprocess.check_call(['mkdir', '-p', './' + os.path.dirname(filename)]) # TODO git 1.0 doesn't seem to unlink deleted files diff --git a/test b/test index b132687..74cee24 100755 --- a/test +++ b/test @@ -1,4 +1,5 @@ #!/bin/bash -ex +# TODO make compatible with actual git, probably by accepting compatible flags header() { echo -e "\n\033[32m$@\033[0m"