TopGit-0.19.13 - Infernally Internal



TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location under heads. This new location will become the default as of the TopGit 0.20.0 release. The current location under refs will continue to be supported in the future. See tg help migrate-bases for more details.


A great deal of behind-the-scenes work has been completed in this release.

Core awk functionality now has full test coverage. Some code refactoring needed to move forward with some other improvements has been done (and tests added for it). There are only a very few end-user visible changes:

  1. tg goto is an implicit alias for tg checkout goto, but only if no topgit.alias.goto has been explicitly configured.
  2. Both tg export and tg import accept a new --notes option.
  3. Much of the help has been cleaned up and the text-only versions polished to make them more readable and more digestible (there's still plenty of room for future improvements though).


There are several accomodations and updates to handle the idiosyncrasies of more recent Git versions. Of particular note, --object-format=sha256 repositories (available since Git 2.29.0) are handled properly and all the tests are automatically run against both the sha1 and sha256 formats when testing with a version of Git that is version 2.29.0 or later.

There are several bug fixes included in this release.

All users of TopGit are strongly encouraged to update to this release due to the various bugs that it squashes.

Of particular note is a bug that had been present since 0.19.4 that may have resulted in a tg update finishing but then tg summary still showing that things were out-of-date. Most often seen when dealing with TopGit remotes. A second tg update did correct the issue and although nothing was actually incorrectly merged, the bug, when triggered, did cause several unnecessary merge commits to be entered into the repository's history.

Another corrected bug involves use of branch names that contain characters with an ASCII value less than 0x2F (/). When certain combinations of such names were encountered, incorrect operation could have resulted.

Other notable bug fixes are highlighted in the next section.


Kyle J. McKay (214): next version is 0.19.13
    t/.gitattributes: add some binary attributes
    INSTALL: add missing end-of-line
    README: correct typo in ref name
    t/README-TESTLIB: fix five typos and two grammos
    t/README: remove internal 's from sample
    t/README-WRITING-TESTS: correct typo pass --git-dir for git based test_diff
    topgit_deps.awk: omit self loop lines
    topgit_deps.awk: omit duplicated .topdeps lines
    topgit_deps.awk: clarify and refine exclbr/inclbr operation
    topgit_deps.awk: always remove files when requested
    topgit_deps.awk: omit annihilated self deps
    t1370: test topgit_deps.awk functionality mention ref_match in more require lines
    topgit_recurse.awk: improve operation description
    topgit_recurse.awk: always remove files when requested correct typo in function comment
    ref_prefixes.awk: minor efficiency
    ref_prepare.awk: minor efficiency
    topgit_branches.awk: minor efficiency
    topgit_msg.awk: minor efficiency add function word count test
    topgit_recurse.awk: init even with no input
    topgit_recurse.awk: elaborate on functionality
    topgit_recurse.awk: make multib mode ignore dupes
    t0001: add a sanity test for `cat -` just in case
    topgit_recurse.awk: clarify and refine exclbr/inclbr operation
    t1380: test topgit_recurse.awk functionality
    topgit_navigate.awk: correct typos and elaborate
    topgit_navigate.awk: always remove files when requested correct typo in error message
    topgit_navigate.awk: disallow outgoing links from annihilated
    tg-info: make --leaves "describe" lightweight --tags
    topgit_navigate.awk: elaborate and correct text comments
    topgit_navigate.awk: clarify and refine exclbr/inclbr operation
    topgit_navigate.awk: count the step off of nil
    topgit_navigate.awk: roots not always equal to starts
    tg: add implicit topgit.alias.goto="checkout goto"
    ChangeLog: use correct name of smudger in comment
    topgit_navigate.awk: after prune recalculate incoming and outgoing
    t1390: test topgit_navigate.awk functionality
    t0001: advance some awk checks to "expect success"
    Makefile.mak: correct typo in comment
    Makefile: cleanup and polish
    Makefile.mak: mention a few more settings minor nit use double-quotes
    t/Makefile.mak: use TESTLIB_TEST_LINT not TEST_LINT update from Git expunge use of perl add awk() function redirect
    t/t1200/maketable: replace perl version with awk version do not pass arguments to dot command
    tg-update: factor out merging code introduce a show-toplevel helper function accomodate gpg2
    README: rename to README_DOCS.rst
    Makefile.mak: improve html generation
    README: add a descriptive Read Me
    README: expand README with example update from Git
    Merge branch 'show-toplevel-helper' make .topdeps/.topmsg cache write atomic
    comments: eliminate clumsy grammos
    t/ correct typo in comment make GIT_PATH test setting actually work initialize TRAPEXIT_ to empty accomodate Git v2.30.0 checkout-index breakage
    t/t0002: add an explicit test for GIT_CONFIG_PARAMETERS
    t/t2000: add --quiet option to `git init`
    t/t6100: accomodate git symbolic-ref brokenness since v2.29.0
    t/various: introduce git_init function and switch to it
    README: future proof example against Git version 2.28.0 and later
    README: add setting to example
    t/README: correct yet more typos
    t/README: quote the TAP regex's and mention they are PCRE
    t/t6100: add more reflog verify-ref tests
    tg-*.txt: improve the readability of the .txt help
    README_DOCS.rst: update git mailing list archive link
    t/ minor checkbashisms adjustments
    t/ minor checkbashisms adjustments
    README_DOCS.rst: include custom tg tag color config info
    README_DOCS.rst: update synopsis output
    README_DOCS.rst: correct tg tag help for --clear
    Makefile: trivial whitespace change
    awk/ref_match.awk: do not choke on '&' in ref names
    awk/ref_match.awk: always sort refs without trailing '/'
    README_DOCS.rst: correct spelling error
    README-TESTLIB: correct yet another typo
    awk/topgit_navigate.awk: typo be gone
    awk/ref_prepare.awk: grammo be gone
    awk/ref_prefixes.awk: bring comments up to date
    t1301: test special ref name characters with ref_match.awk
    tg*.sh: use git mktree instead of git hash-object -t tree
    README: mention tg push and fuss with docs mention
    README_DOCS.rst: do not split ``code text`` across lines
    t/Makefile.mak: add trap on INT for non-prove aggregate results
    t/ make sure test_auh is correct
    t/test-lib-{main,functions}.sh: prohibit perl in tests
    test-lib*.sh: remove the last use of PERL_PATH
    test framework: add underpinnings for Git sha256 support
    t0002: update for Git hash algorithm sha256
    test-lib-*.sh: make sure GIT_DEFAULT_HASH gets into the test cache
    t1050: add Git sha256 support
    tg: initial Git sha256 hash algorithm support
    t1200: add support for Git sha256 hash algorithm
    tg: improve Git sha256 hash algorithm support
    t4400: update for Git hash algorithm sha256
    t8100: update for Git hash algorithm sha256
    t8300: compensate for Git sha256 patch-id behavior
    t6120: update for Git hash algorithm sha256
    t6100: update for Git 2.31+ and hash algorithm sha256
    t6100: expunge test_tolerate_failure items issue more messages when post-update checkout fails avoid false positive git checkout complaints
    t/t*.sh: do not ignore failures in for loops
    tg-push: make all pushes atomic
    README_DOCS.rst: include hint about gc.rerereResolved
    README_DOCS.rst: use t/release instead of release
    README_DOCS.rst: update URL from http: to https:
    t1060: update rev-parse --git-common-dir test accept -P as alternative for --no-pager correct typo in help
    README_DOCS.rst: mention --paginate and -P options
    README_DOCS.rst: replace man git-config with git help config
    tg-push: pass --follow-tags and --no-follow-tags options to git make -h output accessible without
    tg-update: keep state in tg-state directory
    t/README-TESTLIB-TG: add missing closing formatting character
    README_DOCS.rst: correct tg update post-update state
    t5060: test tg update --continue functionality
    README_DOCS.rst: add mention of [ROOT] branches match tg status terminology
    README_DOCS.rst: use "working directory" terminology
    README_DOCS.rst: add missing punctuation
    tg-{push,revert,summary}: accept --tgish for --tgish-only
    README_DOCS.rst: update tg prev and tg next usage summary also unset GIT_OBJECT_DIRECTORY when using -C
    README_DOCS.rst: mention source of tg tag -g date and time improve cherry-pick/revert detection
    README_DOCS.rst: update tg import -s docs disallow alternate refStorage backends become POSIX compliant add fer_branch_contains utility function
    tg-{contains,info}.sh: adopt fer_branch_contains
    t/ remove extraneous line
    t/helper/ make test_have_prereq available
    Makefile.mak: add test-sha1 and test-sha256 and update test target sort -u Makefile.dep
    Makefiles: remove __file_which_should_not_exist
    t0002: correct typo in unit test description
    README-TESTLIB-TG: eliminate typo in description
    t4500: test tg contains functionality
    t/helper/ make git_version available
    t/Makefile.mak: show git version being used for tests
    t/ rectify grammo in description
    t4200/t6120: make tests work with new bases location accomodate new bases location
    t4501: test tg contains with multi-level names
    test-lib-tg: grok default --top-bases of tg being tested
    t1020: automatically adapt to tg version >= 0.19.20
    tg-contains: correctly match all possible tg remotes with -r add a few "sort" filters
    t2031: test sequestration with git commit -a
    hooks/pre-commit: handle alternate index sequestration
    t5001: test tg update --base fast forwards some more support --no-commit option
    tg-update: exclude .top* files when using --base replace URL with URL
    various: update a few outdated URLs
    tg-*.sh: make sure stripspace uses the correct comment char
    t5002: explicitly test the issue 11 problem improve wrapping and options support
    tg-export: support --notes option
    tg-import: support --notes option handle @ alias for HEAD with --no-deps ensure ensure_clean_tree works on unborn branches
    tg-import: pass --no-deps to tg create when appropriate
    README_DOCS.rst: squash another typo
    topgit.html: generate using a consistent style
    README_DOCS.rst: reword incoherent conventions paragraph
    README_DOCS.rst: add 3-way merge glossary reference correct fatal wayback message
    README_DOCS.rst: update the out-of-date glossary entry
    README*: minor nits and alternate stub
    README_DOCS.rst: tweak tg tag -g date comments discard irrelevant spam when using --drop
    t6100: compensate for Git v2.31.0+ reflog brokenness
    t6101: perform a few more tg tag --drop tests
    tg-tag: do not update ref when dropping @{0} if different add single file merge utility function
    t5011: test tg update --skip-missing
    tg-update: do not attempt to merge missing depedency
    t5012: test tg update with remote .topdeps removal
    tg-update: avoid updating remote-removed dependencies
    README_DOCS.rst: expand the update process description
    t5021: test partial fast-forward dependency updates
    tg--merging: use correct first parent when fast-forwarding
    README_DOCS.rst: minor documentation nits
    t2200: add very basic tg depend add multiple tests
    t2300: test tg annihilate including tg update action
    docs: yet another alternate stub fuss with options indentation
    various: use "command" instead of "subcommand"
    tg: clean up generic help output handle help -h
    tg: clean up help usage output use --abbrev=8 instead of --abbrev=4 adjust use of --create-reflog option
    t6102: test tg tag -g with tabs present
    tg-tag: handle reflog entries with extra tabs
    README_DOCS.rst: wordsmith some of the commentary
    topgit: version 0.19.13

Adam Mizerski (1):
    Update INSTALL

TopGit-0.19.12 - Compatibility Conundrum



TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location under heads. This new location will become the default as of the TopGit 0.20.0 release. The current location under refs will continue to be supported in the future. See tg help migrate-bases for more details.

Tiny tweaks to provide improved compatibility with various earlier Git versions.

The minimum Git version required is now 1.9.2 (released 2014-04-09). This reflects a bump up from a minimum of Git version 1.8.5 for two reasons:

  1. A feature (exclude pathspec magic) required for the 0.19.7 changes was actually introduced in Git 1.9.0 not Git 1.8.5 so the minimum version should have been updated to 1.9.0 at that point.
  2. A feature (update-ref --stdin) also required for the 0.19.7 update, which was actually introduced in Git 1.8.5, turns out not to work correctly until a bug fix for it was included in Git 1.9.2.

There's no pressing need to pick up this update when running a Git version that is greater than or equal to 2.10.0. Users of Git versions that are greater than or equal to 1.9.2 but less than 2.10.0 probably want this update.


Kyle J. McKay (6): next version is 0.19.12
    tg: avoid passing '--' options terminator to git cat-file require Git 1.9.0 or later require Git 1.9.2 or later omit --create-reflog option prior to Git version 2.10.0
    topgit: version 0.19.12

TopGit-0.19.11 - Speed Bump



TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location under heads. This new location will become the default as of the TopGit 0.20.0 release. The current location under refs will continue to be supported in the future. See tg help migrate-bases for more details.

A small speed bump most noticeable with tg summary, a few regression fixes, minor enhancements and more tests.



Kyle J. McKay (72): next version is 0.19.11
    t2000: add kludge for ancient broken shells
    README: update Magit links prereqs may use whitespace
    tg: repair tg info --leaves regression
    t6000: test tg revert --list with short hashes refresh short ref cache as needed honor --hash when listing all refs
    tg: reduce subshell creation phase I
    tg: reduce subshell creation phase II
    tg-{export,push}.sh: avoid using "true" and "false" for testing
    tg: improve "set -e" friendliness minor efficiencies
    tg: reduce subshell creation phase III
    t1360: test topgit_msg.awk functionality
    README: mention effect of tg tag --drop ...@{0} properly quote temp file name quote alias test provide for recurse_deps_internal run_awk_topgit_deps options restore correct -i and -w operation
    t4400: test -i and -w informational options
    tg-info: support -i and -w options
    tg: sanitize `git branch --contains` output validate non-TopGit committish shortcut answers
    t4400: add tests for tg info -i/-w options show correct name in HEAD ref log displays only supply --updateref when dropping @{0}
    tg-tag: when dropping @{0} avoid deleting the ref preserve ref when dropping @{0} reflog entry
    test-lib: make prereqs list look nice
    tg-tag: avoid --stale-fix if possible when --drop'ing
    tg-tag: avoid unreliable --stale-fix entirely use correct git dir for linked HEAD
    t6100: test tg tag reflog manipulations properly --clear reflogs
    t6100: add tag --clear tests
    tg-tag: never try to delete one's HEAD carefully resolve full ref names
    t6110: test tg tag --delete
    t6100: add --no-type tests improve parsing of --all option
    tg-tag: detach HEAD before deleting its symref
    tg: tidy up "detaching" messages don't forget to stash
    tg-tag: last gasp save in ORIG_TG_STASH fix test_external test counts check --run before prereqs accept --paginate as --pager alias mimic Git alias expansion more closely do not require ident with --refs disambiguate @{upstream} for rev-parse try to tame rev-parse --symbolic-full-ref show ambiguous refname error
    tg-tag: prefer refs/heads disambiguations
    t6120: add tg tag and stash tests keep matching tags when reverting send "not up-to-date" message to STDERR
    tg-push: check for out-of-dateness before pushing
    README: minute wordsmithing make sure GIT_PATH and PERL_PATH are absolute show needed remote branch updates
    tg-info: omit annihilated dependencies from list improve branch name checks
    tg-push: pass more options through to git push
    install-html: allow RST2HTML to override rst2html
    t/ correct variable name
    Makefile.mak: allow parallel bin-wrappers creation fully construct UNSET_VARS before omit ignored dependencies
    t7000: test tg push remove shell-confusing, unnecessary space
    topgit: version 0.19.11

TopGit-0.19.10 - Pedantically POSIX



TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location under heads. This new location will become the default as of the TopGit 0.20.0 release. The current location under refs will continue to be supported in the future. See tg help migrate-bases for more details.

Minor nits and updates, but nothing earth shattering. Some "deprecated" POSIX syntax has been removed and there are now over 1000 individual tests in the test suite!

Kyle J. McKay (40): next version is 0.19.10
      README: correct various typographical errors add '-u' option to wayback-updates alias make "tg help st" work
      README-WRITING-TESTS: update test_plan and test_when_finished info do not strip ````` lines
      README: correct "The Update Process" description
      t1330: test topgit_branches.awk functionality
      *.sh: purge use of test '-a' and '-o' ops
      tg: eliminate use of xargs -0 do not rely on word-splitting inside braces run_awk_topmsg_header requires topgit_msg_prepare allow +[n] and -[n] aliases fix typo warn about future removal of bare "tg checkout" fix typo in comment
      tg: improve handling of configured core.hooksPath completely ignore hooksPath until setup_hook
      README: remedy incorrect formatting instructions avoid trailing space in fullcmd include real branch in fullcmd
      t0001: tolerate failure involving xargs -0 move tmpdir cleanup into its own function
      tg: tickle gc --auto when appropriate add missing '{' ... '}' around && || logic
      t5050: test bug fixed by recent logic correction omit superfluous rdeps-once trailing '^'
      .gitattributes: mark some files as eol=lf
      Makefile.mak: sed from stdin to stdout
      README-TESTLIB: vanquish yet another typo
      spelling: annihildated is not a word
      topgit_*_prepare.awk: do not append ^{} to missing
      topgit_*_prepare.awk: carefully append ^{blob} to missing
      topgit_*_prepare.awk: do not incorrectly spawn misscmd
      topgit_msg_prepare.awk: make withan=1 withmt=0 work
      t1340: test topgit_msg_prepare.awk functionality
      t1350: test topgit_deps_prepare.awk functionality setup_hook even more carefully
      topgit_deps.awk: strip trailing \r off .topdeps lines
      topgit: version 0.19.10

TopGit-0.19.9 - Regression Relief



TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location under heads. This new location will become the default as of the TopGit 0.20.0 release. The current location under refs will continue to be supported in the future. See tg help migrate-bases for more details.

This release is a bug fix and maintenance release primarily intended to correct the regression introduced in 0.19.8 that prevented tg update from properly handling remote branches with an out-of-date base with respect to its remote head.

Many additional tg update tests have been added to the test suite to greatly improve test coverage of both local and remote updating.

A very few extra minor cosmetic updates are included as well.

Kyle J. McKay (10): next version is 0.19.9
      tg-export: strip [RELEASE] whenever stripping [BASE] test non-remote update handling test remote update handling make remote updates work again show correct blocking ref in message test remote update new branch handling test octopus update handling run only one copy of sed, not three
      topgit: version 0.19.9

TopGit-0.19.8 - Wayback to POSIX Proficiency



TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location under heads. This new location will become the default as of the TopGit 0.20.0 release. The current location under refs will continue to be supported in the future. See tg help migrate-bases for more details.

This release is primarily a bug fix and maintenance release. A few extra options may have slipped in here and there. The test suite has grown immensely which should help reduce future regressions. One new feature did rear its head way back at the last minute though.

POSIX Propaganda

With this release TopGit should be fully POSIX compliant once it has been installed. Installation and testing also require Perl, but as of this release even the test suite can be run with just POSIX + Perl. (If you want to make the .html docs you will also need a .rst processor, but "shhhh" about that.) It even works with some awks (I'm looking at you "mawk{1}") that aren't actually fully POSIX compliant.

Maintenance Maintenance Maintenance

A veritable plethora of fixes pervades this release. There are now over 875 individual tests in 33 files. Some things that probably should have worked before (like tg export --quilt --force and @ and HEAD being accepted as aliases for the current branch everywhere it makes sense) do now.

Some more commands that should have worked in a read-only bare repository but didn't now do.

There's more tolerance for "not-quite-POSIX" shells when running in what they claim to be is a "POSIX" mode but really isn't all that. Before choosing one of them as TopGit's shell be sure to first run the test suite using that shell. Not to worry, both bash and dash (when running as /bin/sh) are fine.

Bare branches (a TopGit branch with neither a .topmsg nor a .topdeps file) are officially tolerated. They mostly worked before; they work better now.

And speaking of .topdeps files, manually edited ones (naughty, naughty) that are not quite up to snuff should cause fewer problems now.

An overall overhaul of tg summary resulted in a nice speed boost there (probably the last it's likely to get as its stone has been squeezed dry now).

Options Galore

The tg export --quilt mode now understands how to --force outputting to a directory that already exists (and no longer commplains if the directory does exist but is empty).

A new branch can be tg created using --no-update to skip the final update when more than one dependency is listed.

The tg summary command in list mode will include annihilated branches now if you ask nicely (--list --verbose --verbose or just -vvl) and tg info will even describe them properly too.

But back to tg export and its two other --collapse and --linearize modes; It got a new -s <mode> option to specify how to handle subject lines primarily focused on removal of [PATCH] and similar tags. Instead of blindly stripping everything off, the default now is to delicately remove only the first [...] tag and only if it's one of the four TopGit knows about (those would be "PATCH", "BASE", "ROOT" and "STAGE"). This should result in patches that are imported and then exported keeping their same subject line. But there are five possible modes (including the previous "strip it all off") available in an attempt to make sure everybody gets happy.

And last but not least there's one new global option...

The Wayback Machine

A new feature slipped into this release at the last minute. It comes with a new global -w <tgtag> option and a new shell subcommand.

By specifying the name of a tag created using tg tag (or even automatically via the auto stash functionality), a TopGit command can be run in the context of the refs namespace recorded in that tg tag. Either with all other refs present and unchanged or with all other refs pruned away.

This functionality can be particularly useful in combination with tg export to easily produce copies of older versions of a patch set.

The global -w option only permits use with read-only TopGit subcommands and the new shell subcommand.

The new tg shell command will spawn a new copy of the shell (or execute a specific command) with the current working directory set to a temporary repository that shares the objects but has had its refs namespace altered to the specified wayback state. When the shell is exited it's all cleaned up automatically, but there's even an option to place that "temporary" directory somewhere else so that it can persist and be reused.

Kyle J. McKay (188): next version is 0.19.8
      Makefile: add "target" target add v_sort function add v_filter and v_filter_out functions
      Makefile: make sure $(MAKE) is passed to
      Makefile.mak: compute TG-BUILD-SETTINGS differently support sub makes
      t/Makefile: switch to gnomake system
      t/Makefile.mak: improve DEFAULT_TEST_TARGET handling
      Makefile: run $(MAKE) -f Makefile.mak using -e add missing ">/dev/null" to rev-parse test allow "@" and "HEAD" as dep shortcuts
      test-lib-tg: consistently use "tg_test" or "TG_TEST" prefix
      Makefile.mak: work around broken sh behavior make sure CONFIGMAK is always set
      Makefile.mak: do not use non-POSIX make -C option
      awk: make sure close function calls use parentheses
      README: fix several typos correct default location of hooksdir
      hooks/pre-commit: make it work properly in test environment
      README: add topgit.{cc,cc,to,subjectPrefix} links to vars section
      README: minor tg-checkout doc updates
      t/ include $this_test in comments
      README: add a "TESTING TOPGIT" section
      t/Makefile.mak: introduce TESTLIB_MAKE_OPTS make variable
      t/Makefile.mak: avoid bloat when making self
      test-lib: bail quickly and with line number
      test-lib: move BASH_XTRACEFD assignment into test_lib_main_init_specific workaround broken bash enable line numbers when using bash allow test_commit to skip the tag
      t/README*: cleanup whitespace and typo errors
      README-TESTLIB: improve test_tick documentation
      test-lib: introduce TRASHTMP_DIRECTORY and test_get_temp
      test-lib: make test_when_finished fully functional add dependency lines for awk scripts
      awk/ref_match.awk: minor optimizations and typo fixes initialize empty $test_tick test_commit: ignore more invalid tag names
      test-lib: change default author and committer names
      test-lib-functions-tg: tg_test_create_branches does it all
      t8000: add tests for broken git mailinfo -b
      hooks/ remove superfluous trailing ';'
      all: unset ksh errors correct typographical error in comment
      all: unset and unalias zsh traps update/add some comments
      test-lib-functions: add wc wrapper
      tests: renumber t0001 and t0002
      test-lib-main: bless use of $color for debug output
      test-lib: improve test_cmp_rev utility function
      test-lib: introduce test_clear_when_finished
      t/ add tests for git utility functions
      awk/ref_match.awk: minor optimizations
      testlib: allow "test_plan'?'"
      t2000: test hook and merge setup happens
      testlib: add an example for test_pause
      testlib-tg: add tg_test_setup_topgit function
      t2020: test bare mode hook restrictions
      t2010: basic hook sanity checking tests
      t2030: test hook sequestration
      t0001: add test for broken awk implementation
      t0001: test for awk pattern {m[,[n]]} support
      awk: don't mock mawk move utility functions to separate file add internal command --awk-path
      ref_match.awk: add dupesok knob
      ref_match.awk: correctly match multiple patterns
      t1300: test ref_match.awk functionality
      t0001: add POSIX awk ENVIRON and POSIX tr NUL tests
      Makefile: always clear .SUFFIXES before setting it make test_expect_code work with set -e
      t1310: test ref_prefixes.awk functionality add fatal function complain about everything
      tg: refactor remote top-bases sniff out code
      t2020: include more commands in setup checks allow --top-bases to work for remotes
      tg: document and tolerate "bare branches" support --dependencies for the pedantically challenged
      README: add missing verbiage to correct grammatical error do not do hook or merge setup in a bare repository
      tg: call ensure_work_tree where needed add test_diff that uses git diff --no-index
      tg: find added lines missing final \n
      .topdeps: tolerate missing \n on last line minor correction and efficiency fix code typo purge expr and show all failures
      tg-export: understand more ranges and purge expr
      ref_prepare.awk: improve default headbase for multi-level remotes
      ref_prepare.awk: remove refs file on request even if not read
      tg-create: require format.signoff for active sob line show a message when the remote base is missing
      testlib: pimp out test_plan
      gnomake: suppress unwanted gratuitous "Entering directory ..." lines
      ChangeLog: start one
      t0001: add export unset works test make sure GIT_OBJECT_DIRECTORY is never set to ""
      testlib: quiet verbose only sanity turn template <patch description> into comment implement full GIT_ALTERNATE_OBJECT_DIRECTORIES quoting rule
      Makefile.mak: create a tgx bin-wrapper
      testlib: make --run implicitly activate --quiet without --no-quiet
      t1080: add miscellaneous tests with --no-deps (aka --base) allow any committish
      help: improve formatting of plain text and fix typo
      t2100: test tg create branch creation
      t2100: add some --no-commit tests
      tg-create: support new --no-update option strip leading spaces off --topmsg argument
      tg-create: align -n with Git and improve --no-edit
      t2110: test tg create --topmsg, --no-edit and friends improve --base message handling
      testlib: allow die function to accept a message
      t5000: add tg update --base tests make sure tg_tmp_dir is not a frankenpath
      testlib: suppress superfluous messages from rm
      tg: always pass the correct empty blob to awk
      ref_prepare.awk: support arbitrary blob checking add support for --make-empty-blob
      test-lib-functions-tg: tg_test_create_branches really does do it all
      topgit_{deps,msg}_prepare.awk: provide missing blob action
      Makefile.mak: help tg wrapper find itself create empty blob on demand
      tg: bare more functionality
      t4000: add bare branch sanity checks
      t/Makefile.mak: suppress superfluous messages from rm
      testlib: improve test target handling
      testlib: quick reference and other doc updates always show all with no options or arguments
      topgit_recurse.awk: include excess visit counts
      tg-summary: append ^ to rdeps-once branches with elided deps
      tg-summary: show annihilated with -v -v -l
      tg-summary: introduce --with-related option
      t4100: add several summary tests
      tg-summary: use run_awk_topgit_msg for all messages
      tg-summary: the last of the great speed-ups use correct remote branch list for recurse_deps_internal
      tg: provide global --pager (-p) option make needs_update return 1 for out-of-date remote enhance needs_update_check to check branch itself
      testlib: improve test_merge utility function
      helper/ allow test scripts access improve needs_update_check remote base handling
      t4200: test the out-of-date checking code
      topgit_deps.awk: scrutinize incoming branch names
      tg: disambiguate refs/heads/refs/remotes/<name>/<branch> construct playground before trying to use it contravene collapse collisions
      tests: require proper POSIX tr NUL behavior allow -v and -l options to bundle
      t8200: test export subject stripping behaviors compute TRASH_DIRECTORY differently
      tg: avoid bogus missing status for solitary branches
      topgit_msg.awk: allow extracting multiple headers
      topgit_msg.awk: mostly avoid outputting blank lines switch to nicer subject formatting support --quilt --force and tidy up usage unwrap multi-line usage lines
      help: polish up the plain text help a bit
      testlib: support TESTLIB_TEST_TAP_ONLY for sanity
      testlib: warn if there's no TG-TEST-SETTINGS file
      make: remake TG-BUILD-SETTINGS and TG-TEST-SETTINGS on config mods
      tg-export: add subject [...] handling modes make run_awk_topmsg_header see the truth correct missing reftype in damaged tag message make sure noalt_setup takes effect when it should
      t4100: shake up one of the .topmsg subjects a bit
      hooks/pre-commit: stop using cat_file -i -tm= for topmsg_header and correct comments make full use of run_awk_topmsg_header
      tg: add missing --tgish-only argument overhaul it all fully enable caching as designed minor optimizations add is_empty_dir function allow --quilt export to pre-existing empty dir
      topgit_msg: expose bare branches
      testlib-tg: add tg_test_create_tag utility function promote test_done messages to TAP status
      tg: add wayback machine
      topgit.html: clean up the generated XHTML
      tg export: no need for merge or hook setup
      README-TESTLIB-TG: fix typo
      tg-export: wayback to older patch sets
      ChangeLog: topgit-0.19.8 release
      t8400: export tests for all three modes with remotes

TopGit-0.19.7 - Awesome Acceleration


Awking Awesome Acceleration!

It was supposed to be such a quick and simple update, surely it would be done in no time at all. And then it started growing...


By moving the .topdeps traversal code into awk (strictly POSIX awk), everything has become stupendously faster. For example "tg summary --verbose --list" is now nearly instant ("--verbose" is new and includes the subjects in the list).

The sole remaining bottlenecks are the git commands; generally checking for some kind of branch containment (similar to "git branch --contains") or performing actual merge operations themselves.

The results of branch containment checks continue to be cached and auto-updated on an as-needed bases, but now with index-only merging support there's likely little, if any, more water left to be squeezed out of the performance stone.


"tg contains" (the original driver for this set of updates) shows what TopGit branch a commit logically belongs to. For example, after finding something with "git log -S", passing the result to "tg contains" will show which TopGit branch (if any) that commit logically belongs to (and where any "fix" should therefore end up).


While the tests still require gnumake, the build and installation now require only a POSIX compatible make (and POSIX compatible utilities).



Not necessarily a comprehensive list here, but these are notable.

Kyle J. McKay (116): next version is 0.19.7 st[atus] --help
      Makefile: support V=1 when $HARNESS_ACTIVE use exit 0
      tg status: show upstream info and implement verbose verify_topgit_branch correctly for 'HEAD' on checked out base
      tg: improve multiple worktree support
      tg status: behave reasonably in a bare repository
      tests: support building and using helpers
      tests: add recurse_deps_internal helper add v_verify_topgit_branch function pass along a --force option to git checkout
      summary/revert: make --heads DWIM and add alternative make --heads work as intended
      t/helper/ needs_update testing helper new command to show containing TopGit branch(es) be cognizant of annihilated branches show dependents with --verbose include new '*' "needs merge" column allow --top-bases to work outside a git dir add topgit.alias.* support handle HEAD symrefs
      helpers: make -u option actually work and fix a usage typo introduce TopGit-specific test functions library
      testlib: add TEST_HELPER_DIRECTORY and some doc updates recurse_deps provide _dep_has_remote and early termination
      tg: avoid tree turds fallback to tmp dir outside .git quote problem alternate directory paths
      tg: avoid "not a valid object name" messages allow pretty_tree to accept any treeish ref create bases without .top* files after simple merge failure keep simple merges disabled improve .topdeps and .topmsg merge handling be more or less --aggressive
      tg: refactor diff added lines extractor
      tg-update: automatically set up newly picked up remote deps repeat update when new dependencies picked up warn when a new non-existing dependency gets merged limit hook's auto_create_local_remote activity
      Replace " handle HEAD symrefs" use --base to create a [BASE] branch introduce --base mode omit --no-merges option for [BASE] branches support --compact and --command=<name> options
      Makefile: expand @AWK_PATH@ and @SHELL_PATH@ everywhere
      tg: the great LC_ALL=C out make "@" work properly as alias for HEAD
      tg: consolidate contained_by fix tg update --abort and clarify --stop
      tg: support --exec-path option
      t1200: add tests for index-merge-one-file merge-index helper
      tg: support $tgdisplayac for --abort/--continue display
      tg: replace $tg with tg() and export TG_EXPLICIT_REMOTE behave when --stop|--skip|--continue used out of update avoid multiple rev-parse --show-cdup calls give progress messages some structure
      tg: add missing --no-pager option include bad ref in ref_exists_rev failure message avoid schizophrenic caching use --no-deref when returning to a detached HEAD make checkout_symref_full -f really -f remove special case and allow auto rerere continue --aggressive optimizations add ensure_clean_topfiles make sure creation does not lose .topdeps or .topmsg prevent existing "clean" .topfiles from aborting creation word creation using "base" not "$topbases/" minor branch_needs_update efficiency
      Awking Awesome Acceleration! awksome accelerate recurse_deps_internal awksome accelerate non_annihilated_branches
      tg: add navigate_deps function and helper awksome accelerate --heads preload .ref cache awksome accelerate --heads accelerate find_leaves a bit miscellaneous small improvements awksome accelerate --list --verbosely allow recurse_deps to pass options into run_awk_topgit_recurse support --rdeps-once and --rdeps-full I hate bash bugs get all awked up on --from introduce --series[=<head>] option allow choosing a consolidation commit's first parent
      README: add an explicit TopGit alias example
      tg-checkout: push previous parent child terms aside to make next pop support global --no-pager option
      tg: awksome accelerate top-bases computation
      tg: awksome accelerate list_deps by banishing it use $_dep_annihilated not branch_annihilated function
      tg-checkout: awking awesome --series of overhauls do not use `tg prev` or `tg next` support --deps and --dependents options
      tg: previous to next overhaul automatically set rerere.autoUpdate by default with --series=<name> HEAD may be detached
      t/Makefile: provide GNU make required hint
      t/Makefile: clean TG-TEST-SETTINGS too
      t/Makefile: nicety for test target aggregation when no results
      t/Makefile: compute TG-TEST-SETTINGS differently
      Makefile: switch to gnomake system
      Makefile: add dependencies
      t/helper/recurse_deps_internal: more correctly parse args
      tg: provide some debugging help with TG_DEBUG
      topgit: fully qualify more refs
      tg: alternatively not so much leaking pass on -q and -m to git autostash and support --stash and --no-stash autostash and support --stash and --no-stash allow a name to be specified watch out for sneaky blobs word merge messages using "base" not "$topbases/"
      README: update to match current tg create behavior allow recursive tg invocations to reuse temporary dir create the ref cache dir hierarchy more efficiently



Small bug fix release

Kyle J. McKay (19): next version is 0.19.6 preserve pre-loaded message during update
  t: remove "tg-" from test file names
  README: add merge strategy information suppress "automatic" merges on failed octopus allow detached return only preload "[PATCH]" commit msgs add blank line before footer abort early if initial checkout would fail
  rename: t1001 -> t1000 avoid problems with special chars in repo path refactor switch_to_base into checkout_symref_full allow checkout_symref_full to accept a hash allow returning to arbitrary HEADs
  t1100: test tg migrate-bases command make sure exported variables get cached
  test-lib*.sh: set GIT_CEILING_DIRECTORIES
  t0000: verify that git rev-parse --git-dir fails
  t*.sh: remove GIT_CEILING_DIRECTORIES settings



Small bug fix and update release

The git rev-parse --git-common-dir command is broken when run in a subdirectory of the top level of a normal Git checkout. This is now worked around by cd'ing to the top level before using it.

The tg base command now understands the standard --short, --short=n and --no-short options to control the number of hash digits shown.

The subcommand -h or --help options can now be used outside of a Git repository.

An initial batch of tests has been added that cover the common global tg options and setup (and the broken rev-parse --git-common-dir issue).

Kyle J. McKay (17): next version is 0.19.5
  README: fix typo understand --short[=n] and --no-short options remove mention of --continue work around broken git rev-parse --git-common-dir allow -h or --help subcommands to work w/o repository
  t/README: establish test numbering conventions
  t1001: add basic option tests prevent the `tg base` command from causing merge setup to happen avoid chmod ""
  t1010: test that help works anywhere make test_create_repo use --quiet
  t1020: test proper tg --top-bases operation
  t1030: test tg -C option used multiple times
  t1040: test proper operation of -r and -u options
  t1050: test tg status output
  t1060: test mergesetup configuration and broken --git-common-dir

TopGit-0.19.4 - Octopuses


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



Minor TopGit update with less tg update spew and some typo fixes

Kyle J. McKay (4): next version is 0.19.3
  README: fix various typos clarify some update information messages reduce git merge spew



Minor TopGit update with improved POSIX compatibility and recursion protection.

Kyle J. McKay (3): next version is 0.19.2 make basename/dirname use POSIX friendly prevent dependency loops during recurse_deps



Minor TopGit fixes, efficiency improvements and branch/tag disambiguation.

Kyle J. McKay (10): use --count instead of wc -l for rev-list counting measure_branch: accomodate full ref names pass full ref names to measure_branch next version is 0.19.1 exclude non-symbolic refs from TOPGIT REFS use fully-qualified ref name with git merge output out-of-date remote branch on its own line measure_branch: allow extra heads report correct commit count when base is out-of-date allow --stash to be used with --drop, --clear and --delete

TopGit-0.19 - Undo At Last


A major TopGit update.

Major new commands include tg tag and tg revert. When combined, tg tag and tg revert can provide a kind of tg update undo. See the new "NO UNDO" section in the README. A new tg rebase command is also included to provide a git rebase --auto-continue functionality. The use of tg create has been greatly streamlined and it learned several new options to specify .topmsg content. Furthermore, TopGit branches with no dependencies (an empty .topdeps file) are now officially supported with the new tg create --no-deps option.

New with this release TopGit attempts to keep commits that change .topdeps and/or .topmsg separate from other changes. See the new "SEQUESTRATION" section in the README for details.

The tg summary command learned several new options most notably the --heads option which can be combined with --rdeps (as tg summary --rdeps --heads).

The tg command learned to accept -c <name>=<value> options to be passed through to any git commands that are run.

The tg delete command learned to detach your HEAD (thereby allowing deletion of the HEAD branch) with -f -f.

The tg info command learned a new --heads option to tell which of the tg summary --heads the specified branch is contained in.

The tg update command learned --stash and --no-stash and to pay attention to the config value of topgit.autostash (see the new "NO UNDO" section in the README for details).

The tg checkout command implicitly understands to 'goto' when the word 'goto' is omitted and the argument is not another subcommand.

SHELL_PATH can now be set in config.mak to specify a POSIX shell other than /bin/sh to use with the installed tg commands.

The README has been expanded somewhat and now contains an alphabetical list of all subcommands in the USAGE section which become links when the topgit.html file is generated. Furthermore, the non-html version used for tg help tg now contains the same usage lines the html version does. A new "CONVENTIONS" section is also included to explain the three different kinds of TopGit branches commonly used ("patch", "base" and "stage").

Various bug fixes are included. tg export --linearize will no longer abort prematurely when faced with branches that do not share a common base somewhere in their ancestry. Pre-existing pre-commit hooks are no longer assumed to use #!/bin/sh as their interpreter. When output is not being paged an extra cat process is no longer run.

A regression (since 0.18) and bug fix (when using older bash) for the pre-commit hook are included.

A Git compatibility update to set LESS to '-FRX' instead of '-FRSX' to match Git behavior since v2.1.0 is also included.

Kyle J. McKay (94): next version is 0.18.1 new TopGit "tag" command avoid merge setup when unnecessary add support for recurse_deps_exclude speed up tagging of multiple branches complain with --all and no TopGit branches use unambiguous ref abbreviation in --reflog output colorize reflog output support new options --reflog-message and --no-type improve reflog messages default to --reflog-msg --stash for --reflog with no tag set LESS to -FRX by default instead of -FRSX new TopGit rebase command allow -c <name>=<value> options to be passed to git use fully-qualified ref with ref_exists exit on error even with older bash do not abort --linearize early move run_editor into so it can be reused
  README: correct some awkward grammar
  Makefile: allow SHELL_PATH to specify the POSIX shell
  tg: avoid shift when $# -eq 0 do not assume a pre-existing pre-commit hook uses #!/bin/sh use configured hash abbreviation length add some DWIM parsing <tagname>
  tg*.sh: disambiguate git rev-parse arguments support --quiet (aka -q) option
  tg-revert: new tg revert command
  tg-create: support new options and behavior implement new options and semantics set up tgnosequester in initial_setup overhaul to allow continuing and support new tg create move nullsha definition into for reusability reformat dependency add message
  hooks/ overhaul and sequester TopGit files
  tg: refactor paging functions to eliminate "cat" process
  tg: avoid unnecessary setup for strftime function
  tg-summary: add --deps-only option --all is now an alias for -a
  tg: make sure we're really working with commits support new --no-deps option add err function make "goto" optional
  README: add command summary list with links switch from warn to err ensure_clean_tree for non-remote setup fix recurse_deps pre-order traversal with remotes enabled eliminate two unnecessary uses of cut
  tg: improve merge messages
  Makefile: add install-doc target support new --heads option
  tg: include usage lines in `tg help tg` output support --tgish-only for parity support --topmsg and --topmsg-file options
  tg: stop symbolic-ref whining quiet auto-stash error when no TopGit branches exist properly handle nested tags avoid unnecessary consolidation commit make --walk-reflogs be alias for -g handle explicit HEAD argument better support new --heads option
  README: mention using tg tag + tg revert to transfer TopGit branches add autostash support relax --no-deps checking double -f will delete your HEAD support --quiet option
  tg: check result codes from tg create and git commit accept --commit-message as alias for --no-reflog-message maybe allow non-clean tree allow HEAD as an alias for HEAD's symref
  README: explicitly mention utility of tg summary --rdeps --heads support --with-deps option
  README: add SEQUESTRATION section detailing new behavior guarantee a reflog for refs/tgstash
  README: add section about rewriting commits
  README: add a "NO UNDO" section use [BASE] instead of [PATCH] for --no-deps make -f option to verify_topgit_branch truly silent
  README: add "CONVENTIONS" section next version is 0.19 guarantee a reflog for refs/tgstash robustify [;_)] out-of-date ref handling restore speed after robustification [;_)] implement --drop, --clear and --delete options allow non-symbolic refs to influence parents refuse to create a branch named after a tag work properly in unclean tree
  tg: always use refs/heads/$name when $name is a TopGit branch use ensure_clean_tree only when absolutely necessary with --no-deps work on unborn branch
  README: add minor updates and clarifications
  README: add "SPEED AND CACHING" section new options and better dirty worktree support do not stash on recursive invocations use correct tag stash branch name

TopGit-0.18 - Speedy Snail


The focus of this release is speed.

Through addition of a $GIT_DIR/tg-cache directory many tg operations have been significantly sped up. Running tg summary will cause the cache to be updated.

A few other items slipped in. tg summary can now take more than one branch name to list just those. tg summary --rdeps now, correctly, includes non-tgish depedencies in its output again (regression since 0.14). Lastly, tg summary now accepts --list as an alias for -t.

Kyle J. McKay (24): next version is 0.17.1
  tg: exclude objecttype from for-each-ref output
  README: fix typo
  refs: always use fully-qualified refs speed up --rdeps a bit implement .git/tg-cache to speed things up do not use empty $base_remote use sed instead of awk for slight speed boost improve overall caching and include .topdeps in tg-cache use correct test for 'No commits' add branch_contains caching implement .topmsg caching implement branch_empty caching next version is 0.18 avoid using stale information for non-read-only operations provide cache management on/off functions make create_ref_cache more friendly restore speed ref caching efficiency and correctness include non-tgish deps in preorder traversal include failed branch in verify_topgit_branch output allow more than one branch to be specified add --list as alias for -t correct non-portable variable setting



A polish and bug fix release. Notably tg summary, tg info, tg update and anything else that needs to traverse the entire dependency graph should work much faster now when a large .topdeps dependency graph is involved.

Other niceties like optional remote branch name for tg create -r (assumes its the same as the local name in that case), tg patch can now pass along arbitrary options to git diff-tree in order to better inspect the potential patch. Also the temporary directory used in .git should always be removed now, tg export --collapse creates unique committer timestamps on the commits it synthesizes so any git rebase run on the result has a stable ordering with respect to the TopGit .topdeps dependency tree and finally tg create preloads a suggested commit message.

The tg summary command also got some love and --deps can now work on a single branch, using --rdeps now changes the default from all branches to the current branch and lastly one or more branches can be excluded from tg summary's output.

Kyle J. McKay (17): change incorrect 'continue' into correct 'return' speed up recurse_deps_internal avoid trap and put temp files in $tg_tmp_dir make sure temporary directory is removed on signal
  tg-create: suggest a commit message make synthesized commits have unique timestamps default to HEAD for --rdeps but allow --all support --exclude option make remote branch name optional
  README: correct hint for producing conflict-free patch sets
  README: encourage use of git rerere allow git diff-tree options to be passed through call rerere again after shell exit
  Set version to 0.17
  scripts: use more portable export
  style: remove C-like ';' statement terminators



Primarily a bug fix release, but two minor features did creep in. A global -u option is now supported to pretend that topgit.remote is not set. Both tg patch and tg export now accept --binary to enable producing Git binary patches.

Notable fixes make tg work properly from non top-level Git working directories, make tg export work properly with --force and with a tgish first depedency, enable ref logs for top-bases when core.logallrefupdates is true and honor the Git core.pager and pager.diff settings (so that something like contrib/diff-highlight works properly).

Kyle J. McKay (14):

  tg: add support for new -u global option
  tg-export: fix --linearize with a tgish first dep
  tg: tolerate missing .topdeps better make get_tree_w work from non toplevel
  tg: activate ref logs for top-bases when requested
  Set version to 0.16
  tg-patch: support --binary option
  tg: respect core.pager and settings
  tg-export: clarify sub-shell instructions for conflict resolution
  tg-export: work properly with empty .topdeps file
  README: mention export --collapse + git format-patch
  tg-import: include '[PATCH]' in .topmsg subject
  tg-export: make --force actually work with --collapse
  tg: unset GIT_DIR when -C option encountered



Correct a problem preventing continuing a tg update successfully with exit after a failed merge has been resolved and the failed merge occurred on a base.

Kyle J. McKay (2):

  tg-update: handle a conflict when merging a base
  Set version to 0.15.1



Add support for tg push --force and using "HEAD" as a branch name shortcut if it's a symbolic ref to a TopGit- controlled branch. Also make tg log try to DWIM with its arguments.

Also some minor maintenance updates.

Kyle J. McKay (14): fix typos in comments
  Set version to 0.15 do not display superfluous path info set gitcdopt if -C <dir> was used
  tg: display the correct command to restart TopGit
  tg: allow HEAD as a branch name if it's a symref
  tg: --force and -f options for push etc.
  Makefile: allow 'make doc' to make the html docs update recurse_deps_internal docs
  tg-log: attempt to DWIM with arguments
  Use $tg or $tgname everywhere remove ${...:-} silliness
  tg: add missing '[...]' to a few usage lines
  Makefile: make sure topgit.html updates when out of date



Add support for -C <dir> global option and correct the ordering of --rdeps output. And a few typo fixes.

Kyle J. McKay (7):

  README: fix typo fix typo support recurse_preorder traversal option correct ordering of --rdeps output improve pre-subcommand option parsing and support -C
  README: update help for global options and remote
  Set version to 0.14



Another minor bug fix release.

Kyle J. McKay (2):

  Set version to 0.13.2 avoid inappropriate setup when included from hook



Minor bug fix release.

Kyle J. McKay (3):

  Set version to 0.13.1 avoid running pre-commit hook multiple times
  README: fix typos



This release consists of mostly maintenance updates. However tg summary learned an --rdeps option and support for a single branch name. And tg update learned a --skip option.

Kyle J. McKay (18):

  topgit.html: include the usage lines in the generated .html
  tg-remote: skip invalid top-bases when populating
  tg: compensate for leading spaces in wc output
  tg-info: tolerate missing dependencies better
  README: update the help for tg annihilate
  tg: do not drop missing_deps while running recurse_deps
  tg: do not use non-portable echo -n
  Set version to 0.13
  tg-summary: add support for --rdeps and single branch output
  tg-info: update help for info and fix plural form for 0
  tg: output the correct chain when a dependency is missing
  tg-info: properly handle showing unmerged remotes
  tg: silently ignore a missing .topdeps and treat it as empty
  README: tweak the help for help
  whitespace: clean up various whitespace issues
  tg-update: add support for --skip option to handle missing dependencies
  tg: use the name tg was invoked under when spawning sub commands
  subshell: use $SHELL to create a subshell if available

Robin Green (1):

  Create info directory if it does not already exist



This is primarily a maintenance release, however a few odds and ends managed to slip in. When installing with DESTDIR the precheck is skipped. You can now get help on the help command. There's a new version command to display the version. And finally the help command takes a new -w option to display the help in a browser if available.

Kyle J. McKay (11):

  Correct the name of .gitattributes
  .gitattributes: export-ignore .mailmap
  Belatedly set version to 0.11 add a version command
  Makefile: skip precheck if DESTDIR set
  help: make tg help tg work
  Makefile: make "tg help help" work
  tg: add support for tg help -w command
  Makefile: add some helpful rules for non-GNU makers
  Set version to 0.12
  docs: minor updates including a source repository link



This release attempts to collect known fixes for any outstanding issues. In particular, TopGit no longer attempts to use mkfifo when paging so it should now work fine on systems without a working mkfifo command.

One enhancement slipped in:

Kyle J. McKay (5): add a pair of missing quotes around @cmddir@
  paging: improve paging code fix typo
  README: add a README.rst symbolic link to README add more quotes in Git version checking code

Tay Ray Chuan (1):

  tg-export --collapse | --linearize to existing branch proceeds with --force



This release contains primarily bug fixes. In particular, TopGit should now work properly with only a POSIX /bin/sh and POSIX utilities.

However there are a few enhancements, including:

Andrey Borzenkov (1):

  bash-completion: fix update) and ... in command list

Jiang Xin (5):

  No stop to edit for the new merge behavior of git
  push: add --all to push all tg branches to remote server
  Bash completion bugfix: git-core's completion changed __git_find_subcommand to __git_find_on_cmdline
  export: add --all option for --quilt to export all branches
  remote: prune stale remote branch when update

Kyle J. McKay (6):

  README: clean up formatting
  POSIX portability
  Remove *.sh 'local' bashism
  Build improvments
  Make tg -r remote ... work
  Fix precheck test

Per Cederqvist (3):

  Create the "tg annihilate" command.
  Fix "tg base -h" and generalize "tg base".
  Added 'tg checkout'.

Robin Green (19):

  tg-push: push all in one go
  Added .mailmap
  Added git version check (runtime & build time)
  Correct required git version
  Makefile: Use 'git describe' to get a precise TopGit version if possible
  INSTALL: Add more third-party packages
  Centralise annihilated branch checking
  README: Fix typo
  update: Ensure the tree is clean first
  Improved error messages for unclean working directory or index
  Recursion fixes
  update: Make abort really abort in the recursive case
  push: Fill in, and correct, the documentation
  Only check tg-ish branches for annihilation
  Fix bug caused by lack of local variables in Bourne Shell (yuck)
  export: Again, only check for annihilation if a branch is tgish
  checkout: make it work after branch annihilation
  annihilate: Propagate old dependencies to any children
  prev: omit annihilated branches, like next does

Thomas Schwinge (1):

  tg-annihilate: Pass --no-verify when committing.



If you are upgrading from the HEAD of the old TopGit repository, all of and only the patches by Robin Green, Andrey Borzenkov and Heiko Hund are new compared to that revision.

Andrey Borzenkov (13):

  tg-create: let format.signoff control adding of Signed-off-by check for removed branch in branch_annihilated support tag objects as parent
  tg-update: add -a support for all branches
  tg-update: clarify that there could be multiple PATTERNs
  tg-update: strip refs/top-bases/ from PATTERNs just in case
  tg-delete: simplistic check for dependency on deleted branch
  README: really update documentation
  tg-update: document variables
  tg: fix recursing with missing dependencies
  tg-update: allow skipping branch if recursion fails
  tg-update: correctly return error for missing deps
  tg-update: check for detached state of current branch

Bert Wesarg (21):

  Let tg-update take a branch parameter
  tg-remote: use default remote if none is given
  put die() messages to stderr
  tg-log: short cut to git log
  README: move note about shortcomings of using --first-parent from tg base to tg log simplify cat_file
  hooks/pre-commit: check .top* files in the to-be-commited tree
  hooks/pre-commit: check for cycles in dependencies
  hooks/pre-commit: check .topdeps for valid branches
  hooks/pre-commit: check for deps repetitions
  tg-files: list files changed by the topic branch
  provide a global temporary directory
  cat_file: take -i/-w parameters
  tg-export: use pretty_tree -b for base
  tg-files: simplify arg checking and add sanity check for -i/-w
  branch_empty: use pretty_tree and therefore respect -i/-w
  tg-patch: use pretty_tree and diff-tree to generate the patch
  list_deps: accept -i/-w
  tg-summary: accept -i/-w
  tg-mail: accept -i/-w
  tg-prev/tg-next: commands to explore dependencies

Carsten Hey (1):

  Don't call pre-commit hook if tg is not installed

Heiko Hund (1):

  --strip option for tg export

Michal Sojka (1):

  Make 'tg patch' work in subdirectories

Olaf Dabrunz (1):

  Add pointer about the problems regarding tg depend rm to README

Per Cederqvist (10):

  Implemented "tg summary --sort".
  Added the --deps option to "tg summary".
  Don't implement the usage message of tg depend more than once
  Ignore Emacs auto-save files
  Add "tg base" that prints the base version.
  Generalize subcommand selection in "tg depend"
  Refactor tg summary
  Do basic error checking in "tg depend add"
  Implement "tg summary --deps" as a shell function.
  Indicate the current branch in "tg summary --graphviz"

Robin Green (5):

  Make tg help work in any directory
  README: Fix obsolete references to git push
  INSTALL: Added installation instructions
  Documentation cleanup
  Bumped version to 0.9; last minute doc changes

Thomas Schwinge (3):

  tg-push: Filter out plain SHA1s from being pushed.
  tg-mail: Properly quote argument to --in-reply-to
  tg-delete: Handle the case where the branch has been removed already, but the base is still left.

Uwe Kleine-König (5):

  tg mail: document config setting to prevent unintended mass mail sending
  tg patch: treat all files as ascii
  Order .gitignore alphabetically
  Fix pretty_tree to work in a subdirectory
  README: clearify note describing short-comings of tg log

martin f. krafft (2):

  deal with single quotes in from/to headers
  quote $LESS in case it includes spaces



The highlight of this release is a new command tg push that has less annoyances than the old way to push topgit branches. Thanks to Marc Weber for initial coding and Bert Wesarg for some polishing.

Other than that there are some bugfixes.

Bert Wesarg (5):

  tg-push: remove useless warning about missing bases for non-tgish branches
  tg-push: prevent handing branches more than once to git-push
  tg-push: handle non-tgish branches
  help: use pager
  tg-push: add bash completion

Ilpo Järvinen (1):

  tg-update: fix user visible typo in info msg

Jon Ringle (1):

  Fix tg export --quilt --numbered w/ > 8 patches

Marc Weber (1):

  tg-push: new command pushing a tgish branch

Uwe Kleine-König (13):

  Pass -- to diff-tree for branch/filename disambiguation
  Fix merge failure handling in tg export
  Call git-rerere after a failing merge as git-merge does
  Add GPLv2 and description for S-o-b
  hooks/ don't wail on detached head for missing .top* files
  don't use return when being sourced
  hooks/ don't stop commits on non-topgit branches
  hooks/ fix bashism
  depend: don't disallow adding a dependency on a non-TopGit-branch
  remove test for git send-email
  recurse_deps: if no_remotes is set don't recurse into remote deps
  tg-remote: don't add push specs but warn about existing ones.
  bump version number to 0.8



This is mainly a bugfix release that fixes some (of my) annoyances.

A highlight is a new export method (--linearize) that might be more suitable to create a branch for feeding upstream.

Uwe Kleine-König (10):

  [TOPGIT] limit rev-list in branch_contains to a single rev
  [TOPGIT] allow working with annihilated branches
  [TOPGIT] make tg remote idempotent
  [TOPGIT] make creating a commit from a topgit branch a function
  [TOPGIT] implement linearize export method
  Don't throw away already started base on resumed create.
  Add documentation for tg export --linearize
  Merge branch 'upstream' of
  Fix typo s/emmail/email/
  bump version number to 0.7



Actually this is not a real release, I just tag because a mad duck has bumped the version number. :-)

For completeness, here comes the shortlog:

Bert Wesarg (1):

  tg-summary: -t and --graphviz are mutual exclusive

Jonas Fonseca (1):

  README: spelling fixes

Kirill Smelkov (5):

  tg-completion: complete options for `tg summary`
  tg-completion: complete options for `tg remote`
  Implement setup_pager just like in git
  tg-patch: fix pagination
  tg-patch: add support for generating patches against worktree and index

Marc Weber (1):

  Pass -- to rev-list for branch/filename disambiguation

Uwe Kleine-König (5):

  tg-export: implement skipping empty patches for quilt mode
  tg export (collapse): implement skipping empty patches
  tg export (quilt): Implement flattening patch paths
  tg export (quilt): Implement numbering the patches
  make tg remote idempotent

martin f. krafft (14):

  ignore tg-depend build files
  remove +x bit from tg-depend
  Make sure gitignore patterns are not recursive
  add ignore patterns for quilt and debian build
  Change tg help exit code to 0
  Check for cmddir earlier
  Print help output when no command is given
  Require an argument to tg -r
  Print help message when command is not proper
  Note that do_help is used when short messages might be wanted
  Add Vim modelines for consistent spacing
  Check for git-send-email and die if not found
  put tg version into a variable at the top
  bump version number to 0.6



This release features a number of fixes and enhancements, including

Antonio Ospite (2):

  TopGit: small Makefile nitpichink
  TopGit: Force adding .topdeps on tg-depend

Jonas Fonseca (3):

  Add bash completion script for TopGit
  depend: Fix help listing
  Complete depend subcommand

Matt McDonald (2):

  tg depend: Allow adding deps from a subdir inside the repo.
  Make sure $root_dir does not have a trailing slash

Petr Baudis (17):

  README: Add warning about editing .topdeps manually
  tg depend: Even more robust subcommand handling
  tg summary -t: Very quick mode, only branch names
  tg-completion: Use tg summary -t for __tg_topics()
  tg mail: Fix $header string construction
  tg import -s: Import single commit using well-defined name
  tg import -d: Explicitly specify base dependency of the created branches
  tg import -s: Whitespace fix
  tg import: Construct actually proper .topmsg file
  tg import: More graceful conflicts handling
  tg update: Fix bogus advice on failed base update
  tg update: Always checkout head, even if we didn't update base further
  tg mail -r MSGID: Generate In-reply-to header
  tg export: Clarify usage
  README: lever -> level (spotted by jikos)
  tg summary --graphviz: Dot-suitable dependency graph
  README: tg depend rm TODO (insp. by Jonas)

martin f. krafft (3):

  tg-mail: do not use arrays, which are bashisms
  tg-export: no current branch check with -b
  Update version in tg script to 0.5



This is TopGit v0.4, continuing its mission of practical usability. I have managed to somehow use this to actually manage a rather large and non-trivial system of git-gui patches, recently submitted to git@. (I send out the mail series using tg export --quilt and quilt mail so far though, and I'm actually finding that quite convenient.)

The nicest thing about this release is Kirill's new 'tg mail' command, 'tg export --quilt -b' to create quilt series from arbitrary set of topic branches and 'tg depend add', which has actually quite trivial implementation, though. Then there's the usual bunch of small enhancements and fixes.

Kirill Smelkov (3):

  tg help: <something>: improve readability
  tg import: fix + make more robust
  tg mail: new command for mailing patches

Petr Baudis (19): Typo fix (incanation -> incantation)
  .gitignore: Add tg-import, tg-remote
  Makefile: Changing Makefile means executables need to be regenerated too
  tg import: Require clean working tree and index
  tg import: Check out new files as we go
  tg delete: Allow branch delete if we aren't on symbolic HEAD
  tg remote README: Add 'git push --all' caveat warning
  tg info: Carry over missing Subject line in topmsg
  tg info, tg patch: Work on top-base HEAD too
  Ignore vim swp files
  tg mail: Tidyup
  tg mail: Simplify array usage
  tg export: Fix exporting remote-based branches
  tg delete: Fix spurious output
  tg depend add: Add dependency
  tg update: Fix resume message
  tg mail -s SEND_EMAIL_ARGS: Pass arguments to git send-email
  tg export: With quilt driver, accept explicit list of branches

Uwe Kleine-König (1):

  Use git-mailinfo to extract author informations from .topmsg



After awfully long delay, here comes v0.3 of TopGit - we hopefully start to approach some kind of practical usability by now.

Aside of few minor changes, the major point of this release is remotes handling; you can elevate any remote to a TopGit-tracked status using 'tg remote', then git fetch / push will haul around the TopGit bases as well, and 'tg update' can update your local branches based on the remote ones. Each repository has one "default" TopGit remote and the local branches are supposed to reflect this one; that is the remote 'tg update' and all the other commands consider by default. Normally, this remote is the last one you called 'tg remote --populate' on, but you can change it in .git/config or switch it for a particular tg call using the 'tg -r REMOTE command' parameter.

The other major improvement is new 'tg import' command by Aneesh Kumar that lets you transform a series of commits to a topic branch sequence. I decided not to consider the 'tg depend' work by Jan Nieuwenhuiz for this release yet, since it will probably take me a bit of time yet to fully understand his approach; so far, I have an uneasy feel about it.

Note that this release, as usual, received only very light testing - please come back with any bugs you find. If someone would feel like adding at least a simple testsuite, that would be really nice.

Aneesh Kumar K.V (1):

  topgit: Implement tg-import

Bert Wesarg (1):

  Makefile: Use $(wildcard) for commands_in

David Brown (1):

  Force adding the .topmsg and .topdep files.

Jan Nieuwenhuizen (1):

  TOPGIT: [PATCH] Use standard prefix and DESTDIR rather than explain

Jonathan Nieder (2):

  supply template argument to mktemp
  tg-info: fix sed typo

Petr Baudis (35):

  tg-export: Ensure we don't overwrite a branch by git update-ref
  tg create: Set up refs/top-bases/ after conflict resolution
  README: Sketch of my current ideas on remotes handling
  tg summary: Fix confusing variable name
  tg remote: New command Better explain base update
  Factor out rev-parse --verify calls to new ref_exists() function Set $base_remote to topgit.remote config value
  recurse_deps+branch_needs_update(): Deal with remote branches
  tg update: Support updating from remote branches
  has_remote(): Introduce to check if branch has remote counterpart
  tg info: Show information about remote branches
  tg info: Asterisk-prefix 'out-of-band' warnings
  tg summary: Show info about remote mates
  tg summary: 'L' denotes that push will update remote mate
  tg info: Note if local head is ahead of remote mate
  tg summary: Mark current branch with '>'
  tg -r REMOTE: Support for switching base remote
  tg summary: Fix spurious errors on tg-inconsistent remotes
  Fix recursive tg calls: Pass tg parameters through properly
  Account for direct-tg arguments in Usage strings
  tg import: Better description
  tg import: Standard script header
  tg import: Standard options parsing
  tg import: Remove tg_ prefixes from functions
  tg import: Change default prefix from tp/ to t/
  README: Add synopsis for working with remotes
  tg create -r BRANCH: Create branch based on a remote one
  tg import -p PREFIX: Custom prefix instead of t/
  tg import: Fix up process_commit() progress reporting
  branch_contains(): More explicit call to git rev-list
  tg import: Make the progress reporting stand out more
  Merge branch 'tg-import'
  README: Remove stale TODO

martin f. krafft (2):

  Add tg-export to gitignore
  Add various todos/wishlists



This is v0.2 of TopGit; we are steady on our way to v1.0! ;-) This version features changed usage of tg create, new tg export command that can export your patch queue either to a Git branch or Quilt series, a huge amount of bugfixes, and improved documentation infrastructure.

Thanks go to Bert Wesarg, Russel Steicke and Antonio Ospite for their patches - please keep them coming - and to martin f. krafft for the testing, ideas and presentation to fellow Debian packagers.

Antonio Ospite (1): Add -h, --help aliases for the help command

Bert Wesarg (7): fix help string Introduce topgit.subjectprefix config option
  tg-info: pretty print dependencies Runtime tg-* command check Check for read permissions of help files
  Makefile: mkdir $(bindir) it's info/attributes not info/gitattributes

Petr Baudis (33):

  README: Fix synopsis of resuming tg create
  README: Two TODOs for tg summary
  README: TODO for tg depend
  README: TODO for tg tidy setup_hook(): Test existence instead of -x Fix list of >1 dependencies Bring deplist format in sync with tg info Show missing dependencies (needs_update() enhancement) Abort on missing dependencies
  needs_update(): Return non-zero if update is required Mark branches with missing dependencies by '\!' Fix nonempty indicator misalignment Clean up printing status columns
  README: TODO tg tidy -> tg collapse Change usage (-d -> arguments)
  README: Mark future tg patch features as TODO clearly Introduce topgit.{to,cc,bcc} config options
  needs_update(): Fix $missing_deps passing Pre-fill [PATCH] line with patch name Fix 'tg update' generated help text
  needs_update(): Split to recurse_deps() and branch_needs_update() helpers
  recurse_deps(): _-prefix $depsfile
  measure_branch(): Use _bname instead of _name local variable
  branch_needs_update(): Fox branch_contains call: $1 -> $_name
  recurse_deps(): Call itself, not needs_update(), recursively
  tg-export: New command for cleaning up history Avoid use of non-SUS 'echo -e'
  README: tg collapse is already implemented (as tg export)
  tg export: Really remove TopGit metadata files when exporting
  tg update: Do not use ${:n:m} substitution (bash extension)
  tg export: Support --quilt for exporting to quilt series
  tg export: Print progress messages _before_ the action

Russell Steicke (3):

  Check for pre-commit hook existence.
  Make "tg help cmd" print cmd help
  Pretty print the help creation commands in Makefile.

TopGit-0.1 - The Saga Begins


topgit-0.1: Initial release