News for hackers. Stuff that matters.
Re:Aligning your Git logs by matthewsnyder on Monday October 31, 2011 @10:12AM (#3177406)
I would recommend tig for this sort of thing: http://jonas.nitro.dk/tig/ In fact, I can't recommend it highly enough. It's typically just as necessary as git on any machine I'm working on.
Re:Aligning your Git logs by regularfry on Monday October 31, 2011 @09:34AM (#3177289)
For those as confused as I was, the code is silently swallowed if you have JavaScript turned off.
Re:Aligning your Git logs by pyrtsa on Monday October 31, 2011 @09:43AM (#3177318)
Oh, good to hear. It's how Posterous implements the embedding of Github Gists that probably is to blame here.

I'm still thinking whether to switch my blog to another platform, maybe even an own server, as that's not the only problem I've had trying to embed source code examples to my posts.

Much of it boils down to the use of the Tiny MCE editor, that I'm a bit surprised Posterous is enforcing everybody to use!

Re:Aligning your Git logs by masnick on Monday October 31, 2011 @10:15AM (#3177419)
If you're on a Mac, you'll need to install gawk (at least I did on 10.7).

Probably the easiest way to do this is with homebrew[1]:

    brew install gawk
[1] If you don't know about homebrew, check out https://github.com/mxcl/homebrew. It's a package manager for Mac.
Re:Aligning your Git logs by MtL on Friday November 04, 2011 @05:33AM (#3195462)
I usually want to pass arguments to git log, not to less. This is not possible with the default piped alias. This is remedied by wrapping it in a function, and pasting the arguments explicitly to git log using the bash shorthand $@. Here is an updated version of your l80 that supports passing parameters to git log:

l = "!f() { git log $@ --abbrev-commit --date=short --pretty=format:'%x00%h%x00%cd%x00%s%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-80s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, $3, gensub(/(.{79}).{2,}/, \"\\\\1\",\"g\",$4), $5, $6 }' | less -R ; } ; f"

Re:Aligning your Git logs by alyandon on Monday October 31, 2011 @09:43AM (#3177320)
I get a bad config file error when I copy the aliases into my .gitconfig.

Edit: Something to do with copy/pasting from the browser. Cloning the gist repository and copying directly in vim works fine.

Re:Aligning your Git logs by pyrtsa on Monday October 31, 2011 @10:13AM (#3177410)
It might have been those UTF-8 ellipses: "…"

Good to hear that you got it resolved, but are you sure that your character encoding settings are alright?

Re:Aligning your Git logs by Hovertruck on Monday October 31, 2011 @10:09AM (#3177401)
Hmm, worked fine for me with Vim copying directly from the browser. Perhaps some sort of :set paste weirdness?