Re: git rm / format-patch / am fails on my file: patch does not apply

2013-11-13 Thread Ken Tanzer
Hi Philip.  I don't have any setting like that in either my
~/.gitconfig, or in the .git/config files.  I really haven't tweaked
my git config at all.

This is a typical .git/config file:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote origin]
url = ssh://ktan...@git.code.sf.net/p/agency/code
fetch = +refs/heads/*:refs/remotes/origin/*
[branch master]
remote = origin
merge = refs/heads/master

My ~/.gitconfig just has name and email settings in it.

Ken


On Wed, Nov 13, 2013 at 3:12 PM, Philip Oakley philipoak...@iee.org wrote:
 From: Junio C Hamano gits...@pobox.com
 To: Ken Tanzer ken.tan...@gmail.com
 Sent: Wednesday, November 13, 2013 5:04 PM

 Ken Tanzer ken.tan...@gmail.com writes:

 I am not very much surprised if such a file misbehaves, because the
 format-patch | am pipeline is designed to be used on patches that
 can be transferred in plain-text e-mail safely.  Long lines should
 probably be OK, but mixed CRLF, CR and LF may be problematic.


 I'm not sure I understand this comment.  format-patch seems to work
 fine on binary files.


 Yes.

 The problematic is when you tell it to process text files, taking
 into account various common text breakages may be introduced to the
 payload, and line-end conversion is among the operations that the
 user may be telling it to munge the perfectly-fine input, in an
 attempt to compensate.


 Stefan Beller stefanbel...@googlemail.com writes:

 I do have this global config
  core.safecrlf=warn
 regarding line endings.


 Ken,

 Do you have one of these line ending conversion settings active in your
 config file?

 It sounds like the 'git am' script may be silencing the warnings too
 aggressively if that is the case.

 Philip



-- 
AGENCY Software
A data system that puts you in control
100% Free Software
http://agency-software.org/
ken.tan...@agency-software.org
(253) 245-3801

Subscribe to the mailing list to
learn more about AGENCY or
follow the discussion.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git rm / format-patch / am fails on my file: patch does not apply

2013-11-12 Thread Ken Tanzer
 I am not very much surprised if such a file misbehaves, because the
 format-patch | am pipeline is designed to be used on patches that
 can be transferred in plain-text e-mail safely.  Long lines should
 probably be OK, but mixed CRLF, CR and LF may be problematic.

I'm not sure I understand this comment.  format-patch seems to work
fine on binary files.  So if it can handle any random collection of
bytes, why not text files with (admittedly funky) CRs and LFs?

Cheers,
Ken

On Mon, Nov 11, 2013 at 11:04 AM, Junio C Hamano gits...@pobox.com wrote:
 Ken Tanzer ken.tan...@gmail.com writes:

 ASCII text, with very long lines, with CRLF, CR, LF line terminators

 I am not very much surprised if such a file misbehaves, because the
 format-patch | am pipeline is designed to be used on patches that
 can be transferred in plain-text e-mail safely.  Long lines should
 probably be OK, but mixed CRLF, CR and LF may be problematic.

 Having said that...

 I've confirmed with the following test case on three machines, so it
 seems reproducible:

 mkdir temp_test_case
 cd temp_test_case
 git init
 # my file.  Sorry--couldn't find a saner link!
 wget -O jquery-ui-1.8.custom.min.js
 http://sourceforge.net/p/agency/code/ci/9358ea4dbe8e1540ec0b8bebfc7770f1bf8be0ec/tree/jquery-ui-1.8.custom.min.js?format=raw
 git add jquery-ui-1.8.custom.min.js
 git commit -m 'Adding jquery-ui'
 git rm jquery-ui-1.8.custom.min.js
 git commit -m 'Removing jquery-ui'
 git format-patch HEAD~1
 git reset --hard HEAD~1
 git am 0001*

 ... this does not break at all for me.



-- 
AGENCY Software
A data system that puts you in control
100% Free Software
http://agency-software.org/
ken.tan...@agency-software.org
(253) 245-3801

Subscribe to the mailing list to
learn more about AGENCY or
follow the discussion.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


git rm / format-patch / am fails on my file: patch does not apply

2013-11-10 Thread Ken Tanzer
I originally posted about this to the git-users list
(https://groups.google.com/forum/#!topic/git-users/G5D0bldEbTo).  If
this would normally be expected to work:

git add file
git commit
git rm file
git commit
git format-patch HEAD~1
git reset --hard HEAD~1
git am 0001*patch

then I'm having a problem with at least one (maybe more) file I have
in a repository that seems like a bug.  Even if I copy it to a new
repository, it will still fail, so it seems something about how git
handles the file, which file reports as:

ASCII text, with very long lines, with CRLF, CR, LF line terminators

I've confirmed with the following test case on three machines, so it
seems reproducible:

mkdir temp_test_case
cd temp_test_case
git init
# my file.  Sorry--couldn't find a saner link!
wget -O jquery-ui-1.8.custom.min.js
http://sourceforge.net/p/agency/code/ci/9358ea4dbe8e1540ec0b8bebfc7770f1bf8be0ec/tree/jquery-ui-1.8.custom.min.js?format=raw
git add jquery-ui-1.8.custom.min.js
git commit -m 'Adding jquery-ui'
git rm jquery-ui-1.8.custom.min.js
git commit -m 'Removing jquery-ui'
git format-patch HEAD~1
git reset --hard HEAD~1
git am 0001*

The last command reports the following:

Applying: Removing jquery-ui
error: patch failed: jquery-ui-1.8.custom.min.js:1
error: jquery-ui-1.8.custom.min.js: patch does not apply
Patch failed at 0001 Removing jquery-ui
The copy of the patch that failed is found in:
   /home/user/newtest2/temp_test_case/.git/rebase-apply/patch
When you have resolved this problem, run git am --resolved.
If you prefer to skip this patch, run git am --skip instead.
To restore the original branch and stop patching, run git am --abort.

Let me know if I can provide more information, or am missing something
obvious!  Thanks.

Ken
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html