git aliases and parameters

A post mainly to refer back to when I inevitably forget this. 🙂

Inside its aliases, git supports executing non-git commands.

Since version 1.5.0, Git supports aliases executing non-git commands, by prefixing the value with “!”:

Much like with ‘normal’ git aliases, whatever parameters are passed to the alias are passed along when the alias is expanded.

Starting with version 1.5.3, git supports appending the arguments to commands prefixed with “!”, too.

This is normally a Very Good Thing, since it allows you to alias things like co = checkout and then ‘git co blah’ will do ‘git checkout blah’ without you having to do any parameter parsing/passing yourself.

To see this happen when git is running non-git command (using the ! syntax), we can add a simple test alias like this:

testing = !echo foo && echo arg1=$1 && echo arg2=$2 && echo args=$@ && echo bar

And when calling it with a couple of parameters, we can see that they’re available inside the command, but they’re also added onto the end (as per normal git alias behavior), so our last line isn’t “bar” but instead “bar abc xyz”


There might be other methods that work to get around this, but the only one I’ve run across so far that works fine with msysgit on Windows running in PowerShell is using the “sh” shell  intermediary.  We’ll invoke sh -c ‘XXX’ – (make sure to include the final dash, or you’ll lose your first passed param)

testing = !sh -c ‘echo foo && echo arg1=$1 && echo arg2=$2 && echo args=$@ && echo bar’ –

With that in place, now we get the behavior we’re hoping for, since we’re passing it explicitly to sh instead – git it still passing the parameters at the end, but now we’re telling sh exactly what to execute.


What’s really sad about this is that, at least in my testing scenario, we’re actually now inside a second shell.  Using the debugger flags or procexp or whatever, you can see the actual command line that git executes:

sh -c “sh -c ‘echo foo && echo arg1=$1 && echo arg2=$2 && echo args=$@ && echo bar’ – \”$@\”” “sh -c ‘echo foo && echo arg1=$1 && echo arg2=$2 && echo args=$@ && echo bar’ -” abc xyz

While it’s not as useful IMHO as seeing exactly what is being run from the OS point of view, you might find it helpful to enable GIT_TRACE to see git’s internal tracing to get an idea of how it processes the alias and command.


The particular code path(s) involved are in git’s run-command.c

For instance, the “trace: run_command:” can be found (currently) at line 336)

So, who knows – maybe having to do the sh -c is just working around a bug in this version of msysgit (since they appear to be doing pretty much the same thing).  It *does* seem like that version of git might be getting built without WIN32 being defined (likely for good reason, I’m sure, I just can’t tell for sure at the moment).

Certainly it’d be nice if there were a git alias syntax that “opted out” of git passing the arguments at the end of the executed command (for instance foo = !!some $1 | command && here), but AFAICT that doesn’t exist (yet?) so for now, hopefully this will suffice. 🙂


My review of the iOS game Kick Buttowski: Loco Launcho

I might be overly cynical, but I’m guessing my review of the game won’t be accepted/posted by the App Store, so I’m dumping it here in the hopes of it being at least somewhat cathartic. :). It’s times like this I wish I were Internet-famous and had some hope of this getting to the right person, but c’est la vie, mes amis. 🙂

You can see details of the game on iTunes:

Here’s the review I just posted today (might be the first time I’ve posted a review of an app)

Title: a five-star game suffering from a one-star bug


SUMMARY: Version 1.6.0 broke hardware rendering

As many others have stated: the current version, which has been out well over a year, is horrifically broken and you can’t get past the title screen due to horrendous perf.

Many will recognize the situation: before the update (ironically including a change log of “optimized performance”), the game used hardware rendering. Everything was smooth, and the game was extremely enjoyable. I played it on an iPad 2 with my five-year-old son for hours and hours over the course of a few months.

Since the update, though, the frames-per-second rate of the game, at least on the title screen (which I can no longer get past, even on my iPad 3 and iPhone 5), has dropped to around 0.3 (yes, about 3 seconds between frames). Historically, that kind of drop in UI perf typically means the rendering is no longer being done in hardware, but instead through software. It’s *possible* that there’s another cause (like some new chunk of high-priority CPU-intensive work being done at startup that’s starving off everything else enough) but that seems far less likely given how well the game worked before.

