From: "Jason Pyeron" <jpyeron@pdinc.us>
To: <git@vger.kernel.org>
Cc: "'Junio C Hamano'" <gitster@pobox.com>
Subject: RE: Blame / annotate with mixed mac line endings?
Date: Wed, 2 May 2018 22:32:05 -0400 [thread overview]
Message-ID: <8957C3B9BEF94443ABE0A67340786A86@ad.pdinc.us> (raw)
In-Reply-To: <xmqqh8npv8hy.fsf@gitster-ct.c.googlers.com>
> -----Original Message-----
> From: Junio C Hamano
> Sent: Wednesday, May 2, 2018 21:22
> Subject: Re: Blame / annotate with mixed mac line endings?
>
> "Jason Pyeron" <jpyeron@pdinc.us> writes:
>
> > Any way to hit git with a stick to treat lone CR as a line
> break for blame/annotate?
> I highly suspect that you would get more help from those whose love
> is Git if your inquiry were about a way to ask Git politely to do
> what you want to achieve, rather than hitting it with a stick ;-)
No offense meant.
> Perhaps define a textconv filter to fix the incorrect line endings?
Worked perfectly! I Read:
https://github.com/git/git/blob/master/t/t8006-blame-textconv.sh
Added to .git/config:
[diff "test"]
textconv = /usr/local/bin/helper.sh
Added to .gitattributes:
*.cfm diff=test
$ cat /usr/local/bin/helper.sh
cat "$1" | mac2unix
The important issue was to not use mac2unix directly, because it modifies the file itself.
Read: https://git.wiki.kernel.org/index.php/Textconv but it did not help so much.
Thanks,
Jason
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2018-05-03 2:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 23:57 Blame / annotate with mixed mac line endings? Jason Pyeron
2018-05-03 1:22 ` Junio C Hamano
2018-05-03 2:32 ` Jason Pyeron [this message]
2018-05-03 4:55 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8957C3B9BEF94443ABE0A67340786A86@ad.pdinc.us \
--to=jpyeron@pdinc.us \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).