diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2010-08-10 15:01:37 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 16:35:39 +0100 |
commit | 2cf104f7e09d620b9c04122d15ce347db34f9577 (patch) | |
tree | 173af7dc87afd8e96ef694807bb1080ab2718591 /meta/packages/guilt/files/optional_head_check.patch | |
parent | 15543017ec044b1b072a50335a6fd0a036def47e (diff) | |
download | poky-2cf104f7e09d620b9c04122d15ce347db34f9577.tar.gz |
guilt: import guilt for kernel patch management
The Wind River kernel is "patched" via guilt to provide
both git integration and quilt like patch management
(if that is of interest).
This is a modified 0.33 guilt with some changes to
streamline interactions with the way that the Wind
River kernel is constructed. That being said, the
common semantics of guilt are not changed, and it
can be used for other purposes.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/packages/guilt/files/optional_head_check.patch')
-rw-r--r-- | meta/packages/guilt/files/optional_head_check.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/packages/guilt/files/optional_head_check.patch b/meta/packages/guilt/files/optional_head_check.patch new file mode 100644 index 0000000000..368d63b6ab --- /dev/null +++ b/meta/packages/guilt/files/optional_head_check.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | guilt: allow guilt-push to opt out of head checking | ||
2 | |||
3 | Depending on the method used to construct a tree, it is entirely | ||
4 | possible that branches are not only made up of guilt created commits. | ||
5 | This mixed mode is valid, and in particular is valid when applying | ||
6 | patches to a tree. | ||
7 | |||
8 | In the default mode of operation, you will see a warning such as | ||
9 | this when working on a branch: | ||
10 | |||
11 | Expected HEAD commit dbd5861f81a92b8b329561f94b8575c7ee6768b6 | ||
12 | got 3e8e6f6bd9f1772b91fc1fe9949f541d0560b487 | ||
13 | |||
14 | This looks severe, but is harmless during tree construction, | ||
15 | since even if the HEAD commit was expected, you can still run into | ||
16 | issues pushing a patch. This is particularly seen when templates are | ||
17 | adding patches to a kernel. | ||
18 | |||
19 | To make this look less ominous, we make the head check for patch | ||
20 | pushing opt-in. Which means that by default, you'll no longer see | ||
21 | this warning if you work with a mixed mode branch during tree | ||
22 | construction. | ||
23 | |||
24 | Other modes such as pop or refresh can run into problems when | ||
25 | the HEAD commit isn't tracked or expected, so they should remained | ||
26 | checked. | ||
27 | |||
28 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
29 | |||
30 | --- | ||
31 | guilt | 3 +++ | ||
32 | guilt-push | 3 +++ | ||
33 | 2 files changed, 6 insertions(+) | ||
34 | |||
35 | --- a/guilt | ||
36 | +++ b/guilt | ||
37 | @@ -417,6 +417,9 @@ head_check() | ||
38 | return 0 ;; | ||
39 | esac | ||
40 | |||
41 | + # If do_head_check isn't set, bail, we are "opt-in" | ||
42 | + [ -z "$do_head_check" ] && return 0 | ||
43 | + | ||
44 | if [ "`git rev-parse refs/heads/$branch`" != "`git rev-parse $1`" ]; then | ||
45 | disp "Expected HEAD commit $1" >&2 | ||
46 | disp " got `git rev-parse refs/heads/$branch`" >&2 | ||
47 | --- a/guilt-push | ||
48 | +++ b/guilt-push | ||
49 | @@ -23,6 +23,9 @@ while [ $# -gt 0 ]; do | ||
50 | tag=$2 | ||
51 | shift | ||
52 | ;; | ||
53 | + --head_check) | ||
54 | + do_head_check=t | ||
55 | + ;; | ||
56 | *) | ||
57 | break | ||
58 | ;; | ||