From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, Tobias Preuss <tobias.preuss@googlemail.com>
Subject: Re: Fwd: git-gui / Warning: "No newline at end of file”
Date: Wed, 09 Jan 2013 14:49:06 +0000 [thread overview]
Message-ID: <87vcb6bee5.fsf@fox.patthoyts.tk> (raw)
In-Reply-To: <7vzk0qw8ts.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 03 Jan 2013 08:05:35 -0800")
Junio C Hamano <gitster@pobox.com> writes:
>Tobias Preuss <tobias.preuss@googlemail.com> writes:
>
>> Hello. I never got a response. Did my email pass the distribution
>> list? Best, Tobias
>
>Pat?
>
I did have a brief look at this but I don't have a solution at the
moment. The "\ No newline at end of file" is emitted by git at we don't
appear to handle it well in the lib/diff.tcl apply_range_or_line
function.
>> ---------- Forwarded message ----------
>> From: Tobias Preuss <tobias.preuss@googlemail.com>
>> Date: Tue, Nov 13, 2012 at 9:26 PM
>> Subject: git-gui / Warning: "No newline at end of file”
>> To: git <git@vger.kernel.org>
>>
>>
>> Hello.
>> I noticed a problem when working with git-gui which might be a bug.
>> The issue only affects you when you are visually trying to stage
>> changes line by line. Here are the steps to reproduce the problem:
>>
>> 1. Initialize a new repository.
>> 2. Create a file with three lines of content each with the word
>> "Hello". Do not put a new line at the end of the file.
>> 3. Add and commit the file.
>> 4. Edit the same file putting words inbetween the three lines.
>> 5. Open git-gui and try to stage the changes line by line.
>>
>> The editor will append the warning "No newline at end of file” to the
>> end of the diff. When you are trying to stage a line an error occurs.
>> The problem is also illustrated in a question on Stackoverflow [1].
>>
>> Please let me know if you need more information or if I should send
>> this problem to some other mailing list.
>> Thank you, Tobias
>>
>> ____________
>> [1] http://stackoverflow.com/questions/13223868/how-to-stage-line-by-line-in-git-gui-although-no-newline-at-end-of-file-warnin
>
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
next prev parent reply other threads:[~2013-01-09 15:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 20:26 git-gui / Warning: "No newline at end of file” Tobias Preuss
2013-01-03 12:26 ` Fwd: " Tobias Preuss
[not found] ` <7vzk0qw8ts.fsf@alter.siamese.dyndns.org>
2013-01-09 14:49 ` Pat Thoyts [this message]
2013-05-09 16:30 ` [PATCH] git-gui: allow "\ No newline at end of file" for linewise staging Heiko Voigt
2013-05-10 19:09 ` Tobias Preuss
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=87vcb6bee5.fsf@fox.patthoyts.tk \
--to=patthoyts@users.sourceforge.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tobias.preuss@googlemail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.