summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-12string_list: add function string_list_append_nodup()Libravatar Michael Haggerty3-8/+47
Add a new function that appends a string to a string_list without copying it. This can be used to pass ownership of an already-copied string to a string_list that has strdup_strings set. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-07The fourth batch for 1.8.0Libravatar Junio C Hamano1-0/+52
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-07Merge branch 'nd/branch-v-alignment'Libravatar Junio C Hamano2-13/+17
Output from "git branch -v" contains "(no branch)" that could be localized, but the code to align it along with the names of branches were counting in bytes, not in display columns. * nd/branch-v-alignment: branch -v: align even when branch names are in UTF-8
2012-09-07Merge branch 'jk/maint-http-half-auth-push'Libravatar Junio C Hamano9-108/+173
Pushing to smart HTTP server with recent Git fails without having the username in the URL to force authentication, if the server is configured to allow GET anonymously, while requiring authentication for POST. * jk/maint-http-half-auth-push: http: prompt for credentials on failed POST http: factor out http error code handling t: test http access to "half-auth" repositories t: test basic smart-http authentication t/lib-httpd: recognize */smart/* repos as smart-http t/lib-httpd: only route auth/dumb to dumb repos t5550: factor out http auth setup t5550: put auth-required repo in auth/dumb
2012-09-07Merge branch 'jc/maint-doc-checkout-b-always-takes-branch-name'Libravatar Junio C Hamano1-3/+3
The synopsis said "checkout [-B branch]" to make it clear the branch name is a parameter to the option, but the heading for the option description was "-B::", not "-B branch::", making the documentation misleading. There may be room in documentation pages of other commands for similar improvements. * jc/maint-doc-checkout-b-always-takes-branch-name: doc: "git checkout -b/-B/--orphan" always takes a branch name
2012-09-07Merge branch 'jc/apply-binary-p0'Libravatar Junio C Hamano2-46/+76
"git apply -p0" did not parse pathnames on "diff --git" line correctly. This caused patches that had pathnames in no other places to be mistakenly rejected (most notably, binary patch that does not rename nor change mode). Textual patches, renames or mode changes have preimage and postimage pathnames in different places in a form that can be parsed unambiguously and did not suffer from this problem. * jc/apply-binary-p0: apply: compute patch->def_name correctly under -p0
2012-09-07Merge branch 'jc/dotdot-is-parent-directory'Libravatar Junio C Hamano5-4/+56
"git log .." errored out saying it is both rev range and a path when there is no disambiguating "--" is on the command line. Update the command line parser to interpret ".." as a path in such a case. * jc/dotdot-is-parent-directory: specifying ranges: we did not mean to make ".." an empty set
2012-09-07Merge branch 'nd/i18n-parseopt-help'Libravatar Junio C Hamano63-912/+912
A lot of i18n mark-up for the help text from "git <cmd> -h". * nd/i18n-parseopt-help: (66 commits) Use imperative form in help usage to describe an action Reduce translations by using same terminologies i18n: write-tree: mark parseopt strings for translation i18n: verify-tag: mark parseopt strings for translation i18n: verify-pack: mark parseopt strings for translation i18n: update-server-info: mark parseopt strings for translation i18n: update-ref: mark parseopt strings for translation i18n: update-index: mark parseopt strings for translation i18n: tag: mark parseopt strings for translation i18n: symbolic-ref: mark parseopt strings for translation i18n: show-ref: mark parseopt strings for translation i18n: show-branch: mark parseopt strings for translation i18n: shortlog: mark parseopt strings for translation i18n: rm: mark parseopt strings for translation i18n: revert, cherry-pick: mark parseopt strings for translation i18n: rev-parse: mark parseopt strings for translation i18n: reset: mark parseopt strings for translation i18n: rerere: mark parseopt strings for translation i18n: status: mark parseopt strings for translation i18n: replace: mark parseopt strings for translation ...
2012-09-07Merge branch 'nd/am-i18n-fix'Libravatar Junio C Hamano1-2/+2
"git am" wasn't marked up for i18n properly. * nd/am-i18n-fix: am: quote string for translation before passing to eval_gettextln
2012-09-07Merge branch 'jk/config-warn-on-inaccessible-paths'Libravatar Junio C Hamano6-10/+34
When looking for $HOME/.gitconfig etc., it is OK if we cannot read them because they do not exist, but we did not diagnose existing files that we cannot read. * jk/config-warn-on-inaccessible-paths: warn_on_inaccessible(): a helper to warn on inaccessible paths attr: warn on inaccessible attribute files gitignore: report access errors of exclude files config: warn on inaccessible files
2012-09-07Merge branch 'kk/maint-for-each-ref-multi-sort'Libravatar Junio C Hamano2-1/+13
"git for-each-ref" did not currectly support more than one --sort option. * kk/maint-for-each-ref-multi-sort: for-each-ref: Fix sort with multiple keys t6300: test sort with multiple keys
2012-09-07Merge branch 'lt/commit-tree-guess-utf-8'Libravatar Junio C Hamano2-28/+88
Teach "git commit" and "git commit-tree" the "we are told to use utf-8 in log message, but this does not look like utf-8---attempt to pass it through convert-from-latin1-to-utf8 and see if it makes sense" heuristics "git mailinfo" already uses. * lt/commit-tree-guess-utf-8: commit/commit-tree: correct latin1 to utf-8
2012-09-07Merge branch 'pw/p4-use-client-spec-branch-detection'Libravatar Junio C Hamano4-41/+145
Fix "git p4" when "--use-client-spec" and "--detect-branches" are used together (the command used to misdetect branches). * pw/p4-use-client-spec-branch-detection: git p4: make branch detection work with --use-client-spec git p4: do wildcard decoding in stripRepoPath git p4: set self.branchPrefixes in initialization git p4 test: add broken --use-client-spec --detect-branches tests git p4 test: move client_view() function to library
2012-09-07Merge branch 'tr/maint-parseopt-avoid-empty'Libravatar Junio C Hamano1-0/+2
A workaround to avoid doing _(""), which translates to unwanted magic string in the .po files. * tr/maint-parseopt-avoid-empty: gettext: do not translate empty string
2012-09-07Merge branch 'nd/i18n-poison-test-updates'Libravatar Junio C Hamano23-53/+83
Update tests that can be broken with gettext-poison builds. * nd/i18n-poison-test-updates: Fix tests under GETTEXT_POISON on parseopt Fix tests under GETTEXT_POISON on git-remote Fix tests under GETTEXT_POISON on pack-object Fix tests under GETTEXT_POISON on git-apply Fix tests under GETTEXT_POISON on diffstat Fix tests under GETTEXT_POISON on git-stash Fix tests under GETTEXT_POISON on relative dates
2012-09-03Update mailmap for a handful of folksLibravatar Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-03The third batch for 1.8.0Libravatar Junio C Hamano1-0/+45
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-03Merge branch 'js/use-sc-open-max'Libravatar Junio C Hamano1-7/+19
Introduce get_max_fd_limit() to absorb platforms that do not have getrlimit(RLIMIT_NOFILE) and/or sysconf(_SC_OPEN_MAX). * js/use-sc-open-max: sha1_file.c: introduce get_max_fd_limit() helper
2012-09-03Merge branch 'js/compat-mkdir'Libravatar Junio C Hamano2-0/+29
Some mkdir(2) implementations do not want to see trailing slash in its parameter. * js/compat-mkdir: compat: some mkdir() do not like a slash at the end
2012-09-03Merge branch 'js/no-curl-easy-strerror-on-old-curl'Libravatar Junio C Hamano1-0/+2
Done to support compilation on __TANDEM, but is independently useful for people with older version of libcURL. * js/no-curl-easy-strerror-on-old-curl: http.c: don't use curl_easy_strerror prior to curl-7.12.0
2012-09-03Merge branch 'jc/maint-mergetool-style-fix'Libravatar Junio C Hamano1-273/+308
* jc/maint-mergetool-style-fix: mergetool: style fixes
2012-09-03Merge branch 'sz/submodule-force-update'Libravatar Junio C Hamano3-2/+21
"git submodule update --force" used to leave the working tree of the submodule intact when there were local changes. It is more intiutive to make "--force" a sign to run "checkout -f" to overwrite them. * sz/submodule-force-update: Make 'git submodule update --force' always check out submodules.
2012-09-03Merge branch 'ph/stash-rerere'Libravatar Junio C Hamano2-0/+39
"git stash" internally used "git merge-recursive" backend, which did not trigger "rerere" upon conflicts unlike other mergy operations. * ph/stash-rerere: stash: invoke rerere in case of conflict test: git-stash conflict sets up rerere
2012-09-03Merge branch 'jc/daemon-access-hook'Libravatar Junio C Hamano2-0/+93
Allow an external command to tell git-daemon to decline service based on the client address, repository path, etc. * jc/daemon-access-hook: daemon: --access-hook option
2012-09-03Merge branch 'jc/send-email-reconfirm'Libravatar Junio C Hamano1-3/+13
Validate interactive input to "git send-email" to avoid common mistakes such as saying "y<RETURN>" to sender mail address whose prompt is given with a correctly guessed default. * jc/send-email-reconfirm: send-email: validate & reconfirm interactive responses
2012-09-03Merge branch 'cw/cherry-pick-allow-empty-message'Libravatar Junio C Hamano5-0/+16
"git cherry-pick" by default stops when it sees a commit without any log message. The "--allow-empty-message" option can be used to silently proceed. * cw/cherry-pick-allow-empty-message: cherry-pick: add --allow-empty-message option
2012-09-03Merge branch 'jc/maint-sane-execvp-notdir'Libravatar Junio C Hamano1-0/+2
"git foo" errored out with "Not a directory" when the user had a non directory on $PATH, and worse yet it masked an alias "foo" to run. * jc/maint-sane-execvp-notdir: sane_execvp(): ignore non-directory on $PATH
2012-09-03Merge branch 'jc/maint-config-exit-status'Libravatar Junio C Hamano3-6/+11
The exit status code from "git config" was way overspecified while being incorrect. Update the implementation to give the documented status for a case that was documented, and introduce a new code for "all other errors". * jc/maint-config-exit-status: config: "git config baa" should exit with status 1
2012-08-29Latter half of the second batch for 1.8.0Libravatar Junio C Hamano1-1/+30
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-29Merge branch 'rr/precompose-utf8-cleanup'Libravatar Junio C Hamano1-25/+19
* rr/precompose-utf8-cleanup: precompose-utf8: do not call checks for non-ascii "utf8" cleanup precompose_utf8
2012-08-29Merge branch 'mh/maint-config-doc-proxy-command'Libravatar Junio C Hamano1-2/+2
* mh/maint-config-doc-proxy-command: git-config doc: unconfuse an example git-config.txt: fix example
2012-08-29Merge branch 'ef/win32-cred-helper'Libravatar Junio C Hamano3-0/+375
Credential helper for Win32 to allow access to the keychain of the logged-in user. * ef/win32-cred-helper: contrib: add win32 credential-helper
2012-08-29Merge branch 'hv/submodule-path-unmatch'Libravatar Junio C Hamano2-7/+52
* hv/submodule-path-unmatch: Let submodule command exit with error status if path does not exist
2012-08-29Merge branch 'jc/capabilities'Libravatar Junio C Hamano8-17/+102
Some capabilities were asked by fetch-pack even when upload-pack did not advertise that they are available. Fix fetch-pack not to do so. * jc/capabilities: fetch-pack: mention server version with verbose output parse_feature_request: make it easier to see feature values fetch-pack: do not ask for unadvertised capabilities do not send client agent unless server does first send-pack: fix capability-sending logic include agent identifier in capability string
2012-08-29Merge branch 'mg/rebase-i-onto-reflog-in-full'Libravatar Junio C Hamano1-2/+1
The reflog entries left by "git rebase" and "git rebase -i" were inconsistent. * mg/rebase-i-onto-reflog-in-full: rebase -i: use full onto sha1 in reflog
2012-08-29Merge branch 'mz/empty-rebase-test'Libravatar Junio C Hamano1-1/+17
* mz/empty-rebase-test: add tests for 'git rebase --keep-empty'
2012-08-29Merge branch 'jc/maint-protect-sh-from-ifs'Libravatar Junio C Hamano1-0/+4
When the user exports a non-default IFS without HT, scripts that rely on being able to parse "ls-files -s | while read a b c..." start to fail. Protect them from such a misconfiguration. * jc/maint-protect-sh-from-ifs: sh-setup: protect from exported IFS
2012-08-29Merge branch 'bc/prune-info'Libravatar Junio C Hamano1-1/+2
Teach "git prune" without "-v" to be silent about leftover temporary files. * bc/prune-info: prune.c: only print informational message in show_only or verbose mode
2012-08-29Merge branch 'mz/cherry-code-cleanup'Libravatar Junio C Hamano1-16/+6
Minor code clean-up on the cherry-pick codepath. * mz/cherry-code-cleanup: cherry: remove redundant check for merge commit cherry: don't set ignored rev_info options remove unnecessary parameter from get_patch_ids()
2012-08-27First half of the second batch for 1.8.0Libravatar Junio C Hamano1-0/+37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-27Merge branch 'jk/docs-docbook-monospace-display'Libravatar Junio C Hamano2-3/+3
The documentation in the TeXinfo format was using indented output for materials meant to be examples that are better typeset in monospace. * jk/docs-docbook-monospace-display: docs: monospace listings in docbook output
2012-08-27Merge branch 'da/difftool-updates'Libravatar Junio C Hamano6-101/+244
"git difftool --dir-diff" learned to use symbolic links to prepare temporary copy of the working tree when available. * da/difftool-updates: difftool: silence warning Add Code Compare v2.80.4 as a merge / diff tool for Windows mergetool,difftool: Document --tool-help consistently difftool: Disable --symlinks on cygwin difftool: Handle compare() returning -1 difftool: Wrap long lines for readability difftool: Check all return codes from compare() difftool: Handle finding mergetools/ in a path with spaces difftool: Use symlinks when diffing against the worktree difftool: Call the temp directory "git-difftool" difftool: Move option values into a hash difftool: Eliminate global variables difftool: Simplify print_tool_help()
2012-08-27Merge branch 'js/grep-patterntype-config'Libravatar Junio C Hamano5-42/+281
"grep" learned to use a non-standard pattern type by default if a configuration variable tells it to. * js/grep-patterntype-config: grep: add a grep.patternType configuration setting
2012-08-27Merge branch 'bc/receive-pack-stdout-protection'Libravatar Junio C Hamano2-1/+37
When "git push" triggered the automatic gc on the receiving end, a message from "git prune" that said it was removing cruft leaked to the standard output, breaking the communication protocol. * bc/receive-pack-stdout-protection: receive-pack: do not leak output from auto-gc to standard output t/t5400: demonstrate breakage caused by informational message from prune
2012-08-27Merge branch 'ab/diff-write-incomplete-line'Libravatar Junio C Hamano2-0/+31
The output from "git diff -B" for a file that ends with an incomplete line did not put "\ No newline..." on a line of its own. * ab/diff-write-incomplete-line: Fix '\ No newline...' annotation in rewrite diffs
2012-08-27Merge branch 'jc/maint-t7406-rev-parse-max-count-huh'Libravatar Junio C Hamano1-8/+8
Test clean-up, with no behaviour change. * jc/maint-t7406-rev-parse-max-count-huh: t7406: fix misleading "rev-parse --max-count=1 HEAD"
2012-08-27Merge branch 'jk/maint-null-in-trees'Libravatar Junio C Hamano18-32/+188
We do not want a link to 0{40} object stored anywhere in our objects. * jk/maint-null-in-trees: fsck: detect null sha1 in tree entries do not write null sha1s to on-disk index diff: do not use null sha1 as a sentinel value
2012-08-27Merge branch 'mm/push-default-switch-warning'Libravatar Junio C Hamano2-3/+31
In the next major release, we will switch "git push [$there]" that does not say what to push from the traditional "matching" to the updated "simple" semantics, that pushes the current branch to the branch with the same name only when the current branch is set to integrate with that remote branch (all other cases will error out). * mm/push-default-switch-warning: push: start warning upcoming default change for push.default
2012-08-27branch -v: align even when branch names are in UTF-8Libravatar Nguyễn Thái Ngọc Duy2-13/+17
Branch names are usually in ASCII so they are not the problem. The problem most likely comes from "(no branch)" translation, which is in UTF-8 and makes display-width calculation just wrong. Clarify this by renaming the field "len" in struct ref_item to "width", as it stores the display-width and is used to compute the width of the screen needed to show the names of all the branches, and compute the display width using utf8_strwidth(), not byte-length with strlen(). Update document to mention the fact that we may want ref names in UTF-8. Encodings that produce invalid UTF-8 are safe as utf8_strwidth() falls back to strlen(). The ones that incidentally produce valid UTF-8 sequences will cause misalignment. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-27http: prompt for credentials on failed POSTLibravatar Jeff King2-9/+16
All of the smart-http GET requests go through the http_get_* functions, which will prompt for credentials and retry if we see an HTTP 401. POST requests, however, do not go through any central point. Moreover, it is difficult to retry in the general case; we cannot assume the request body fits in memory or is even seekable, and we don't know how much of it was consumed during the attempt. Most of the time, this is not a big deal; for both fetching and pushing, we make a GET request before doing any POSTs, so typically we figure out the credentials during the first request, then reuse them during the POST. However, some servers may allow a client to get the list of refs from receive-pack without authentication, and then require authentication when the client actually tries to POST the pack. This is not ideal, as the client may do a non-trivial amount of work to generate the pack (e.g., delta-compressing objects). However, for a long time it has been the recommended example configuration in git-http-backend(1) for setting up a repository with anonymous fetch and authenticated push. This setup has always been broken without putting a username into the URL. Prior to commit 986bbc0, it did work with a username in the URL, because git would prompt for credentials before making any requests at all. However, post-986bbc0, it is totally broken. Since it has been advertised in the manpage for some time, we should make sure it works. Unfortunately, it is not as easy as simply calling post_rpc again when it fails, due to the input issue mentioned above. However, we can still make this specific case work by retrying in two specific instances: 1. If the request is large (bigger than LARGE_PACKET_MAX), we will first send a probe request with a single flush packet. Since this request is static, we can freely retry it. 2. If the request is small and we are not using gzip, then we have the whole thing in-core, and we can freely retry. That means we will not retry in some instances, including: 1. If we are using gzip. However, we only do so when calling git-upload-pack, so it does not apply to pushes. 2. If we have a large request, the probe succeeds, but then the real POST wants authentication. This is an extremely unlikely configuration and not worth worrying about. While it might be nice to cover those instances, doing so would be significantly more complex for very little real-world gain. In the long run, we will be much better off when curl learns to internally handle authentication as a callback, and we can cleanly handle all cases that way. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>