Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panics if you attempt to commit a file that isn't tracked #10

Closed
knoebber opened this issue Aug 11, 2019 · 0 comments
Closed

Panics if you attempt to commit a file that isn't tracked #10

knoebber opened this issue Aug 11, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@knoebber
Copy link
Owner

To reproduce

$ dot init ~/.bashrc
Initialized /home/nicolas/.bashrc as "bashrc"

$ dot commit bashrc
Created /home/nicolas/.dotfile/bashrc/786bc4cd0fdcb72c461b8f5465304e6bbc7c91c8

$ dot commit bashr
panic: runtime error: invalid memory address or nil pointer dereference
@knoebber knoebber added the bug Something isn't working label Aug 11, 2019
knoebber added a commit that referenced this issue Sep 22, 2019
Setup dotfile storage consistently fixes #10 #13
knoebber added a commit that referenced this issue Aug 2, 2020
Previously the storage struct had to be setup with
multiple calls in different places:

 - In commands.go, Create a storage literal and set its fields
 - In files.go, call setup()
 - In data.go, call setPath()

These were called lots of different places in the code,
and there was no guarantee that the struct had to been
initialized correctly. Instead I created one function, Setup(),
to do this work. The fields the CLI must call this now.
Once Setup() is called, the backend is free to use the storage
struct.


Former-commit-id: d05318f
knoebber added a commit that referenced this issue Aug 2, 2020
Setup dotfile storage consistently fixes #10 #13 

Former-commit-id: 6dfdead
knoebber added a commit that referenced this issue Aug 2, 2020
Previously the storage struct had to be setup with
multiple calls in different places:

 - In commands.go, Create a storage literal and set its fields
 - In files.go, call setup()
 - In data.go, call setPath()

These were called lots of different places in the code,
and there was no guarantee that the struct had to been
initialized correctly. Instead I created one function, Setup(),
to do this work. The fields the CLI must call this now.
Once Setup() is called, the backend is free to use the storage
struct.
knoebber added a commit that referenced this issue Aug 2, 2020
Setup dotfile storage consistently fixes #10 #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant