trailling whitespace with git am ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello

I attached a patch that someone sent to me
the public repository is
http://repo.or.cz/w/diffractometer.git

this patch must be apply on the next branch

but when I try to use
git am, I have this sort of message:

mordor% git am /home/picca/Projets/patches/0001-Add-the-POGO-TO-DELETE-comment-to-ComputedAnglesClea.patch 
Applying: 'Add the POGO TO DELETE comment to ComputedAnglesClear command'
/tmp/diffractometer/.git/rebase-apply/patch:13: trailing whitespace.

/tmp/diffractometer/.git/rebase-apply/patch:14: trailing whitespace.
	/* POGO TO DELETE */
error: patch failed: src/Diffractometer/Diffractometer.cpp:2023
error: src/Diffractometer/Diffractometer.cpp: patch does not apply
Patch failed at 0001 'Add the POGO TO DELETE comment to ComputedAnglesClear command'
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".


so git do not want to apply it.

I was looking in the patch file about thoses trailing whitespace but I found nothing
until I rewrote myself this complicate patch :)
then I produced a diff beetween my patch and the original one.

I also attached it.
using emacs/vi I saw immediately the problem... It was a dos/unix file format problem. So the first message of git am was no helpfull at all for me. It would be nice to detect this format
problem when applying the patch and says something like
this patch is in dos format on an unix platform I can not apply it.

the a short explaination of what solution are possibles for the users.

now the question is:

what must I tell to that person if I want to work with her (as she is charming the forget about here is a no op :))
change your editor or is it a git configuration problem ? I suppose she is using msygit but I can not affirm this.

thanks

Frédéric

From 2ad19d21660e7a94cba0e7eaedbb867208832ca2 Mon Sep 17 00:00:00 2001
From: teresa <tnunez@xxxxxxxxxxxx>
Date: Fri, 14 Aug 2009 10:46:09 +0200
Subject: [PATCH] 'Add the POGO TO DELETE comment to ComputedAnglesClear command'

---
 src/Diffractometer/Diffractometer.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/Diffractometer/Diffractometer.cpp b/src/Diffractometer/Diffractometer.cpp
index 5d2a55d..98add35 100644
--- a/src/Diffractometer/Diffractometer.cpp
+++ b/src/Diffractometer/Diffractometer.cpp
@@ -2023,6 +2023,8 @@ void Diffractometer::computed_angles_clear()
 	DEBUG_STREAM << "Diffractometer::computed_angles_clear(): entering... !" << endl;
 
 	//	Add your own code to control device here
+
+	/* POGO TO DELETE */
 	_computedAngles_size = 0;
 	if(attr_ComputedAngles_read) {
 		delete [] attr_ComputedAngles_read;
-- 
1.6.4

1,25c1,25
< From 58ed93432f043ee5b2ad44d92a769eddcef4cffa Mon Sep 17 00:00:00 2001
< From: =?utf-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca@xxxxxxxxxxxxxxxxxxxxx>
< Date: Fri, 14 Aug 2009 12:10:50 +0200
< Subject: [PATCH] * test
< 
< ---
<  src/Diffractometer/Diffractometer.cpp |    2 ++
<  1 files changed, 2 insertions(+), 0 deletions(-)
< 
< diff --git a/src/Diffractometer/Diffractometer.cpp b/src/Diffractometer/Diffractometer.cpp
< index 5d2a55d..98add35 100644
< --- a/src/Diffractometer/Diffractometer.cpp
< +++ b/src/Diffractometer/Diffractometer.cpp
< @@ -2023,6 +2023,8 @@ void Diffractometer::computed_angles_clear()
<  	DEBUG_STREAM << "Diffractometer::computed_angles_clear(): entering... !" << endl;
<  
<  	//	Add your own code to control device here
< +
< +	/* POGO TO DELETE */
<  	_computedAngles_size = 0;
<  	if(attr_ComputedAngles_read) {
<  		delete [] attr_ComputedAngles_read;
< -- 
< 1.6.3.3
< 
---
> From 2ad19d21660e7a94cba0e7eaedbb867208832ca2 Mon Sep 17 00:00:00 2001
> From: teresa <tnunez@xxxxxxxxxxxx>
> Date: Fri, 14 Aug 2009 10:46:09 +0200
> Subject: [PATCH] 'Add the POGO TO DELETE comment to ComputedAnglesClear command'
> 
> ---
>  src/Diffractometer/Diffractometer.cpp |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/Diffractometer/Diffractometer.cpp b/src/Diffractometer/Diffractometer.cpp
> index 5d2a55d..98add35 100644
> --- a/src/Diffractometer/Diffractometer.cpp
> +++ b/src/Diffractometer/Diffractometer.cpp
> @@ -2023,6 +2023,8 @@ void Diffractometer::computed_angles_clear()
>  	DEBUG_STREAM << "Diffractometer::computed_angles_clear(): entering... !" << endl;
>  
>  	//	Add your own code to control device here
> +
> +	/* POGO TO DELETE */
>  	_computedAngles_size = 0;
>  	if(attr_ComputedAngles_read) {
>  		delete [] attr_ComputedAngles_read;
> -- 
> 1.6.4
> 

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]