summaryrefslogtreecommitdiff
path: root/doc/bugs/Using_date_matching_options_gives_scary_error_messaes_on_empty_reflog.mdwn
blob: 006de83004c32dbff3d1f0cc0fe1587280a53b96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
### Please describe the problem.

When the reflog is empty, time-based `--in` expressions give scary messages that makes it look like something is really broken.

Instead of `Fatal: Log blabla is empty` and `Broken pipe` a reasonable message would be e.g. `warning: Log for 'refs/heads/git-annex' is empty.`

### What steps will reproduce the problem?

Emptying reflog for `refs/heads/git-annex`, then using an `--in=here{date}` option to e.g. `git annex fsck`.

### What version of git-annex are you using? On what operating system?

`git-annex version: 5.20140412ubuntu1` on Ubuntu Trusty.

### Please provide any additional information below.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log

$ git reflog expire --expire=all refs/heads/git-annex
$ git annex find --not --in here@{yesterday}
fatal: Log /home/clacke/pics/.git/logs/refs/heads/git-annex is empty.
fatal: Log /home/clacke/pics/.git/logs/refs/heads/git-annex is empty.
[ . . . ]
^C
git-annex: fd:10: hGetLine: end of file
git-annex: fd:9: hFlush: resource vanished (Broken pipe)
git-annex: fd:9: hFlush: resource vanished (Broken pipe)
[ . . . ]

# End of transcript or log.
"""]]

> [[fixed|done]] --[[Joey]]