Please make ostree show use the latest commit if no parameter was specified. I have a workflow like this: # atomic host status TIMESTAMP (UTC) VERSION ID OSNAME REFSPEC * 2015-07-31 13:17:47 7.1.4 23e5e89ba5 rhel-atomic-host rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard 2015-07-24 15:03:31 7.1.3.1 34b9bb94a7 rhel-atomic-host rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard # ostree show 23e5e89ba5 ... skip ... If we can make ostree show default to the latest it will be easier for automation tools b/c I won't have to parse the output of the previous command. This will also be consistent with 'git show'.
You can specify the branch name: # ostree show rhel-atomic-host/7/x86_64/standard Would that work for you?
Defaulting to the latest commit on a booted ostree deployment of course can only work if you're actually booted into an ostree deployment. This won't work if you're on, say, a plain Fedora machine staging commits on a local ostree repo. And it violates the "ostree" vs "ostree admin" command partitioning. That said, if we considered this a restricted special case -- failing as it does now when not applicable -- then it could be a nice usability win. And similar defaults could apply to other non-admin commands like "ostree log", which I've typed many times myself forgetting the REF argument. It's a design decision for Colin, though.
(In reply to Matthew Barnes from comment #2) > And it violates the "ostree" vs "ostree admin" command partitioning. This is indeed something that honestly is *very* confusing for administrators, and I think in retrospect I chose wrong. The default should have been `ostree fs` for the filesystem stuff, then `ostree` = `ostree admin`. Oh well. (This is of course leaving aside the whole rpm-ostree/atomic extra layers) Which speaking of, we can certainly add more verbs on either side for this. `atomic host show-commit` could do what you want.
(In reply to Giuseppe Scrivano from comment #1) > You can specify the branch name: > > # ostree show rhel-atomic-host/7/x86_64/standard > > Would that work for you? Yes.