From: Andreas Ericsson <ae@op5.se>
To: Larry D'Anna <larry@elder-gods.org>,
John Tapsell <johnflux@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: wsfix alias
Date: Thu, 09 Jul 2009 22:54:39 +0200 [thread overview]
Message-ID: <4A56590F.9050206@op5.se> (raw)
In-Reply-To: <20090709160249.GA12830@cthulhu>
Larry D'Anna wrote:
> * Andreas Ericsson (ae@op5.se) [090709 03:04]:
>> I do have one alias, which is "wsfix". It fixes whitespace fsckups I've
>> added to the index but not yet committed to the worktree. It's not a
>> particularly complex one, but not exactly simple either.
>
> oooh, i can has?
>
> --larry
These are quite stupid and can lose data for you. Please use with some care.
Oh, and I lied. I have two aliases. wsfixi is the one that applies staged
stuff. wsfix fixes all whitespace errors since the last commit and stages
all changes in the index. Again, use with care, and don't hang me if they
break your day ;-)
Mind the wrapping if your mua does things like that.
[alias]
wsfix = !git diff HEAD >P.diff && git reset --hard && git apply --whitespace=fix P.diff && rm -f P.diff
wsfixi = !git diff --cached >P.diff && git reset && git apply --whitespace=fix P.diff && rm -f P.diff
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
next prev parent reply other threads:[~2009-07-09 20:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 23:49 default aliases (ci, di, st, co) Ondrej Certik
2009-07-09 0:13 ` Jakub Narebski
2009-07-09 8:58 ` Graeme Geldenhuys
2009-07-09 16:43 ` Junio C Hamano
2009-07-09 23:08 ` Paolo Bonzini
2009-07-13 6:40 ` Jeff King
2009-07-13 6:43 ` Jeff King
2009-07-13 9:15 ` Paolo Bonzini
2009-07-09 7:00 ` Andreas Ericsson
2009-07-09 8:50 ` Michael J Gruber
2009-07-09 9:04 ` Graeme Geldenhuys
2009-07-09 9:40 ` Jakub Narebski
2009-07-09 9:48 ` Michael J Gruber
2009-07-09 8:58 ` Luciano Miguel Ferreira Rocha
2009-07-12 5:07 ` Ondrej Certik
[not found] ` <20090709160249.GA12830@cthulhu>
2009-07-09 20:54 ` Andreas Ericsson [this message]
2009-07-09 21:30 ` wsfix alias Larry D'Anna
2009-07-09 9:01 ` default aliases (ci, di, st, co) Graeme Geldenhuys
2009-07-09 9:12 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A56590F.9050206@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=johnflux@gmail.com \
--cc=larry@elder-gods.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).