Skip to content

TopGit-0.19.4

Compare
Choose a tag to compare
@mackyle mackyle released this 15 Feb 11:16
· 683 commits to master since this release
topgit-0.19.4

There be octopuses here!

tg update now prefers to perform index-only merges where possible
and will now make octopus merges when only simple in-index merge
resolution can be accomplished. It now also uses a --continue
mechanism rather than the prior subshell mechanism for conflict
resolution and supports multiple explicit branch names without the
-a option.

The tg annihilate, tg create and tg depend add (which now allows
multiple dependencies to be added at once) all run tg update
under the hood as the final step so they too can end up creating
an octopus merge.

A new tg status command has been added to show the current state
of any pending tg operation that's awaiting user action (along
with a helpful list of the correct commands to use to
continue/abort the action).

Just a few tiny updates

Other than already mentioned in the above section, the tg tag
command has a new --tree option to force a particular tree to be
used in the tag.

The tg revert command now understands the standard --short=n,
--no-short and --short options when showing the contents of a
TopGit tag as well as the new --hash option to only show the
hash (lets it work similarly to the git rev-parse --verify
command to extract hashes from a TopGit tag).

The tg revert command will now accept a bare hash value when
reverting if it's the hash of a TopGit tag.

The tg summary command has a convenient --heads-only option
that limits the output to independent heads only.

The tg info command has a new --leaves option to show the
leaves of the TopGit portion of the graph which is extremely
helpful when determining what the correct commit to rebase onto
should be when creating a linearized patch output (it should be
the single line output by tg info --leaves -- bad news if more
than one line comes out).

Like Git, TopGit will now accept @ for HEAD.

Correctness, cleanup, git accomodations and minor bug fixes

Some sh-is-bash bugs have been accomodated, the -r option should
now really be usable with tg create (it's now properly parsed),
any branch names passed to tg update using the -a option
should now be honored again (broken since 0.18.0), multiple -b
options to the tg export --quilt command now work, the tg revert
command will now detach your HEAD if it modifies the ref a
symbolic-ref HEAD points to, the topgit.autostash boolean now
defaults to true if not set -- it will save your butt so better
it's on by default and a few Git idiosyncracies are now better
accomodated (early detection of no valid ident and supplying
--allow-unrelated-histories to git merge for v2.9.0+, multiple
work trees since v2.5.0, core.hooksPath since v2.9.0).

Git version 1.8.5 or later is now required. It has actually been
required since 0.19.0 but was not being checked for. The reason
is the use of the cat-file --batch-check command and its new
%(rest) format -- there really isn't any good alternative for it
and Git 1.8.5 was released over three years ago at this point (and
Git versions prior to 2.4.11 have known security issues and really
should be avoided anyhow).

With this release, hopefully all ref ambiguity and quoting issues
have been resolved and any valid Git branch name should now be
useable as a TopGit branch name.

New Top-Bases Location

TopGit now allows the top-bases refs to be stored under refs/heads
(as they are really branches) rather than bare refs/. The new
tg migrate-bases command (and associated help) talk about this
and there's a new preference topgit.top-bases (can be set to
"refs" or "heads" or left unset for auto) and new tg --top-bases
option to show the value for the current repository.

The default is still to store the top-bases in the same refs/
location as always but starting with release 0.20.0 the default
will change to the new location. All commands should now,
howevver, accomodate either location (but you cannot mix and
match, it's one or the other) automatically detecting whatever is
in use in the repository by default.

Testing Framework

There is a new testing framework (adopted from Git but modified)
now present in the "t/" subdirectory. Currently it only tests the
testing framework but more tests will be added in the future.

Kyle J. McKay (128):
      tg.sh: next version is 0.19.4
      hooks/pre-commit.sh: run grep with LC_ALL=C
      tg-create.sh: fix parsing of -r branch option
      tg.sh: update version comparison code
      tg-create: add some --quiet options
      tg.sh: require Git 1.8.5 or later
      tg-annihilate: minor optimization and cleanup
      bashbug: workaround bash bug set -e exit failure
      tg-rebase.sh: correct more "git rebase" messages
      tg-rebase.sh: stop the --auto-continue if no progress
      tg: better accomodate user.useConfigOnly=true
      tg: avoid echo option misinterpretation
      tg: supply --allow-unrelated-histories option to git merge
      tg-annihilate: delay all updates until the end
      tg-patch: do not show "depends on:" if the list is empty
      tg.sh: add make_empty_commit function
      tg-revert.sh: detach HEAD before reverting its symref
      tg.sh: restore non_annihilated_branches support for args
      tg-tag.sh: add --shell to git for-each-ref and eval
      tg: replace top-bases with "$topbases" and avoid unquoted refs
      tg: remove unnecessary trailing '\' line continuation characters
      tg: replace `...` with $(...)
      tg.sh: remove wc_l function
      tg-update.sh: default topgit.autostash to true
      tg-export.sh: validate and accept multiple -b options
      tg-delete.sh: make a -f -f HEAD detach nicer
      tg: add bin-wrappers/tg to run uninstalled tg
      tg: add testing framework
      Makefile: switch from TG-PREFIX to TG-BUILD-SETTINGS
      testlib: provide config settings to tests and use them
      testlib: make test-lib-functions.sh pure functions
      test-lib.sh: move to test-lib-main.sh
      testlib: make test-lib-main.sh pure functions
      test-lib-main.sh: split initialization into generic and specific
      test-lib-main.sh: minor efficiencies
      testlib: cache generic test setup for multiple test runs
      test-lib-main.sh: do not run any tput commands with --no-color
      test-lib-functions.sh: use '%s\n' instead of "%s\n"
      test-lib-{main,functions}.sh: eliminate use of expr
      t/Makefile: make test target work as well as prove
      test-lib-functions.sh: replace egrep with grep -E
      tg.sh: use command -v instead of which
      testlib: show failing filename and line number on failures
      testlib: move tee and special func defs into functions
      testlib: improve lazy prereq cache eval
      testlib: alter color handling
      test-lib-main.sh: use say_tap and say_color_tap for TAP output
      testlib: find the test library more robustly
      test-lib-main.sh: introduce TESTLIB_TEST_NO_SUBSHELL
      testlib: allow a test script of '-'
      testlib: empty tests fail plus improved lint
      test-lib-functions.sh: make test_must_fail work properly
      t0001: add basic testlib tests
      test-lib-main.sh: let --color enable color output
      testlib: never hide error failures
      testlib: more efficiencies and correctness
      tg: case cleanup
      tg-revert.sh: do not show "no change" lines
      tg-revert.sh: accept hash names when reverting
      tg-tag.sh: when using -g on tgstash show "commit" message
      tg.sh: switch to more efficient vcmp
      tg-revert.sh: convert any top-bases in TOPGIT REFS
      tg.sh: auto-detect proper value for topbases
      tg: purge use of basename, dirname and touch
      tg: minor subshell efficiencies
      tg.sh: make sure the hooks directory exists
      tg: case $topbases before heads
      tg-revert.sh: do reverse topbases conversion if necessary
      tg-update.sh: optimize recursion
      tg: use --count with rev-list
      tg: retire use of fgrep
      tg-revert.sh: accept list --short=n, --no-short and --short options
      tg: refactor quotearg function
      tg-revert.sh: support new --hash option
      tg-update.sh: merge into base all at once
      tg.sh: new --top-bases option to show refs/$topbases
      README: add lots more docs
      tg.sh: avoid modifying a symbolic link pre-commit hook
      tg-update.sh: reduce number of checkouts slightly
      tg-update.sh: perform index-only merges whenever possible
      tg-{revert,update}.sh: quiet confusing auto stash messages
      tg: move $tab and $lf defs into tg.sh
      tg-update.sh: there be octopuses here!
      tg.sh: allow @ to be used instead of HEAD
      tg-summary.sh: default to --with-deps when sensible
      tg-annihilate.sh: suppress `tg update` with --no-update
      tg-create.sh: show `tg create --continue` to continue
      tg-update.sh: allow multiple branch names
      Makefile: use $(commands_in) instead of $(wildcard ...)
      tg-tag.sh: clean up usage message assignment
      tg-tag.sh: allow "anonymous" stashes
      tg-update.sh: rename --skip to --skip-missing
      tg: introduce "tg status" command
      tg: accomodate multiple git worktrees
      tg.sh: make ensure_clean_tree also ensure clean state
      tg-remote.sh: handle new bases location better
      tg-annihilate.sh: ensure_clean_tree & undetach HEAD
      tg-summary.sh: skip annihilated branches
      tg-push.sh: restore "-a" functionality
      tg-update.sh: abolish subshells!
      tg-annihilate.sh: run a single tg update command
      tg-depend.sh: allow adding multiple dependencies
      tg-depend.sh: expunge use of tsort
      tg-create.sh: use tg update to merge extra dependencies
      tg-create.sh: handle -r with new bases
      tg-info.sh: report correct status for new bases location
      README: fine tune update process description
      tg-summary.sh: handle new top-bases location
      tg.sh: handle remote bases in new location
      tg-tag.sh: with --tree=treeish set tag's tree
      tg--index-merge-one-file.sh: add rudimentary -h help
      tg-migrate-bases.sh: migrate top-bases to new location
      tg.sh: respect core.hooksPath mostly
      Makefile: define PROGRAMS variable
      tg.sh: support tg status --exit-code
      tg-summary.sh: add --heads-only option
      tg-info.sh: new --leaves option
      tg-remote.sh: handle new bases location
      README: add a REQUIREMENTS section
      README: explain what tg log does
      test-lib-main.sh: allow --expensive as --long-tests alias
      test-lib-main.sh: allow --xtrace long option name for -x
      test-lib-main.sh: keep same exit code with --tee
      test-lib-main.sh: with --verbose-log allow --verbose-only=... and -x
      test-lib-main.sh: add test_plan function
      test-lib-functions.sh: make test_copy_bytes use dd
      test-lib-functions.sh: implement LASTOK prerequisite
      README*: add testing library documentation