Closed sir4ur0n closed 3 years ago
Interesting, I never thought this would create confusion. They are indeed unrelated; the version
is used when fetching file by URL (template). I think I'll just add a --rev
flag for setting the revision; I might even remove -r
(which is --repo
) because it's pretty rare that people update the repo.
@Sir4ur0n does this help? https://github.com/nmattia/niv/pull/271
@nmattia yes, it does (thank you by the way!), though I think the role of attributes should be clarified, at least on the readme, what do you think? The relationship between attributes and templates is never explained explicitly...
Hello!
niv init
, the JSON contains therev
field to store the Git commitniv add
, the JSON contains therev
field to store the Git commitniv update
orniv modify
, the help proposes the-v
or--version
option, stating:Using this option doesn't touch the
rev
field but instead adds aversion
field, which seems unused by Niv?It looks like the field was renamed from
rev
toversion
or vice-versa but not everything was migrated, is my intuition right?If yes: I propose we use this issue to fix this inconsistency. If no: then what's the deal with these 2 options? It should be documented/further explained, as it's ambiguous. And why isn't there an option in
niv update
andniv modify
to change therev
field, as it seems to be the default?I'm not used to Niv (yet) so please bear with me if my understandings are wrong :grin: