diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/coccinelle/array.cocci | 17 | ||||
-rwxr-xr-x | contrib/contacts/git-contacts | 2 | ||||
-rwxr-xr-x | contrib/rerere-train.sh | 54 |
3 files changed, 70 insertions, 3 deletions
diff --git a/contrib/coccinelle/array.cocci b/contrib/coccinelle/array.cocci index 4ba98b7eaf..c61d1ca8dc 100644 --- a/contrib/coccinelle/array.cocci +++ b/contrib/coccinelle/array.cocci @@ -27,6 +27,23 @@ expression n; @@ type T; +T *dst; +T *src; +expression n; +@@ +( +- memmove(dst, src, (n) * sizeof(*dst)); ++ MOVE_ARRAY(dst, src, n); +| +- memmove(dst, src, (n) * sizeof(*src)); ++ MOVE_ARRAY(dst, src, n); +| +- memmove(dst, src, (n) * sizeof(T)); ++ MOVE_ARRAY(dst, src, n); +) + +@@ +type T; T *ptr; expression n; @@ diff --git a/contrib/contacts/git-contacts b/contrib/contacts/git-contacts index dbe2abf277..85ad732fc0 100755 --- a/contrib/contacts/git-contacts +++ b/contrib/contacts/git-contacts @@ -11,7 +11,7 @@ use IPC::Open2; my $since = '5-years-ago'; my $min_percent = 10; -my $labels_rx = qr/Signed-off-by|Reviewed-by|Acked-by|Cc/i; +my $labels_rx = qr/Signed-off-by|Reviewed-by|Acked-by|Cc|Reported-by/i; my %seen; sub format_contact { diff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh index 52ad9e41fb..eeee45dd34 100755 --- a/contrib/rerere-train.sh +++ b/contrib/rerere-train.sh @@ -3,10 +3,56 @@ # Prime rerere database from existing merge commits me=rerere-train -USAGE="$me rev-list-args" +USAGE=$(cat <<-EOF +usage: $me [--overwrite] <rev-list-args> + + -h, --help show the help + -o, --overwrite overwrite any existing rerere cache +EOF +) SUBDIRECTORY_OK=Yes -OPTIONS_SPEC= + +overwrite=0 + +while test $# -gt 0 +do + opt="$1" + case "$opt" in + -h|--help) + echo "$USAGE" + exit 0 + ;; + -o|--overwrite) + overwrite=1 + shift + break + ;; + --) + shift + break + ;; + *) + break + ;; + esac +done + +# Overwrite or help options are not valid except as first arg +for opt in "$@" +do + case "$opt" in + -h|--help) + echo "$USAGE" + exit 0 + ;; + -o|--overwrite) + echo "$USAGE" + exit 0 + ;; + esac +done + . "$(git --exec-path)/git-sh-setup" require_work_tree cd_to_toplevel @@ -34,6 +80,10 @@ do # Cleanly merges continue fi + if test $overwrite = 1 + then + git rerere forget . + fi if test -s "$GIT_DIR/MERGE_RR" then git show -s --pretty=format:"Learning from %h %s" "$commit" |