Today we’re releasing SourceTree for Mac 1.9.5; it’s a point release in name, but it has enough interesting things going on under the hood that we thought it deserved a blog post of its own. Let’s dig in!
Git 2.0: ‘simple’ is the new ‘matching’
Our friend Nicola wrote a great post recently about what changed in git 2.0 from a command line perspective. In SourceTree the main effect is around the default behaviour for pushing branches. Before git 2.0 the default was ‘matching’, which means that branches with the same name on the local and remote would be pushed – in SourceTree terms this means which branches are initially checked when you open the push dialog, although it also affects the which branch is chosen for the ‘push immediately’ option in the commit pane too.
From git 2.0 the default changes to ‘simple’, which means that the default is to push only your current local branch, and to push it to the remote branch that it is tracking, so long as they also have the same name. SourceTree respects this default if you’re running git 2.0+, which currently you’d only be doing if you’d told SourceTree to use the system installed git (our embedded git will be updated at a later date). You can also choose to explicitly set the push branch behaviour in Preferences > Git > Push Branches, regardless of what git version you’re running.
Better memory usage
SourceTree’s memory usage has been optimised considerably in this release. You should find SourceTree uses less memory under heavy use, and that it gives memory back to the rest of the system more quickly when you close repositories and other windows. And who doesn’t like more memory? 🙂
Auto-refreshing & ignored folders
SourceTree automatically refreshes when files change (unless you turn it off), which is a useful feature. However, previously if a file changed inside a folder which you’d told Git or Mercurial to ignore, it would still cause SourceTree to refresh. This is because SourceTree didn’t read your ignore files itself, it left the filtering of file statuses to Git and Mercurial, only providing functions to add items to the ignore lists.
From this update SourceTree reads & caches your ignore files itself, and uses them to make decisions about whether to automatically refresh. If SourceTree is notified of a change in the file system, it will check the cached ignore patterns and filter out changes that are contained within an ignored folder, thus avoiding triggering an auto-refresh for these events. This only works for changes within folders which are ignored in their entirety, not for individual files, because the file system event system in OS X only reports changes at a folder level. However, this feature is particularly useful for build folders and Xcode metadata folders such as username.xcuserdatad, which are frequently written to automatically but are usually ignored.
Many bugs fixed
This probably goes without saying, but we’ve squashed a number of bugs in this release, most notably a particularly nasty one which has been causing seemingly random crashes for a few people; the telltale sign of this one was a crash log featuring ‘NSConcreteFileHandle’. That one sucked, so we’re glad it’s gone now, along with a bunch of other bugs which you can read about in the Release Notes.
So 1.9.5 is a point release; you won’t see any big surface changes, but under the hood things just got a significant tune up, and that stuff is important too. We hope you like it!