The sad thing is that it’s *likely* a small/simple change that broke the game, and is likely a small change to fix it. Worst-case, they could just revert to the older version before breaking the perf if they didn’t want to or couldn’t investigate the issue.

Given that it’s been unplayable for over a year now, there are some interesting observations we can make AFAICT:

1) the reviews and feedback are falling on deaf ears at Disney. They’re developing other games, so I guess there’s just no budget or desire for maintenance of a free older game. This is very unfortunate since it’s likely a simple fix. Worst-case, as mentioned, they could just revert the App Store version to before the break.

2) it would seem that the App Store checking of new app versions didn’t include running the app, since the bad perf is evident as soon as the app runs.

3) all the 5-star reviews during this last year would seem to be paid astroturfing 🙂 Maybe there are just that many people that have an older version, haven’t updated in all this time, and waited quite awhile to write a positive review, but seeing them interspersed with all these 1-star reviews sure looks fishy to me. 🙂

Disney: you made a great game here. You really did. I know my son and I enjoyed it and I can read reviews from many other families that did as well. Please fix this game, or worst-case revert to a working version.

As a recently acquired character might say: Help us Obi-Walt (Disney), you’re our only hope! 🙂

When was NuGet package X last updated?

I guess these values mean different things, but it sure isn’t obvious, at least to me, why they differ. 🙂

I’m just picking a package I happened to be installing – this is systemic, nothing wrong (AFAIK) with MoreLINQ (awesome project!)

So, with ‘stable only’, you can still get a ‘beta’ for MoreLINQ – the Created by says Jon Skeet


Switch to ‘Include Prerelease’ and the “MoreLINQ 1.0 BETA” goes away (which is weird – I would have expected to see both the ‘Stable’ and ‘Prerelease’ options listed?) and is replaced with ‘just’ a ‘MoreLINQ’, but then Created by is different


In both cases, the ‘Last Updated’ lists today’s date (December 5th).

What does the NuGet page say? Well, the main package page says it was last updated on November 16th


The version history shows nothing changed today – this table doesn’t include the information, but the upper / more recent 2 entries are tagged as Prelease and the one from June 3rd, 2011 (1.0 BETA 1.0 – awesome version number 🙂 is tagged stable (well, not tagged prerelease)


And the Owners is listed as Aziz (raboof)


Maybe I just don’t ‘think NuGet’ correctly, but at least on the surface it seems a little confusing. 🙂

Guess I should go file a couple of bugs on now!

GitHub – please fix your code search ASAP!

It’s bad enough that the search on public repositories was removed awhile back (with no word on if/when it will return), but even private repositories are having simple queries fail 😦

I haven’t used Solr/Lucene before, but throw some of the $1e8 at Google to get them to bring back codesearch if needed – this is getting ridiculous! 🙂


Does McKinney love narwhals, too?

I’m guessing (but not sure) that this isn’t intentional on their part, but I think it’s funny, and potentially a warning to sites that put their twitter feed on their main page.  In this case, it happens to be the first ‘real’ text in the page, so I’m guessing that’s why it was picked up as the description here.  Maybe it’s just a cheap way for them to have page content that updates fairly often to avoid getting marked as stale by Googlebot et al. 🙂


new car brand: SRT

I ran across a make listed by Edmunds that I wasn’t familiar with: SRT

Digging around, it appears that part of the 2013 year changes include Chrysler spinning off a handful of its models in existing makes into this new make.

Their head of marketing explains this on an episode of “Jay Leno’s Garage” here (skips to that part of the episode) where he’s checking out the new 640hp Viper. 

NOTE: I included query param fmt=37 so it’s in 1080p already, which might mean some buffering/pausing depending on your connection. 🙂

Fun SQL error of the day

Msg 8623, Level 16, State 1, Line 3
The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.