git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, jordan.l.justen@intel.com, matt.fleming@intel.com
Subject: Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept "/dev/null\r"
Date: Tue, 23 Sep 2014 22:57:33 +0200	[thread overview]
Message-ID: <5421DEBD.1030508@redhat.com> (raw)
In-Reply-To: <xmqqbnq6hxyt.fsf@gitster.dls.corp.google.com>

On 09/23/14 22:40, Junio C Hamano wrote:
> Laszlo Ersek <lersek@redhat.com> writes:
> 
>> On 09/23/14 21:56, Junio C Hamano wrote:
>>> Laszlo Ersek <lersek@redhat.com> writes:
>>>
>>>> What do you think about accepting only "/dev/null\n" and "/dev/null\r\n"?
>>>
>>> I thought we agreed that what you are doing is not workable in the
>>> first place, no?
>>>
>>> I suspect one way to handle "In this project, the files that are
>>> checked out must be with CRLF line endings no matter what the
>>> platform is" might be to use the line ending attributes to force
>>> that while keeping the in-repository data with LF line endings.  The
>>> diff output (format-patch output is just one of them) comes from
>>> comparing the in-repository representation, so you won't have \r\n
>>> that will be stripped via MTA in it, "apply" and "am" will apply the
>>> patch without having to worry about \r\n, _and_ the line ending
>>> attributes would end the lines in your in-working-tree files with
>>> CRLF that way.
>>
>> This would be a perfect solution if the git repository was not a mirror
>> of a Subversion repository that contains all files with embedded CRLFs.
> 
> Yikes.
> 
>> Anyway I accept defeat, thanks for your time.
> 
> I do not consider that a "defeat".  It is just I do not think it is
> the right solution for the problem you are having to butcher "apply".
> You'd need to find some other way to solve it, and other people on
> the list may be able to offer a solution neither of us thought of in
> this thread.
> 
> Perhaps those who are on Windows have more experience in situations
> like yours?

I'm not on Windows, "obviously". :)

The overwhelming majority of the EDK II developers use windows, and
connect directly to subversion. They work with CRLF line endings "natively".

Jordan (CC'd) operates a robot that mirrors SVN commits to the git repo
on github, with "git svn". "git svn rebase --use-log-author" fetches the
new SVN commits to the robots local git clone, and then "git push" (as
usual) pushes them to github. This is being done so that people knowing
git don't lose their sanity, trying to work with SVN.

The process works very well, up to a point (git-loving people clone the
github mirror, and submit patches with git-format-patch / git send-email
to edk2-devel). The problem is when you want to apply patches with
git-am from the list -- the CRLFs are a mess. Hence my thread starter here.

We can get around this by maintaining personal forks on github, pushing
our patches there too in parallel with the email postings. People can
then fetch directly, and avoid git-am altogether. But this is very
cumbersome -- you need a github account, you need an edk2 fork on
github, others need to add your repo as a remote, etc etc, while the
review occurs anyway in our MUAs.

Thanks
Laszlo

  reply	other threads:[~2014-09-23 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23  1:09 [PATCH for-maint] apply: gitdiff_verify_name(): accept "/dev/null\r" Laszlo Ersek
2014-09-23 18:54 ` Junio C Hamano
2014-09-23 19:31   ` Laszlo Ersek
2014-09-23 19:56     ` Junio C Hamano
2014-09-23 20:33       ` Laszlo Ersek
2014-09-23 20:40         ` Junio C Hamano
2014-09-23 20:57           ` Laszlo Ersek [this message]
2014-09-23 20:02     ` Junio C Hamano
2014-09-23 20:32       ` Laszlo Ersek
2014-09-23 20:35         ` Junio C Hamano
2014-09-23 20:49           ` Laszlo Ersek
2014-09-23 21:35             ` Junio C Hamano
2014-09-24 12:56               ` Laszlo Ersek
2014-09-24 17:55                 ` Junio C Hamano
2014-09-23 20:17   ` 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=5421DEBD.1030508@redhat.com \
    --to=lersek@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jordan.l.justen@intel.com \
    --cc=matt.fleming@intel.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).