aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'cb/http-multi-curl-auth'Junio C Hamano2012-04-27
|\ | | | | | | | | | | | | | | | | | | | | | | Fixes http authentication breakage when we keep multiple HTTP requests in flight using curl-multi. By Jeff King (3) and Clemens Buchacher (1) * cb/http-multi-curl-auth: http: use newer curl options for setting credentials http: clean up leak in init_curl_http_auth fix http auth with multiple curl handles http auth fails with multiple curl handles
| * http: use newer curl options for setting credentialsJeff King2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We give the username and password to curl by sticking them in a buffer of the form "user:pass" and handing the result to CURLOPT_USERPWD. Since curl 7.19.1, there is a split mechanism, where you can specify each element individually. This has the advantage that a username can contain a ":" character. It also is less code for us, since we can hand our strings over to curl directly. And since curl 7.17.0 and higher promise to copy the strings for us, we we don't even have to worry about memory ownership issues. Unfortunately, we have to keep the ugly code for old curl around, but as it is now nicely #if'd out, we can easily get rid of it when we decide that 7.19.1 is "old enough". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * http: clean up leak in init_curl_http_authJeff King2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a credential to give to curl, we must copy it into a "user:pass" buffer and then hand the buffer to curl. Old versions of curl did not copy the buffer, and we were expected to keep it valid. Newer versions of curl will copy the buffer. Our solution was to use a strbuf and detach it, giving ownership of the resulting buffer to curl. However, this meant that we were leaking the buffer on newer versions of curl, since curl was just copying it and throwing away the string we passed. Furthermore, when we replaced a credential (e.g., because our original one was rejected), we were also leaking on both old and new versions of curl. This got even worse in the last patch, which started replacing the credential (and thus leaking) on every http request. Instead, let's use a static buffer to make the ownership more clear and less leaky. We already keep a static "struct credential", so we are only handling a single credential at a time, anyway. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * fix http auth with multiple curl handlesJeff King2012-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP authentication is currently handled by get_refs and fetch_ref, but not by fetch_object, fetch_pack or fetch_alternates. In the single-threaded case, this is not an issue, since get_refs is always called first. It recognigzes the 401 and prompts the user for credentials, which will then be used subsequently. If the curl multi interface is used, however, only the multi handle used by get_refs will have credentials configured. Requests made by other handles fail with an authentication error. Fix this by setting CURLOPT_USERPWD whenever a slot is requested. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * http auth fails with multiple curl handlesClemens Buchacher2012-04-10
| | | | | | | | | | | | | | | | Create a repo with multiple loose objects in order to demonstrate http authentication breakage. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update draft release notes to 1.7.11Junio C Hamano2012-04-26
| | | | | | | | | | | | | | A handful of topics have been merged to maintenance releases, and the first half of 6th batch graduates to 'master'. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'rl/maint-stash-i18n-save-error'Junio C Hamano2012-04-26
|\ \ | | | | | | | | | | | | | | | | | | | | | The i18n of error message "git stash save" was not properly done. By Ross Lagerwall * rl/maint-stash-i18n-save-error: stash: use eval_gettextln correctly
| * | stash: use eval_gettextln correctlyRoss Lagerwall2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, passing an invalid option, git stash -v, gave: git-stash: line 204: $'error: unknown option for \'stash save\': $option\n To provide a message, use git stash save -- \'$option\'': command not found Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mb/fetch-call-a-non-branch-a-ref'Junio C Hamano2012-04-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The report from "git fetch" said "new branch" even for a non branch ref. By Marc Branchaud * mb/fetch-call-a-non-branch-a-ref: fetch: describe new refs based on where it came from fetch: Give remote_ref to update_local_ref() as well
| * | | fetch: describe new refs based on where it came fromMarc Branchaud2012-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update_local_ref() used to say "[new branch]" when we stored a new ref outside refs/tags/ hierarchy, but the message is more about what we fetched, so use the refname at the origin to make that decision. Also, only call a new ref a "branch" if it's under refs/heads/. Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | fetch: Give remote_ref to update_local_ref() as wellMarc Branchaud2012-04-17
| |/ / | | | | | | | | | | | | | | | | | | | | | This way, the function can look at the remote side to adjust the informational message it gives. Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jm/maint-strncpy-diff-no-index'Junio C Hamano2012-04-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "diff --no-index" codepath used limited-length buffers, risking pathnames getting truncated. Update it to use the strbuf API. By Jim Meyering (1) and Junio C Hamano (1) * jm/maint-strncpy-diff-no-index: diff --no-index: use strbuf for temporary pathnames diff: avoid stack-buffer-read-overrun for very long name
| * | | diff --no-index: use strbuf for temporary pathnamesJunio C Hamano2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using limited-length buffers and risking of pathname truncation, we should be taking advantage of strbuf API nowadays. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | diff: avoid stack-buffer-read-overrun for very long nameJim Meyering2012-04-16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the use of strncpy without explicit NUL termination, we could end up passing names n1 or n2 that are not NUL-terminated to queue_diff, which requires NUL-terminated strings. Ensure that each is NUL terminated. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge bundle error message fix inJunio C Hamano2012-04-26
|\ \ \ | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Start preparing for 1.7.10.1Junio C Hamano2012-04-26
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'jk/run-command-eacces' into maintJunio C Hamano2012-04-26
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PATH contains an unreadable directory, alias expansion code did not kick in, and failed with an error that said "git-subcmd" was not found. By Jeff King (1) and Ramsay Jones (1) * jk/run-command-eacces: run-command: treat inaccessible directories as ENOENT compat/mingw.[ch]: Change return type of exec functions to int
| * \ \ \ Merge branch 'jc/push-upstream-sanity' into maintJunio C Hamano2012-04-26
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'push to upstream' implementation was broken in some corner cases. "git push $there" without refspec, when the current branch is set to push to a remote different from $there, used to push to $there using the upstream information to a remote unreleated to $there. * jc/push-upstream-sanity: push: error out when the "upstream" semantics does not make sense
| * \ \ \ \ Merge branch 'jc/maint-clean-nested-worktree-in-subdir' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git clean -d -f" (not "-d -f -f") is supposed to protect nested working trees of independent git repositories that exist in the current project working tree from getting removed, but the protection applied only to such working trees that are at the top-level of the current project by mistake. * jc/maint-clean-nested-worktree-in-subdir: clean: preserve nested git worktree in subdirectories
| * \ \ \ \ \ Merge branch 'jk/diff-no-rename-empty' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename detection logic used to match two empty files as renames during merge-recursive, leading unnatural mismerges. By Jeff King * jk/diff-no-rename-empty: merge-recursive: don't detect renames of empty files teach diffcore-rename to optionally ignore empty content make is_empty_blob_sha1 available everywhere drop casts from users EMPTY_TREE_SHA1_BIN
| * \ \ \ \ \ \ Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An age-old corner case bug in combine diff (only triggered with -U0 and the hunk at the beginning of the file needs to be shown) has been fixed. By René Scharfe * rs/combine-diff-zero-context-at-the-beginning: combine-diff: fix loop index underflow
| * \ \ \ \ \ \ \ Merge branch 'jc/commit-unedited-template' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git commit --template F" errors out because the user did not touch the message, it claimed that it aborts due to "empty message", which was utterly wrong. By Junio C Hamano (4) and Adam Monsen (1) * jc/commit-unedited-template: Documentation/git-commit: rephrase the "initial-ness" of templates git-commit.txt: clarify -t requires editing message commit: rephrase the error when user did not touch templated log message commit: do not trigger bogus "has templated message edited" check t7501: test the right kind of breakage
| * \ \ \ \ \ \ \ \ Merge branch 'jk/add-p-skip-conflicts' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git add -p" is not designed to deal with unmerged paths but did not exclude them and tried to apply funny patches only to fail. By Jeff King * jk/add-p-skip-conflicts: add--interactive: ignore unmerged entries in patch mode
| * \ \ \ \ \ \ \ \ \ Merge branch 'jc/commit-hook-authorship' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git commit --author=$name" did not tell the name that was being recorded in the resulting commit to hooks, even though it does do so when the end user overrode the authorship via the "GIT_AUTHOR_NAME" environment variable. * jc/commit-hook-authorship: commit: pass author/committer info to hooks t7503: does pre-commit-hook learn authorship? ident.c: add split_ident_line() to parse formatted ident line
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'tr/maint-word-diff-regex-sticky' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regexp configured with diff.wordregex was incorrectly reused across files. By Thomas Rast (2) and Johannes Sixt (1) * tr/maint-word-diff-regex-sticky: diff: tweak a _copy_ of diff_options with word-diff diff: refactor the word-diff setup from builtin_diff_cmd t4034: diff.*.wordregex should not be "sticky" in --word-diff
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'jh/notes-merge-in-git-dir-worktree' into maintJunio C Hamano2012-04-26
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running "notes merge --commit" failed to perform correctly when run from any directory inside $GIT_DIR/. When "notes merge" stops with conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits to resolve it. By Johan Herland (3) and Junio C Hamano (1) * jh/notes-merge-in-git-dir-worktree: notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd notes-merge: use opendir/readdir instead of using read_directory() t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/ remove_dir_recursively(): Add flag for skipping removal of toplevel dir
| * \ \ \ \ \ \ \ \ \ \ \ \ Sync with 1.7.9.7Junio C Hamano2012-04-26
| |\ \ \ \ \ \ \ \ \ \ \ \ \
| | * | | | | | | | | | | | | Git 1.7.9.7v1.7.9.7Junio C Hamano2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | | | | | | | | | | | | Sync with 1.7.8.6Junio C Hamano2012-04-26
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | |
| | | * | | | | | | | | | | | Git 1.7.8.6v1.7.8.6Junio C Hamano2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | * | | | | | | | | | | | Sync with 1.7.7.7Junio C Hamano2012-04-26
| | | |\ \ \ \ \ \ \ \ \ \ \ \
| | | | * | | | | | | | | | | | Git 1.7.7.7v1.7.7.7Junio C Hamano2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | * | | | | | | | | | | | bundle: remove stray single-quote from error messageJonathan Nieder2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After running rev-list --boundary to retrieve the list of boundary commits, "git bundle create" runs its own revision walk. If in this stage git encounters an unfamiliar option, it writes a message with an unbalanced quotation mark: error: unrecognized argument: --foo' Drop the stray quote to match the "unrecognized argument: %s" message used elsewhere and save translators some work. This is mostly a futureproofing measure: for now, the "rev-list --boundary" command catches most strange arguments on its own and the above message is not seen unless you try something esoteric like "git bundle create test.bundle --header HEAD". Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | The fifth batch of topics graduated to 'master'Junio C Hamano2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | Merge branch 'fc/completion-tests'Junio C Hamano2012-04-24
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Felipe Contreras (4) and others * fc/completion-tests: completion: fix completion after 'git --option <TAB>' completion: avoid trailing space for --exec-path completion: add missing general options completion: simplify by using $prev completion: simplify __gitcomp_1 tests: add tests for the __gitcomp() completion helper function tests: add initial bash completion tests
| * | | | | | | | | | | | | | | | completion: fix completion after 'git --option <TAB>'SZEDER Gábor2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bash completion doesn't work when certain options to git itself are specified, e.g. 'git --no-pager <TAB>' errors out with error: invalid key: alias.--no-pager The main _git() completion function finds out the git command name by looping through all the words on the command line and searching for the first word that is not a known option for the git command. Unfortunately the list of known git options was not updated in a long time, and newer options are not skipped but mistaken for a git command. Such a misrecognized "command" is then passed to __git_aliased_command(), which in turn passes it to a 'git config' query, hence the error. Currently the following options are misrecognized for a git command: -c --no-pager --exec-path --html-path --man-path --info-path --no-replace-objects --work-tree= --namespace= To fix this we could just update the list of options to be skipped, but the same issue will likely arise, if the git command learns a new option in the future. Therefore, to make it more future proof against new options, this patch changes that loop to skip all option-looking words, i.e. words starting with a dash. We also have to handle the '-c' option specially, because it takes a configutation parameter in a separate word, which must be skipped, too. [fc: added tests] Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | completion: avoid trailing space for --exec-pathJonathan Nieder2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "--exec-path" looks to the completion script like an unambiguous successful completion, but it is wrong to emit a SP after it as if declaring that we are done with completion; the user could be trying to do git --exec-path; # print name of helper directory or git --exec-path=/path/to/alternative/helper/dir <subcommand> so the most helpful thing to do is to leave out the trailing space and leave it to the operator to type an equal sign or carriage return according to the situation. [fc: added tests] Cc: Andreas Schwab <schwab@linux-m68k.org> Reported-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | completion: add missing general optionsFelipe Contreras2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And add relevant tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | completion: simplify by using $prevFelipe Contreras2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cword-1 is the previous word ($prev). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | completion: simplify __gitcomp_1Felipe Contreras2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | tests: add tests for the __gitcomp() completion helper functionSZEDER Gábor2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests check that trailing space, prefix, and suffix are added correctly. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | tests: add initial bash completion testsFelipe Contreras2012-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | Merge branch 'cc/fix-missing-va-end-in-revert'Junio C Hamano2012-04-24
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Christian Couder * cc/fix-missing-va-end-in-revert: revert: add missing va_end
| * | | | | | | | | | | | | | | | | revert: add missing va_endChristian Couder2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | | Merge branch 'zj/upstream-error-message'Junio C Hamano2012-04-24
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error message given when @{u} is used for a branch without its upstream configured have been clatified. By Zbigniew Jędrzejewski-Szmek * zj/upstream-error-message: i18n: mark @{upstream} error messages for translation Be more specific if upstream branch is not tracked Provide better message for barnhc_wiht_tpyo@{u} Provide branch name in error message when using @{u} t1507: add tests to document @{upstream} behaviour
| * | | | | | | | | | | | | | | | | | i18n: mark @{upstream} error messages for translationZbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | Be more specific if upstream branch is not trackedZbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the branch configured as upstream didn't have a local tracking branch, git said "Upstream branch not found". We can be more helpful, and separate the cases when upstream is not configured, and when it is configured, but the upstream branch is not tracked in a local branch. The following configuration leads to the second scenario: [remote "origin"] url = ... fetch = refs/heads/master [branch "master"] remote = origin merge = refs/heads/master 'git pull' will work on master, but master@{upstream} is not defined. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | Provide better message for barnhc_wiht_tpyo@{u}Zbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of just saying that no upstream exists for such branch, which is true but not very helpful, check that there's no refs/heads/barnhc_wiht_tpyo and tell it to the user. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | Provide branch name in error message when using @{u}Zbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using @{u} or @{upstream} it is common to omit the branch name, implying current branch. If the upstream is not configured, the error message was "No upstream branch found for ''". When resolving '@{u}', branch_get() is called, which almost always returns a description of a branch. This allows us to use a branch name in the error message, even if the user said something like '@{u}'. The only case when branch_get() returns NULL is when HEAD points to so something which is not a branch. Of course this also means that no upstream is configured, but it is better to directly say that HEAD does not point to a branch. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | t1507: add tests to document @{upstream} behaviourZbigniew Jędrzejewski-Szmek2012-04-15
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for future changes, add tests which show error messages with @{upstream} in various conditions: - test branch@{u} with . as remote - check error message for branch@{u} on a branch with * no upstream, * on a branch with a configured upstream which doesn't have a remote-tracking branch - check error message for branch@{u} when branch 'branch' does not exist - check error message for @{u} without the branch name Right now the messages are very similar, but various cases can and will be distinguished. Note: test_i18ncmp is not used, because currently error output is not internationalized. test_cmp will be switched to test_i18ncmp in a later patch, when error messages are internationalized. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>