Stack metadata version 5
Stack metadata is now kept in refs/stacks/<branch> instead of
refs/heads/<branch>.stgit. The rationale:
- StGit's metadata branch is an implementation detail that leaks to
users whenever git branches are inspected.
- `git log --branches` and other views of the commit DAG can become
extremely cluttered when the stack metadata branch enters the picture.
Avoiding refs/heads solves this problem.
- There is a nice symmetry between refs/patches/<branch> and
refs/heads/<branch>.
- Distributed use (push, pull, clone) of stack metadata is not
significantly different with the new ref.
And the stack metadata file format is now JSON instead of the former
custom format.
- Can use off-the-shelf JSON parser and serializer from Python standard
library. Fast, easy, and less surface area for bugs.
- Stack metadata becomes more accessible to third-party tools, scripts,
and programming languages.
- JSON format allows for additional metadata to be associated with
each patch and/or the entire stack. This may be useful for advanced
features such as patch guards.
- The stack.json file remains at least as human-readable as the old meta
file. Line-oriented diffs also remain effective.
Resolves #65.
Signed-off-by: Peter Grayson <pete@jpgrayson.net>