marstr / marstr/baronial

diff fails on empty repository

Open
#68 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
13
Forks
0
PR merge metrics
No merged PRs in 30d

Description

System Information

Version:  v0.2.0-alpha-modified

System: linux/amd64
Go: go1.14.2
Source Revision: 16abc7be5a5ad17a0aeb0f1a7815f5e13a67bd1b

## What did you do?

``` bash
baronial init
mkdir accounts/checking
mkdir -p budget/food/grocery
baronial credit 10.89 ./accounts/checking/ ./budget/food/grocery/
baronial diff
```

## What did you expect to happen?

A summary of the 10.89 being added to the checking account and grocery budget should have been printed.

## What actually happened?

An error message was spat out, complaining that 0000000000000000000000000000000000000000.json doesn't exist.

Stack Trace

ERRO[0000] open /home/marstr/.tmp/tmp.7w3FkcD1mq/.baronial/objects/0000000000000000000000000000000000000000.json: no such file or directory 

Error: exec: not started
Usage:
baronial diff [refspec] [refspec] [flags]

Flags:
-h, --help help for diff

exec: not started

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sequence with `baronial init`, the account and budget directories, `baronial credit`, and `baronial diff`. Trace the `baronial diff` entry point from the missing all-zero object error; done means an empty repository produces the expected 10.89 summary instead of failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.