Ever since the --stdin option was added to "git update-ref" in
c750ba9519 update-ref: support multiple simultaneous updates (2013-09-09)
the "verify" command has been broken. If no <oldvalue> is specified,
the documentation says that the "verify" command will verify that the
reference doesn't currently exist. But in fact, it unconditionally
*deletes* the reference (!)
Hopefully this is not a common usage idiom, but this is nonetheless a
serious bug.
Add some tests for this and related functionality, then fix the bug.
These patches are also available from my GitHub repository [1] as
branch "update-ref-verify-fix-v1".
This fix applies to "maint", for which I think it is appropriate. It
also merges through to "master" with no conflicts, though it conflicts
trivially with "pu".
[1] https://github.com/mhagger/git
Michael Haggerty (2):
t1400: add some more tests of "update-ref --stdin"'s verify command
update-ref: fix "verify" command with missing <oldvalue>
builtin/update-ref.c | 14 +++-----
t/t1400-update-ref.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+), 9 deletions(-)
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html