Git 2.33 Released with New Optional Merge Strategy Named ‘merge-ort’

Git 2.33 improves things for avid scripters and puts new merge backend which is over 9,000 times faster.

Git is a distributed version control software that basically allows multiple people to work in parallel and it saves a history of all changes made. 

History of Git

In 2002, the Linux kernel team adopted BitKeeper. Linus Torvalds was among the proponents of the new system. However, other developers were concerned about using a proprietary tool to develop open source. In 2005 the company owned BitKeeper announced it would discontinue the free version.

So, Linus Torvalds urgently needed a new version control system to maintain the development of the Linux Kernel. So he went offline for a week, wrote a revolutionary new system from scratch, and called it Git. 

Sixteen years later, the platform is the undisputed leader in the distributed version control software field.

What’s New in Git 2.33

Git 2.33 has been released. It mainly dealt with bug fixes and a new strategy for carrying out merges. For those unfamiliar, a merge strategy is the mechanism used to combine code from multiple versions of the same codebase.

To merge two branches, Git currently uses the command, which was first written as an external Python script and then rewritten in C – merge-recursive.  Git 2.33 brings a new merge strategy called merge-ort.

Preparation work for a new merge strategy backend is now on its final stretch. Merge-ort is pitched as a complete re-write of the currently used recursive approach, that is meant to fix issues in areas like correctness, and performance. It has been rewritten from scratch with the same concepts of recursion and rename-detection.

 According to GitHub:

For a merge (but a large, tricky one containing many renames), merge-ort gains over a 500x speedup. For a series of similar merges in a rebase operation, the speedup is over 9000x.

This is due to the fact that the new algorithm in Git 2.33 will cache and reuse some computations common to the merges. On top of that, the resulting code is cleaner and easier to work with.

The new merge-ort is likely to become the default strategy in a future version of Git. Until then you can try this feature by running the git merge -s ort command.

Other than the above new feature, Git Project adds the following features to Git 2.33.0:

  • git worktree add --lock learned to record why the worktree is locked with a custom message.
  • git send-email learned the --sendmail-cmd command line option and the sendemail.sendmailCmd configuration variable, which is a more sensible approach than the current way of repurposing the smtp-server that is meant to name the server to instead name the command to talk to the server.
  • Several improvements around geometric repacking.
  • Git now using the hashfile API in the codepath that writes the index file to reduce code duplication.
  • git rev-list learns to omit the commit <object-name> header lines from the output with the --no-commit-header option.

More details on the changes with Git 2.33 can be found on the GitHub blog.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%

Leave a Reply

Your email address will not be published. Required fields are marked *