<div dir="ltr">On Mon, Jan 21, 2013 at 7:04 PM, Sean Farley <span dir="ltr"><<a href="mailto:sean.michael.farley@gmail.com" target="_blank">sean.michael.farley@gmail.com</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">
> Hg may have something similar, but git has "clean" and "smudge" filters that<br>
> can be used to keep the working tree somehow different from what is in the<br>
> repository. If someone wants to operate with a working tree that has<br>
> different formatting, they set filter-clean and filter-smudge commands. The<br>
> diffs they see will always be "clean", but the working tree can be smudged<br>
> to their desire.<br>
<br>
</div></div>Yeah, but I'm sure you will agree that this is a tad bit dangerous<br>
(merge conflicts?).</blockquote><div><br></div><div style>An uncrustify filter should satisfy the condition that smudge followed by clean produces the same thing as clean.</div><div><br></div><div><a href="http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html#_merging_branches_with_differing_checkin_checkout_attributes">http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html#_merging_branches_with_differing_checkin_checkout_attributes</a><br>
</div><div><br></div><div style>Of course I don't want to work this way, but if someone wants to have their own formatting that much, I think this is the right level of abstraction.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 I would put this in the category of "feature of<br>
last resort." The equivalent way would be to use an extension, such as<br>
this one:<br>
<br>
<a href="http://www.fast-downward.org/ForDevelopers/Uncrustify" target="_blank">http://www.fast-downward.org/ForDevelopers/Uncrustify</a></blockquote><div><br></div><div style>This is a quite different sort of thing, really meant for easily running uncrustify on source files rather than maintaining a working tree that is different from the repository.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
(don't know if it's still current) or to define your own filters for<br>
doing the "smudge"-ing. It would probably be the same rule and maybe<br>
even a one-liner in python but I haven't tried it yet.<br>
</blockquote></div><br></div></div>