git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GNU patch: new 2.6 release
@ 2009-11-14  0:09 Andreas Gruenbacher
  2009-11-14  8:45 ` Björn Gustavsson
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Gruenbacher @ 2009-11-14  0:09 UTC (permalink / raw)
  To: git

I am pleased to announce my first release of GNU patch,
available by anonymous FTP from:

  ftp://ftp.gnu.org/gnu/patch/

The last release dates back to June 2004 with version 2.5.9.  A new Savannah 
project has been created with the new code repository and the bug-patch 
mailing list archive at:

  http://savannah.gnu.org/projects/patch

A lot of changes have accumulated since version 2.5.9.  The following user 
visible changes have been made:

* A regression test suite has been added ("make check").

* A --merge option has been added which will merge a patch file into
  the original files similar to merge(1).  See the patch(1) manual page for
  documentation.

* Unless a file name has been specified on the command line, look only
  for file names in the patch until one has been found.  This prevents
  patch from tripping over garbage that isn't a patch.  When conforming
  to POSIX, this behavior is turned off and patch will ask for a
  file name when none is found.

* All reject files have file name headers now, which allows them to be used as
  regular patches.

* When a patch file modifies the same file more than once, patch makes
  sure it backs up the original version of the file rather than any
  intermediary versions.

* In the above situation, if there are rejects in more than one of those
  patches, they all go into the same reject file.

* When the file to be patched is specified on the command line, all patches
  are applied to that file. (Previously, the first patch was applied to the
  file specified on the command line, and the names of additional files to
  patch were taken from header lines in the patch file.)

* The -r option now works correctly even if there are rejects in more than
  one file.  Use the - argument to discard rejects.

* Rejected hunks come out in unified diff format if the input patch was of
  that format, otherwise in ordinary context diff form.  Use the
  --reject-format option to enforce either "context" or "unified" format.
  Timestamps and the "diff -p" (--show-c-function) output are preserved.
  Changed lines in context format reject files are correctly indicated
  with '!' markers as the format defines.  Added and removed lines are
  still marked with '+' and '-', respectively.

* The file permissions of reject files are no longer set to match the files
  they modify.  Instead, they retain the default permissions.  This is
  consistent with reject files produced with the -r option.

* The --binary option disables the heuristic for stripping CRs from
  line endings in patches.  This allows to preserve CRs even in mangled
  patches, or in patches generated on non-POSIX systems and without the
  --binary option.

* Backup files for non-existing files are now created with default
  permissions rather than with mode 0: backup files with mode 0 were
  causing problems with applications which do not expect unreadable
  files.

* The -B, -Y, and -z options (--prefix, --basename-prefix, --suffix) now
  imply the simple version control mode, and can be combined.

* Patch rejects more malformed normal format commands and checks for trailing
  garbage.  It now recognizes ed commands without addresses.

* Change the default value of PATCH_GET to 0.  (Previously, the default was 0
  under POSIXLY_CORRECT and negative otherwise; this is causing problems
  particularly with Perforce.)

* Handle missing timestamps better.


Please email bugs or suggestions to <bug-patch@gnu.org>.  (Check the Savannah 
project's bug tracker for a list of known issues.)


Thanks,
Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GNU patch: new 2.6 release
  2009-11-14  0:09 GNU patch: new 2.6 release Andreas Gruenbacher
@ 2009-11-14  8:45 ` Björn Gustavsson
  2009-11-14 10:17   ` Andreas Gruenbacher
  2009-11-15 13:37   ` Thomas Rast
  0 siblings, 2 replies; 6+ messages in thread
From: Björn Gustavsson @ 2009-11-14  8:45 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: git

On Sat, Nov 14, 2009 at 1:09 AM, Andreas Gruenbacher <agruen@suse.de> wrote:
> I am pleased to announce my first release of GNU patch,

Nice to see a new release.

Do you have any plans to support git-style binary patches?

That would be very useful in a workflow when you work in git (and have some
binary files in the repository), but need to commit your finished work
into another VCS (such as Clearcase).

/Björn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GNU patch: new 2.6 release
  2009-11-14  8:45 ` Björn Gustavsson
@ 2009-11-14 10:17   ` Andreas Gruenbacher
  2009-11-14 12:27     ` Björn Gustavsson
  2009-11-15 13:37   ` Thomas Rast
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Gruenbacher @ 2009-11-14 10:17 UTC (permalink / raw)
  To: Björn Gustavsson; +Cc: git, bug-patch

On Saturday 14 November 2009 09:45:11 am Björn Gustavsson wrote:
> Do you have any plans to support git-style binary patches?

Support for git's extended header lines for renames, copies, hashes, file 
modes would be great. I'll happily take patches or eventually implement it 
myself. Binary patches are not as high on my wish list, but feel free to send 
code.

> That would be very useful in a workflow when you work in git (and have some
> binary files in the repository), but need to commit your finished work
> into another VCS (such as Clearcase).

Isn't there a better way to do this than with patches?

Thanks,
Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GNU patch: new 2.6 release
  2009-11-14 10:17   ` Andreas Gruenbacher
@ 2009-11-14 12:27     ` Björn Gustavsson
  0 siblings, 0 replies; 6+ messages in thread
From: Björn Gustavsson @ 2009-11-14 12:27 UTC (permalink / raw)
  To: bug-patch; +Cc: git

2009/11/14 Andreas Gruenbacher <agruen@suse.de>:
> Support for git's extended header lines for renames, copies, hashes, file
> modes would be great. I'll happily take patches or eventually implement it
> myself. Binary patches are not as high on my wish list, but feel free to send
> code.

Support for the other extended header lines would be useful for me too.
I might have a go at implementing them (and binary patches) at some
point in the future.

>> That would be very useful in a workflow when you work in git (and have some
>> binary files in the repository), but need to commit your finished work
>> into another VCS (such as Clearcase).
>
> Isn't there a better way to do this than with patches?

If there is a better way, I would be very interested in finding out what it is.

Feeding the output from 'git format-patch' to patch is the
best way I've had come up with yet. patch (given the '-g 1' option)
will automatically check out the files that are to be patched.
I have wrapped that in a simple script that retrieves the commit
comment from the patch and check in the files with that commit
comment.

/Björn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GNU patch: new 2.6 release
  2009-11-14  8:45 ` Björn Gustavsson
  2009-11-14 10:17   ` Andreas Gruenbacher
@ 2009-11-15 13:37   ` Thomas Rast
  2009-11-15 14:02     ` Björn Gustavsson
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Rast @ 2009-11-15 13:37 UTC (permalink / raw)
  To: Björn Gustavsson; +Cc: Andreas Gruenbacher, git

Björn Gustavsson wrote:
> Do you have any plans to support git-style binary patches?
> 
> That would be very useful in a workflow when you work in git (and have some
> binary files in the repository), but need to commit your finished work
> into another VCS (such as Clearcase).

You can simply use git-apply in this case, it also works outside a git
repository.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GNU patch: new 2.6 release
  2009-11-15 13:37   ` Thomas Rast
@ 2009-11-15 14:02     ` Björn Gustavsson
  0 siblings, 0 replies; 6+ messages in thread
From: Björn Gustavsson @ 2009-11-15 14:02 UTC (permalink / raw)
  To: Thomas Rast; +Cc: Andreas Gruenbacher, git, bug-patch

2009/11/15 Thomas Rast <trast@student.ethz.ch>:
> Björn Gustavsson wrote:
>> That would be very useful in a workflow when you work in git (and have some
>> binary files in the repository), but need to commit your finished work
>> into another VCS (such as Clearcase).
>
> You can simply use git-apply in this case, it also works outside a git
> repository.

Thanks, I didn't know that. I just assumed that it used the index
or generally depended on being run in a git repository.

The patch program does one thing that git-apply does not --
it can check out the files to be patched (for systems that need
it, such as Clearcase or RCS). I will have to handle that myself
(but that is not hard, I can either use 'git diff --name-only' to find
out the file names or extract the names from the patch itself).

/Björn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-15 14:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-14  0:09 GNU patch: new 2.6 release Andreas Gruenbacher
2009-11-14  8:45 ` Björn Gustavsson
2009-11-14 10:17   ` Andreas Gruenbacher
2009-11-14 12:27     ` Björn Gustavsson
2009-11-15 13:37   ` Thomas Rast
2009-11-15 14:02     ` Björn Gustavsson

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 NNTP newsgroup(s).