Skip to content

Commit

Permalink
small comments, public domain license
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Mou committed May 9, 2019
1 parent 25c5c9c commit 0929045
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions branch
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion checkout-index
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 0929045

Please sign in to comment.