I just realized git patches I have been applying to a local repository
are not saving the comments correctly.
The git patch has properly formatted, with newlines, comments. Some have
bullet points. When I run "git am ~/0001-fix.patch" the resulting git
history shows the git comment as all one line as the newlines have been
removed.
This:
Git comment
- bullet 1
- bullet 2
Turns into:
Git comment - bullet 1 - bullet 2
Am I using git incorrectly or is this a git bug?
Thanks,
Michael
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-09-2011, 01:46 PM
Stephen Gallagher
git patch comments
On Wed, 2011-06-08 at 16:52 -0500, Michael Cronenworth wrote:
> I just realized git patches I have been applying to a local repository
> are not saving the comments correctly.
>
> The git patch has properly formatted, with newlines, comments. Some have
> bullet points. When I run "git am ~/0001-fix.patch" the resulting git
> history shows the git comment as all one line as the newlines have been
> removed.
>
> This:
> Git comment
> - bullet 1
> - bullet 2
>
> Turns into:
> Git comment - bullet 1 - bullet 2
>
> Am I using git incorrectly or is this a git bug?
I suspect that you are saving your patches with Windows line endings
instead of UNIX line endings, so when you import it on linux, they are
no longer available. Try running dos2unix on the file before importing
it.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-10-2011, 04:29 PM
Michael Cronenworth
git patch comments
Stephen Gallagher wrote:
> I suspect that you are saving your patches with Windows line endings
> instead of UNIX line endings, so when you import it on linux, they are
> no longer available. Try running dos2unix on the file before importing
> it.
The systems that use git are all running Fedora. The main git repo and
the workstations are all Fedora.
The patches are attached to bugzilla bugs and I download them and apply
them.
I opened the patches (original and a copy of the Bugzilla attachment
version) using a hex editor and both patches are bit-for-bit identical.
They only have a newline (0x0A) at the end of a line.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-12-2011, 12:16 AM
James McKenzie
git patch comments
On 6/8/11 2:52 PM, Michael Cronenworth wrote:
> Turns into:
> Git comment - bullet 1 - bullet 2
>
This is how git formats the text when it sends the bug in. I've done
this myself and was surprised when formatting I applied disappeared. If
you want the latter, you'll have to inform the git folks in their
forum/bug reporting system.
James
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-12-2011, 03:29 PM
Todd Zullinger
git patch comments
James McKenzie wrote:
> On 6/8/11 2:52 PM, Michael Cronenworth wrote:
>> Turns into:
>> Git comment - bullet 1 - bullet 2
>>
> This is how git formats the text when it sends the bug in. I've
> done this myself and was surprised when formatting I applied
> disappeared. If you want the latter, you'll have to inform the git
> folks in their forum/bug reporting system.
For git commits, you should use the format:
$subject
$body
Git treats the text up to the first newline as the subject of the
commit and many tools are designed around that expectation.
Refer to the "DISCUSSION" section of the git commit manpage:
http://www.kernel.org/pub/software/scm/git/docs/git-commit.html#_discussion
The SubmittingPatches document also includes some helpful advice.
This document is primarily designed for those submitting patches to
the git project, but it's got a lot of good advice.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
The power of accurate observation is frequently called cynicism by
those who don't have it.
-- George Bernard Shaw
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-13-2011, 02:11 PM
Michael Cronenworth
git patch comments
Todd Zullinger wrote:
> For git commits, you should use the format:
>
> $subject
>
> $body
That's how the git patches are created. If it is supposed to work then
it is a bug because it is not working that way. I'll get this posted to
the git list/bugzilla when I can. Thanks.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-13-2011, 02:11 PM
Michael Cronenworth
git patch comments
Todd Zullinger wrote:
> For git commits, you should use the format:
>
> $subject
>
> $body
That's how the git patches are created. If it is supposed to work then
it is a bug because it is not working that way. I'll get this posted to
the git list/bugzilla when I can. Thanks.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-13-2011, 03:15 PM
Todd Zullinger
git patch comments
Michael Cronenworth wrote:
> That's how the git patches are created. If it is supposed to work then
> it is a bug because it is not working that way. I'll get this posted to
> the git list/bugzilla when I can. Thanks.
There isn't any git bugzilla, so just mailing the git list is the way
to go. However, I'm still curious to see a git formatted patch that
is affected here. I use git am regularly and have never seen this.
I just tested it by creating a commit message containing the following
text:
This is a test
Changes made:
- foo
- bar
- baz
I then use git format-patch -1, switched to a new branch and use git
am to apply this patch. The formatting was correct.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
I do not believe in the collective wisdom of individual ignorance.
-- Thomas Carlyle
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-13-2011, 03:32 PM
Michael Cronenworth
git patch comments
Todd Zullinger wrote:
> However, I'm still curious to see a git formatted patch that
> is affected here. I use git am regularly and have never seen this.
I would post one, but they are proprietary.
I double checked the patches and indeed they are formatted as:
line 1
line 2
line 3
Testing the following formatting of:
line 1
line 2
line 3
results in the expected formatting. Slightly annoying behavior but
easily worked around. Thanks.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
06-13-2011, 03:38 PM
Bruno Wolff III
git patch comments
On Mon, Jun 13, 2011 at 10:32:59 -0500,
Michael Cronenworth <mike@cchtml.com> wrote:
>
> I double checked the patches and indeed they are formatted as:
>
> line 1
> line 2
> line 3
>
> Testing the following formatting of:
>
> line 1
>
> line 2
> line 3
>
> results in the expected formatting. Slightly annoying behavior but
> easily worked around. Thanks.
The lines before the first blank line are the subject. You need to have
that blank line if you add other comments.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines