diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-completion.bash | 8 | ||||
-rwxr-xr-x | contrib/contacts/git-contacts | 2 | ||||
-rw-r--r-- | contrib/credential/gnome-keyring/git-credential-gnome-keyring.c | 3 | ||||
-rw-r--r-- | contrib/credential/libsecret/git-credential-libsecret.c | 5 | ||||
-rw-r--r-- | contrib/credential/wincred/git-credential-wincred.c | 10 | ||||
-rw-r--r-- | contrib/emacs/git-blame.el | 5 | ||||
-rw-r--r-- | contrib/emacs/git.el | 5 | ||||
-rwxr-xr-x | contrib/examples/git-merge.sh | 4 | ||||
-rwxr-xr-x | contrib/examples/git-resolve.sh | 2 | ||||
-rwxr-xr-x | contrib/fast-import/import-directories.perl | 3 | ||||
-rwxr-xr-x | contrib/hg-to-git/hg-to-git.py | 3 | ||||
-rwxr-xr-x | contrib/rerere-train.sh | 54 | ||||
-rwxr-xr-x | contrib/subtree/t/t7900-subtree.sh | 2 |
13 files changed, 78 insertions, 28 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 0e16f017a4..17929b0809 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -111,8 +111,7 @@ __git () # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # The latest version of this software can be obtained here: # @@ -1205,7 +1204,7 @@ _git_branch () --color --no-color --verbose --abbrev= --no-abbrev --track --no-track --contains --no-contains --merged --no-merged --set-upstream-to= --edit-description --list - --unset-upstream --delete --move --remotes + --unset-upstream --delete --move --copy --remotes --column --no-column --sort= --points-at " ;; @@ -1250,7 +1249,8 @@ _git_checkout () --*) __gitcomp " --quiet --ours --theirs --track --no-track --merge - --conflict= --orphan --patch + --conflict= --orphan --patch --detach --ignore-skip-worktree-bits + --recurse-submodules --no-recurse-submodules " ;; *) 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/credential/gnome-keyring/git-credential-gnome-keyring.c b/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c index 2a317fca44..d389bfadce 100644 --- a/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c +++ b/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program; if not, see <http://www.gnu.org/licenses/>. */ /* diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c index 4c56979d8a..e6598b6383 100644 --- a/contrib/credential/libsecret/git-credential-libsecret.c +++ b/contrib/credential/libsecret/git-credential-libsecret.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program; if not, see <http://www.gnu.org/licenses/>. */ /* @@ -104,7 +103,7 @@ static int keyring_get(struct credential *c) items = secret_service_search_sync(service, SECRET_SCHEMA_COMPAT_NETWORK, attributes, - SECRET_SEARCH_LOAD_SECRETS, + SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK, NULL, &error); g_hash_table_unref(attributes); diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c index 006134043a..86518cd93d 100644 --- a/contrib/credential/wincred/git-credential-wincred.c +++ b/contrib/credential/wincred/git-credential-wincred.c @@ -94,6 +94,12 @@ static WCHAR *wusername, *password, *protocol, *host, *path, target[1024]; static void write_item(const char *what, LPCWSTR wbuf, int wlen) { char *buf; + + if (!wbuf || !wlen) { + printf("%s=\n", what); + return; + } + int len = WideCharToMultiByte(CP_UTF8, 0, wbuf, wlen, NULL, 0, NULL, FALSE); buf = xmalloc(len); @@ -160,7 +166,7 @@ static int match_part_last(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim) static int match_cred(const CREDENTIALW *cred) { LPCWSTR target = cred->TargetName; - if (wusername && wcscmp(wusername, cred->UserName)) + if (wusername && wcscmp(wusername, cred->UserName ? cred->UserName : L"")) return 0; return match_part(&target, L"git", L":") && @@ -183,7 +189,7 @@ static void get_credential(void) for (i = 0; i < num_creds; ++i) if (match_cred(creds[i])) { write_item("username", creds[i]->UserName, - wcslen(creds[i]->UserName)); + creds[i]->UserName ? wcslen(creds[i]->UserName) : 0); write_item("password", (LPCWSTR)creds[i]->CredentialBlob, creds[i]->CredentialBlobSize / sizeof(WCHAR)); diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el index e671f6c1c6..510e0f7103 100644 --- a/contrib/emacs/git-blame.el +++ b/contrib/emacs/git-blame.el @@ -25,9 +25,8 @@ ;; PURPOSE. See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public -;; License along with this program; if not, write to the Free -;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, -;; MA 02111-1307 USA +;; License along with this program; if not, see +;; <http://www.gnu.org/licenses/>. ;; http://www.fsf.org/copyleft/gpl.html diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el index 5ffc506f6d..97919f2d73 100644 --- a/contrib/emacs/git.el +++ b/contrib/emacs/git.el @@ -15,9 +15,8 @@ ;; PURPOSE. See the GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public -;; License along with this program; if not, write to the Free -;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, -;; MA 02111-1307 USA +;; License along with this program; if not, see +;; <http://www.gnu.org/licenses/>. ;;; Commentary: diff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh index ee99f1a4ee..932e78dbfe 100755 --- a/contrib/examples/git-merge.sh +++ b/contrib/examples/git-merge.sh @@ -399,7 +399,7 @@ case "$allow_fast_forward,$#,$common,$no_commit" in ?,1,"$1",*) # If head can reach all the merge then we are up to date. # but first the most common case of merging one remote. - finish_up_to_date "Already up-to-date." + finish_up_to_date "Already up to date." exit 0 ;; t,1,"$head",*) @@ -459,7 +459,7 @@ t,1,"$head",*) done if test "$up_to_date" = t then - finish_up_to_date "Already up-to-date. Yeeah!" + finish_up_to_date "Already up to date. Yeeah!" exit 0 fi ;; diff --git a/contrib/examples/git-resolve.sh b/contrib/examples/git-resolve.sh index 70fdc27b72..3099dc851a 100755 --- a/contrib/examples/git-resolve.sh +++ b/contrib/examples/git-resolve.sh @@ -41,7 +41,7 @@ fi case "$common" in "$merge") - echo "Already up-to-date. Yeeah!" + echo "Already up to date. Yeeah!" dropheads exit 0 ;; diff --git a/contrib/fast-import/import-directories.perl b/contrib/fast-import/import-directories.perl index 4dec1f18e4..a16f79cfdc 100755 --- a/contrib/fast-import/import-directories.perl +++ b/contrib/fast-import/import-directories.perl @@ -14,8 +14,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # ------------------------------------------------------------------------ diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py index 60dec86d37..de3f81667e 100755 --- a/contrib/hg-to-git/hg-to-git.py +++ b/contrib/hg-to-git/hg-to-git.py @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, see <http://www.gnu.org/licenses/>. """ import os, os.path, sys 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" diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index 3c87ebaf57..d05c613c97 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -253,7 +253,7 @@ test_expect_success 'merge the added subproj again, should do nothing' ' # this shouldn not actually do anything, since FETCH_HEAD # is already a parent result=$(git merge -s ours -m "merge -s -ours" FETCH_HEAD) && - check_equal "${result}" "Already up-to-date." + check_equal "${result}" "Already up to date." ) ' |