Commits


make output of 'got ref -l' more consistent Ensure that got ref -l provides consistent output regardless of whether references are packed or not. Problem reported by naddy@ Also make 'got ref -l name' work consistently when the provided argument is the name of a reference, rather than a ref-prefix. ok naddy


replace "(cd path && git cmd)" with "git -C path cmd" This matches the existing use of "got -r path cmd" and "git_commit path args".


regress: nix 'set -A' kshism from tests As reported by naddy, this is a non-portable Korn shell construct. Instead, use the one argument array then make faux space-delimited string "arrays" for the other ids; they can still be indexed with pop_idx. improved by + ok naddy@


got: enable more commands to accept commit keywords More work adding commit keyword support to the blame, cat, ref, tag, and tree commands. With this, all Got commands that take a <commit> option argument or operand now support keywords. Regress flub saved by op! fixes + ok op@


remove trailing whitespace; patch by Josiah Frentsos


don't pass $ret to test_done on failure when it's known to be zero Otherwise the test directory it's not left in place; ok tracey@


use test(1) -eq and -ne to compare integers, and reduce quoting This brings the rest of the regression test scripts in line with patch.sh.


ref.sh: fix pastos and report the actual command that was run


add missing "return 1" to failure handling in the regress scripts ok stsp@


make 'got ref -d' print reference name and value like the new -X options do


validate reference names in open_ref() This catches invalid reference names passed to 'got ref -l' and will also be needed to validate reference names passed to a future 'gotadmin pack' command. ok naddy@


use POSIX [s1 = s2] syntax instead of [s1 == s2]; patch by Ryo ONODERA


make dangling symbolic references show up in 'got ref -l' Storing a resolved ID for each reference list item was a bad idea. This ID cannot be resolved if a symbolic references points to a reference which does not exist. Such symrefs were skipped by got ref -l as a result. Just let users of reference lists resolve the IDs as needed.


make 'got ref -d' delete both loose and packed representations of the reference


switch function declarations from Korn shell to Bourne/POSIX shell syntax ok stsp


add a -q option to tests for quiet output and use it for 'make regress' Previous default output remains when test cases are run individually. ok tracey


handle refs/remotes/origin/HEAD properly; reported by Matthias aka _xhr_


allow for limiting output of 'got ref -l' to a single ref or a namespace


add -c option to 'got ref' which now expects just one argument after options


allow 'got ref' to manipulate refs which do not have a slash in their name


in test_ref_create, test creating a new ref based on a commit ID


fix typo in comment


test behaviour when 'got ref -s' is given a non-reference target


introduce 'got ref -s' and add two tests for 'got ref'