Skip to content

Releases: arxanas/git-branchless

v0.3.12

08 Apr 07:48
Compare
Choose a tag to compare

No changes since v0.3.11.

v0.3.11

08 Apr 07:47
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install --locked git-branchless
$ git branchless init  # in your repository

If you haven't already taken the user survey, please consider doing so!

Release highlights

This release is a smoke test for git-branchless having been broken into multiple crates, so please report any unexpected compilation issues on the issue tracker.

git-branchless v0.3.12 was also released, with no additional changes from v0.3.11.

Changelog

Added

  • Added --discard flag to git reword to start with a clean commit message.

Fixed

  • (#326) git restack now restacks certain branch commits which it missed before.

v0.3.10

27 Mar 21:30
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install --locked git-branchless
$ git branchless init  # in your repository

NOTE: when installing this version with --locked, you may see a warning like this:

warning: package `crossbeam-channel v0.5.2` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked

This is safe to ignore. We are waiting for an upstream dependency to be updated to resolve this warning. This is tracked in #317.

Release highlights

This release introduces the following new commands:

  • git sync (demo, docs): rebase all commit stacks on top of the main branch without checking them out.
  • git reword (docs): update the commit message of one or multiple commits without checking them out (thanks to @claytonrcarter).
  • git branchless bug-report: generate debugging information to attach to a Github issue.

Additionally, git undo has a breaking change; see below.

Changelog

Added

  • EXPERIMENTAL: created git sync command, which moves all commit stacks onto the main branch (if possible).
  • EXPERIMENTAL: created git reword command, which can rewrite commit messages anywhere in the commit tree.
  • The --only-branches option can be passed to git smartlog to only show commits which are on branches.
  • The git move command, and other commands which can move commits, now accepts the option --no-deduplicate-commits to skip commit deduplication.

Changed

  • (#286) The smartlog now displays an icon next to the currently-checked-out branch.
  • (#289) Changed output wording for git hide/git unhide.
  • BREAKING: git undo now undoes the most recent operation by default (after confirming). The interactive behavior is available with the -i/--interactive flag.

Fixed

  • (#267) Aliases like git amend are now installed only if the user does not already have aliases with the same name. Thanks to @rslabbert for implementing this.
  • Improved performance up to 15x for git restack on large commit histories.
  • (#280) Ambiguous commit hashes are no longer printed in output. (Additional characters of the hash will be appended as necessary.) Thanks to @yujong-lee for fixing this.

New contributors

Thanks to the following first-time contributors!

If you're interested in contributing, check out the Developer Guide in the Wiki, or post in the Discussions or Discord server to ask any questions.

v0.3.9

08 Feb 17:08
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install --locked git-branchless
$ git branchless init  # in your repository

Release highlights

  • This release fixes a bug which several users reported. As always, thanks for your reports!

Changelog

Fixed

  • (#249) On-disk git move commands now ensure that they keep your current branch checked out after the operation.
  • (#249) On-disk git move commands no longer mysteriously move your current branch to a different commit in the stack.

v0.3.8

05 Dec 03:03
9016e77
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install git-branchless
$ git branchless init  # in your repository

Release highlights

  • git next/git prev now take --all/--branch/--merge/--force options.
  • Added two new experimental commands:
    • git branchless checkout: to interactively check out a commit from the smartlog via fuzzy-finding.
      • Suggested alias: git config alias.co 'branchless checkout'.
    • git branchless amend: to amend changes into the current commit, and restack any descendants.
      • Suggested alias: git config alias.amend 'branchless amend'.
    • These commands are not aliased by default.
    • Thanks to @bcongdon for implementing these!
  • I started a Discord server for those who prefer more ephemeral discussion formats. Feel free to ask any workflow questions, etc. there.

Changelog

Added

  • New git branchless checkout command, which enables you to interactively pick a commit to checkout from the commits tracked in the smartlog.
  • git next accepts an --interactive flag which, if set, prompts which commit to advance to in ambiguous circumstances. This can be enabled by default with the branchless.next.interactive config setting.
  • References created for garbage collection purposes no longer appear in git log by default.
  • References created for garbage collection purposes are no longer generated unless you've run git branchless init in the repository.
  • git next and git prev accept -a/--all to take you all the way to a head or root commit for your commit stack, respectively.
  • git next and git prev accept -b/--branch to take you to the next or previous branch for your commit stack, respectively.
  • New git branchless amend command that amends the current HEAD commit, and automatically performs a restack.
  • git next and git prev accept -m/--merge to merge unstaged changes when checking out to the destination commit.
  • git next and git prev accept -f/--force to discard unstaged changes when checking out to the destination commit.
  • git branchless init warns if the configuration value core.hooksPath is set.

Fixed

  • (#151) ORIG_HEAD is populated correctly, which means that Git commands which write to ORIG_HEAD don't accidentally clobber unrelated branches.
  • (#155) git branchless init now appends to your existing hooks, rather than silently doing nothing.
  • (#172) When carrying out an on-disk rebase operation with git move, calling git rebase --abort will correctly reset the branch which you had checked out prior to the rebase.
  • (#209) git restack no longer resurrects commits which were created before git branchless init was run.
  • (#236) git restack no longer checks out back to an abandoned commit in some circumstances.

New Contributors

Thanks to the following first-time contributors!

I'd also like to thank several users for their high-quality discussions and bug reports, whom I don't list here because the list can't be automatically generated, and I'm afraid I'll omit someone. Your feedback is appreciated!

If you're interested in contributing, check out the Developer Guide in the Wiki, or post in the Discussions or Discord server to ask any questions.

v0.3.7

22 Oct 19:56
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install git-branchless
$ git branchless init  # in your repository

Release highlights

  • Fixed a panic in git move.
  • Move/restack operations now require you to specify --merge in order to start merge conflict resolution.
  • You can configure colorization using the --color option or CLICOLOR/NOCOLOR environment variables (@bcongdon).
  • The init.defaultBranch Git config setting is respected when running git branchless init (@bcongdon).

Thanks to @bcongdon for several contributions this release, and thanks to everyone else who provided valuable feedback in the Discussions!

Changelog

Added

  • git branchless init takes a --main-branch option to specify the name of the main branch without interactive prompting.
  • The --color=[auto,always,never] flag can be used to override the automatically detected value for terminal colors.
  • The CLICOLOR and NOCOLOR environment variables are now respected.

Changed

  • BREAKING: If your local main branch has an upstream branch, then that upstream branch will be treated as the repository's main branch, and your local main will be treated as a branch like any other. This should make workflows which commit to the main branch more ergonomic.
  • BREAKING: git move and git restack will no longer perform merge conflict resolution unless the --merge option was passed.
  • git branchless init will use init.defaultBranch when detecting the name of the main branch, if one is not provided by --main-branch.
  • (#144) When automatic garbage collection is run, the number of deleted references is displayed.

Fixed

  • On-disk rebases on systems with /tmp residing on a different filesystem should no longer fail.
  • (#129) git move operations with --dest referring to a remote commit no longer panic.

v0.3.6

14 Oct 17:27
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install git-branchless
$ git branchless init  # in your repository

Release highlights

  • The documentation has been significantly expanded. See the new command overview at the Wiki.
    • High-quality documentation is a first-class goal for this project, so leave any feedback, suggestions, or thoughts in Discussions.
    • Thanks to @IvanVas, @AriaFallah, and others for their feedback so far.
  • More performance improvements for large repositories.
  • Configuration is no longer written directly to your .git/config. Instead, it's written into a separate file and included.
  • Bug fix where some output from subcommands was overwritten by progress indicators.

Changelog

Added

  • The -C option can be used to set the working directory for git-branchless commands.
  • The --hidden option can be passed to git smartlog to show commits which are not ordinarily visible.

Changed

  • Git configuration is written to a file under .git/branchless, instead of writing it directly to .git/config (which may clobber user settings).

Fixed

  • Output of subcommands is no longer overwritten by progress updates.
  • Improved performance up to 100x for commit deduplication during git move when rebasing past certain large commits.
  • Improved performance up to 10x for smartlog rendering.

v0.3.5

12 Sep 02:37
Compare
Choose a tag to compare

To install or update git-branchless, run the following:

$ cargo install git-branchless
$ git branchless init  # in your repository

Release highlights

  • git move is ready for general use. Try it out as a lightning-fast replacement for git rebase:
    • git move -s <commit>: move commit and its descendants onto the current commit.
    • git move -d main: rebase the current commit stack on top of main.
    • git move -b <commit1> -d <commit2>: move the stack containing commit1 onto commit2.
    • It doesn't yet replace git rebase -i. Stay tuned for a future release.
    • It can rebase merge commits, similar to git rebase --rebase-merges. If this is part of your workflow, tell me about it in the linked discussion for this release.
  • git restack now tries to rebase in-memory before falling back to an on-disk rebase. This should speed it up noticeably in most cases.
  • Performance of git smartlog has been improved on large repositories by switching to the Eden SCM's directed acyclic graph implementation. You can expect further performance improvements as I port more of the code to use Eden. Thanks to @quark-zju for answering my questions to help me integrate it.

Changelog

Added

  • Merge commits can be rebased by git move --on-disk. This uses the same system as git rebase --rebase-merges.

Changed

  • (#63) The UI for git undo has been changed in various ways. Thanks to @chapati23 for their feedback. You can leave your own feedback here: https://github.com/arxanas/git-branchless/discussions
  • Merge-base calculation is now performed using EdenSCM's directed acyclic graph crate (esl01-dag), which significantly improves performance on large repositories.
  • Subprocess command output is now dimmed and printed above a progress meter, to make it easier to visually filter out important git-branchless status messages from unimportant git machinery output.
  • git move tries to avoid issuing a superfluous git checkout operation if you're already at the target commit/branch.
  • git restack uses in-memory rebases by default.

Fixed

  • git restack warns if a sub-command fails (e.g. if git rebase fails with merge conflicts that need to be resolved).
  • (#57) git undo shows an informative link when dealing with empty events, rather than warning about a bug. Thanks to @waych for reporting.
  • Flickering in git undo's rendering has been reduced.
  • Commits made via git merge are now recorded in the event log.
  • Long progress messages are now truncated on narrow screens.
  • In-memory rebases on large repositories are now up to 500x faster.
  • git smartlog no longer crashes after you've just run git checkout --orphan <branch>.
  • In-memory diffs on large repositories (used for commit deduplication) are now up to 100x faster.
  • Invocations of git-branchless commands which called subprocesses and then exited quickly no longer fail to print the subprocess output.

v0.3.4

12 Aug 16:47
Compare
Choose a tag to compare

Release highlights

  • git-branchless is now licensed under the GPL-2.
  • Progress indicators are shown during slow operations, which can be helpful when working in large repositories.
    • The long-term goal is to significantly speed up those operations by improving on the implementations offered in libgit2.
  • When you rebase your work onto the main branch, git move will now clean up (delete) branches which point to commits which have been applied upstream. This means you can sync a local commit stack with e.g. git move -b <branch> -d master, and any already-merged branches will be automatically deleted.
    • The later goal is to have a git sync command which will bring all of your local-branches up to date.
    • If a branch was deleted in error, you can always get it back with git undo.

Changelog

Added

  • git move now supports forcing an in-memory rebase with the --in-memory flag.
  • The reference-transaction hook prints out which references were updated.
  • git restack can now accept a list of commit hashes whose descendants should be restacked, rather than restacking every abandoned commit indiscriminately.
  • git move will skip applying commits which have already been applied upstream, and delete their corresponding branches.
  • Progress indicators are now displayed when git-branchless takes longer than 250ms to complete.

Changed

  • BREAKING: git-branchless is now licensed under the GPL-2.
  • More of the Git hooks installed by git-branchless display the affected objects, rather than just the number of affected objects.
  • git move with no --source or --base option now defaults to --base HEAD rather than --source HEAD.

Fixed

  • The output of git subcommands is streamed to stdout, rather than accumulated and dumped at the end.
  • Commits rebased in-memory by git move are now marked as reachable by the Git garbage collector, so that they aren't collected prematurely.
  • git-branchless wrap correctly relays the exit code of its subprocess.
  • Some restack and move operations incorrectly created branches without the necessary refs/heads/ prefix, which means they weren't considered local branches by Git.
  • Some restack and move operations didn't relocate all commits and branches correctly, due to the experimental git move backend. The backend has been changed to use a constraint-solving approach rather than a greedy approach to fix this.
  • git move preserves committer timestamps when branchless.restack.preserveTimestamps is set. The configuration key may change in the future.
  • If your currently-checked-out commit was rewritten during a git move operation, it now checks out the new version of the commit, rather than leaving you on an old, hidden commit.
  • If your current stack had another stack branching off of it, and git move --base was passed a commit that other stack, it would fail with a cyclic dependency error. It now clips off the unique part of the branch and moves it.
  • If an on-disk rebase would occur (such as the result of git move or git restack), but you have uncommitted changes in your working copy, the rebase is aborted and a warning is printed, rather than potentially clobbering your changes.

v0.3.3

28 Jun 02:23
Compare
Choose a tag to compare

Release highlights

This release primarily improves the new user experience.

Changelog

Added

  • git branchless init will attempt to detect the correct main branch name to use for the repository. If not automatically detected, it will prompt for the branch name.
  • git branchless init --uninstall will uninstall git-branchless from the repository.

Fixed

  • The version number in git-branchless --help was fixed at 0.2.0. It now reflects the version of the package.
  • git branchless wrap no longer fails to run if there is no Git repository in the current directory.
  • User hooks which are invoked by git-branchless are now invoked in the correct working directory.