Gentoo Archives: gentoo-catalyst

From: "W. Trevor King" <wking@×××××××.us>
To: gentoo-catalyst@l.g.o
Cc: Brian Dolbec <dolsen@g.o>
Subject: Re: [gentoo-catalyst] [PATCH 0/4] Some general cleanup, remove some hardcoding of paths.
Date: Thu, 28 Feb 2013 13:17:37
Message-Id: 20130228131710.GA2872@odin.tremily.us
In Reply to: [gentoo-catalyst] [PATCH 0/4] Some general cleanup, remove some hardcoding of paths. by Brian Dolbec
1 On Wed, Feb 27, 2013 at 05:46:57PM -0800, Brian Dolbec wrote:
2 > There are several more bugfixes I feel shuld be applied to master if
3 > you intend on releasing a bug fix version bump. They will have to
4 > be applied manually since the file names and locations have changed
5 > in the rewrite.
6
7 Git records abbreviated blob SHAs in the diff:
8
9 diff --git a/ChangeLog b/ChangeLog
10 index 893cfec..12b41f2 100644
11 --- a/ChangeLog
12 +++ b/ChangeLog
13
14 which it can use to apply patches to files, even if the patched blobs
15 have been renamed in a separate commit. You have to use the `--3way`
16 option with `git am` to turn this functionality on, though. For
17 example:
18
19 $ mkdir test-repo
20 $ cd test-repo
21 $ git init
22 $ echo 'hello world' > README
23 $ git add README
24 $ git commit -m 'README: create with dummy content'
25 $ git mv README{,-b}
26 $ git commit -am 'README-b: moved from README'
27 $ echo 'goodbye world' >> README-b
28 $ git commit -am 'README: edited'
29 $ git format-patch HEAD^
30 $ git reset --hard HEAD^^
31 $ git am -3 *patch
32
33 Works (even though we reset to before the rename), as we can see with:
34
35 $ git --no-pager log --oneline
36 c587719 README: edited
37 ee5ec97 README: create with dummy content
38 $ cat README
39 hello world
40 goodbye world
41
42 However, the fact that Git *can* apply patches like this doesn't mean
43 that it's a good idea ;).
44
45 Cheers,
46 Trevor
47
48 --
49 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
50 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

File name MIME type
signature.asc application/pgp-signature