summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'tb/complete-describe'Junio C Hamano2017-10-111-1/+1
|\ | | | | | | | | | | | | Docfix. * tb/complete-describe: completion: add --broken and --dirty to describe
| * completion: add --broken and --dirty to describetb/complete-describeThomas Braun2017-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the flags for broken and dirty were implemented in b0176ce6b5 (builtin/describe: introduce --broken flag, 2017-03-21) and 9f67d2e827 (Teach "git describe" --dirty option, 2009-10-21) the completion was not updated, although these flags are useful completions. Add them. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Helped-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'rs/cocci-de-paren-call-params'Junio C Hamano2017-10-051-5/+5
|\ \ | | | | | | | | | | | | | | | | | | Code clean-up. * rs/cocci-de-paren-call-params: coccinelle: remove parentheses that become unnecessary
| * | coccinelle: remove parentheses that become unnecessaryrs/cocci-de-paren-call-paramsRené Scharfe2017-10-021-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transformations that hide multiplications can end up with an pair of parentheses that is no longer needed. E.g. with a rule like this: @@ expression E; @@ - E * 2 + double(E) ... we might get a patch like this: - x = (a + b) * 2; + x = double((a + b)); Add a pair of parentheses to the preimage side of such rules. Coccinelle will generate patches that remove them if they are present, and it will still match expressions that lack them. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'dw/diff-highlight-makefile-fix'Junio C Hamano2017-09-191-0/+3
|\ \ | | | | | | | | | | | | | | | | | | Build clean-up. * dw/diff-highlight-makefile-fix: diff-highlight: add clean target to Makefile
| * | diff-highlight: add clean target to Makefiledw/diff-highlight-makefile-fixDaniel Watkins2017-09-061-0/+3
| |/ | | | | | | | | | | | | | | Now that `make` produces a file, we should have a clean target to remove it. Signed-off-by: Daniel Watkins <daniel@daniel-watkins.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ma/up-to-date'Junio C Hamano2017-09-103-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | Message and doc updates. * ma/up-to-date: treewide: correct several "up-to-date" to "up to date" Documentation/user-manual: update outdated example output
| * | treewide: correct several "up-to-date" to "up to date"ma/up-to-dateMartin Ågren2017-08-233-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the Oxford style, which says to use "up-to-date" before the noun, but "up to date" after it. Don't change plumbing (specifically send-pack.c, but transport.c (git push) also has the same string). This was produced by grepping for "up-to-date" and "up to date". It turned out we only had to edit in one direction, removing the hyphens. Fix a typo in Documentation/git-diff-index.txt while we're there. Reported-by: Jeffrey Manian <jeffrey.manian@gmail.com> Reported-by: STEVEN WHITE <stevencharleswhitevoices@gmail.com> Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'eb/contacts-reported-by'Junio C Hamano2017-08-111-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git contacts" (in contrib/) now lists the address on the "Reported-by:" trailer to its output, in addition to those on S-o-b: and other trailers, to make it easier to notify (and thank) the original bug reporter. * eb/contacts-reported-by: git-contacts: also recognise "Reported-by:"
| * | | git-contacts: also recognise "Reported-by:"eb/contacts-reported-byEric Blake2017-07-271-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | It's nice to cc someone that reported a bug, in order to let them know that a fix is being considered, and possibly even get their help in reviewing/testing the patch. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rg/rerere-train-overwrite'Junio C Hamano2017-08-111-2/+52
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | The "rerere-train" script (in contrib/) learned the "--overwrite" option to allow overwriting existing recorded resolutions. * rg/rerere-train-overwrite: contrib/rerere-train: optionally overwrite existing resolutions
| * | contrib/rerere-train: optionally overwrite existing resolutionsrg/rerere-train-overwriteRaman Gupta2017-07-261-2/+52
| |/ | | | | | | | | | | | | | | | | | | | | Provide the user an option to overwrite existing resolutions using an `--overwrite` flag. This might be used, for example, if the user knows that they already have an entry in their rerere cache for a conflict, but wish to drop it and retrain based on the merge commit(s) passed to the rerere-train script. Signed-off-by: Raman Gupta <rocketraman@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | add MOVE_ARRAYRené Scharfe2017-07-171-0/+17
|/ | | | | | | | | | | | | | Similar to COPY_ARRAY (introduced in 60566cbb58), add a safe and convenient helper for moving potentially overlapping ranges of array entries. It infers the element size, multiplies automatically and safely to get the size in bytes, does a basic type safety check by comparing element sizes and unlike memmove(3) it supports NULL pointers iff 0 elements are to be moved. Also add a semantic patch to demonstrate the helper's intended usage. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'rs/free-and-null'Junio C Hamano2017-07-101-9/+1
|\ | | | | | | | | | | | | Code cleanup. * rs/free-and-null: coccinelle: polish FREE_AND_NULL rules
| * coccinelle: polish FREE_AND_NULL rulesrs/free-and-nullRené Scharfe2017-06-291-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two rules for using FREE_AND_NULL in free.cocci, one for pointer types and one for expressions. Both cause coccinelle to remove empty lines and even newline characters between replacements for some reason; consecutive "free(x);/x=NULL;" sequences end up as multiple FREE_AND_NULL calls on the same time. Remove the type rule, as the expression rule already covers it, and rearrange the lines of the latter to place the addition of FREE_AND_NULL between the removals, which causes coccinelle to leave surrounding whitespace untouched. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'xz/send-email-batch-size'Junio C Hamano2017-07-061-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | "git send-email" learned to overcome some SMTP server limitation that does not allow many pieces of e-mails to be sent over a single session. * xz/send-email-batch-size: send-email: --batch-size to work around some SMTP server limit
| * | send-email: --batch-size to work around some SMTP server limitxiaoqiang zhao2017-07-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some email servers (e.g. smtp.163.com) limit the number emails to be sent per session (connection) and this will lead to a faliure when sending many messages. Teach send-email to disconnect after sending a number of messages (configurable via the --batch-size=<num> option), wait for a few seconds (configurable via the --relogin-delay=<seconds> option) and reconnect, to work around such a limit. Also add two configuration variables to give these options the default. Note: We will use this as a band-aid for now, but in the longer term, we should look at and react to the SMTP error code from the server; Xianqiang reports that 450 and 451 are returned by problematic servers. cf. https://public-inbox.org/git/7993e188.d18d.15c3560bcaf.Coremail.zxq_yx_007@163.com/ Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'aw/contrib-subtree-doc-asciidoctor'Junio C Hamano2017-07-061-7/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Makefile rule in contrib/subtree for building documentation learned to honour USE_ASCIIDOCTOR just like the main documentation set does. * aw/contrib-subtree-doc-asciidoctor: subtree: honour USE_ASCIIDOCTOR when set
| * | | subtree: honour USE_ASCIIDOCTOR when setaw/contrib-subtree-doc-asciidoctorA. Wilcox2017-06-271-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defining USE_ASCIIDOCTOR=1 when building Git uses asciidoctor over asciidoc when generating DocBook and man page documentation. However, the contrib/subtree module does not presently honour that flag. This causes a build failure when asciidoc is not present on the build system. Instead, adapt the main Documentation/Makefile logic to use asciidoctor when requested. Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'rs/strbuf-add-real-path' into maintJunio C Hamano2017-03-282-0/+22
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An helper function to make it easier to append the result from real_path() to a strbuf has been added. * rs/strbuf-add-real-path: strbuf: add strbuf_add_real_path() cocci: use ALLOC_ARRAY
* | | | | Spelling fixesvs/typofixesVille Skyttä2017-06-273-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ab/free-and-null'Junio C Hamano2017-06-241-0/+15
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common pattern to free a piece of memory and assign NULL to the pointer that used to point at it has been replaced with a new FREE_AND_NULL() macro. * ab/free-and-null: *.[ch] refactoring: make use of the FREE_AND_NULL() macro coccinelle: make use of the "expression" FREE_AND_NULL() rule coccinelle: add a rule to make "expression" code use FREE_AND_NULL() coccinelle: make use of the "type" FREE_AND_NULL() rule coccinelle: add a rule to make "type" code use FREE_AND_NULL() git-compat-util: add a FREE_AND_NULL() wrapper around free(ptr); ptr = NULL
| * | | | coccinelle: add a rule to make "expression" code use FREE_AND_NULL()Ævar Arnfjörð Bjarmason2017-06-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A follow-up to the existing "type" rule added in an earlier change. This catches some occurrences that are missed by the previous rule. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | coccinelle: add a rule to make "type" code use FREE_AND_NULL()Ævar Arnfjörð Bjarmason2017-06-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jk/diff-highlight-module'Junio C Hamano2017-06-245-19/+82
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'diff-highlight' program (in contrib/) has been restructured for easier reuse by an external project 'diff-so-fancy'. * jk/diff-highlight-module: diff-highlight: split code into module
| * | | | diff-highlight: split code into modulejk/diff-highlight-moduleJeff King2017-06-155-19/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diff-so-fancy project is also written in perl, and most of its users pipe diffs through both diff-highlight and diff-so-fancy. It would be nice if this could be done in a single script. So let's pull most of diff-highlight's code into its own module which can be used by diff-so-fancy. In addition, we'll abstract a few basic items like reading from stdio so that a script using the module can do more processing before or after diff-highlight handles the lines. See the README update for more details. One small downside is that the diff-highlight script must now be built using the Makefile. There are ways around this, but it quickly gets into perl arcana. Let's go with the simple solution. As a bonus, our Makefile now respects the PERL_PATH variable if it is set. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Merge branch 'rf/completion-config-commit' into maintJunio C Hamano2017-06-131-0/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completion update. * rf/completion-config-commit: completion: add completions for git config commit
| * \ \ \ \ Merge branch 'jk/url-insteadof-config' into maintJunio C Hamano2017-06-051-0/+10
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interaction of "url.*.insteadOf" and custom URL scheme's whitelisting is now documented better. * jk/url-insteadof-config: docs/config: mention protocol implications of url.insteadOf
| * \ \ \ \ \ Merge branch 'tg/stash-push-fixup' into maintJunio C Hamano2017-06-041-1/+4
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shell completion script (in contrib/) learned "git stash" has a new "push" subcommand. * tg/stash-push-fixup: completion: add git stash push
* | \ \ \ \ \ \ Merge branch 'rf/completion'Junio C Hamano2017-06-131-1/+28
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completion updates. * rf/completion: completion: add git config credentialCache.ignoreSIGHUP completion: add git config credential completions completion: add git config advice completions completion: add git config am.threeWay completion completion: add git config core completions completion: add git config gc completions
| * | | | | | | | completion: add git config credentialCache.ignoreSIGHUPrf/completionRikard Falkeborn2017-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | completion: add git config credential completionsRikard Falkeborn2017-06-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing completions for git config credential: * credential.helper * credential.useHttpPath * credential.username Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | completion: add git config advice completionsRikard Falkeborn2017-06-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing completions for git config advice: * advice.amWorkDir * advice.pushAlreadyExists * advice.pushFetchFirst * advice.pushNeedsForce * advice.pushNonFFCurrent * advice.pushNonFFMatching * advice.pushUpdateRejected * advice.rmHints * advice.statusUoption Remove completion for git config advice.pushNonFastForward, since it was renamed to pushUpdateRejected in 1184564eac8e. The config still works, but is no longer part of the documentation. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | completion: add git config am.threeWay completionRikard Falkeborn2017-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | completion: add git config core completionsRikard Falkeborn2017-06-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing completions for git config core: * core.checkStat * core.commentChar * core.hideDotFiles * core.hooksPath * core.packedRefsTimeout * core.precomposeUnicode * core.protectHFS * core.protectNTFS * core.splitIndex * core.sshCommand Note that some configs are only used for some platforms (hideDotFiles on Windows and precomposeUnicode on Mac). Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | completion: add git config gc completionsRikard Falkeborn2017-06-021-0/+4
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing completion for git config gc options: * gc.aggressiveDepth * gc.autoDetach * gc.logExpiry * gc.worktreePruneExpire Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jk/url-insteadof-config'Junio C Hamano2017-06-041-0/+10
|\ \ \ \ \ \ \ \ | | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interaction of "url.*.insteadOf" and custom URL scheme's whitelisting is now documented better. * jk/url-insteadof-config: docs/config: mention protocol implications of url.insteadOf
| * | | | | | | docs/config: mention protocol implications of url.insteadOfjk/url-insteadof-configJeff King2017-06-011-0/+10
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a URL rewrite switches the protocol to something nonstandard (like "persistent-https" for "https"), the user may be bitten by the fact that the default protocol restrictions are different between the two. Let's drop a note in insteadOf that points the user in the right direction. It would be nice if we could make this work out of the box, but we can't without knowing the security implications of the user's rewrite. Only the documentation for a particular remote helper can advise one way or the other. Since we do include the persistent-https helper in contrib/ (and since it was the helper in the real-world case that inspired that patch), let's also drop a note there. Suggested-by: Elliott Cable <me@ell.io> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'rf/completion-config-commit'Junio C Hamano2017-06-041-0/+3
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completion update. * rf/completion-config-commit: completion: add completions for git config commit
| * | | | | | completion: add completions for git config commitrf/completion-config-commitRikard Falkeborn2017-05-301-0/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing completions for git config: * commit.cleanup * commit.gpgSign * commit.verbose Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'tg/stash-push-fixup'Junio C Hamano2017-05-291-1/+4
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shell completion script (in contrib/) learned "git stash" has a new "push" subcommand. * tg/stash-push-fixup: completion: add git stash push
| * | | | | completion: add git stash pushtg/stash-push-fixupThomas Gummerer2017-05-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introducing git stash push in f5727e26e4 ("stash: introduce push verb", 2017-02-19), I forgot to add it to the completion code. Add it now. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'js/eol-on-ourselves'Junio C Hamano2017-05-292-0/+2
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure our tests would pass when the sources are checked out with "platform native" line ending convention by default on Windows. Some "text" files out tests use and the test scripts themselves that are meant to be run with /bin/sh, ought to be checked out with eol=LF even on Windows. * js/eol-on-ourselves: t4051: mark supporting files as requiring LF-only line endings Fix the remaining tests that failed with core.autocrlf=true t3901: move supporting files into t/t3901/ completion: mark bash script as LF-only git-new-workdir: mark script as LF-only Fix build with core.autocrlf=true
| * | | | | completion: mark bash script as LF-onlyJohannes Schindelin2017-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change, the completion script does not work, as Bash expects its scripts to have line feeds as end-of-line markers (this is particularly prominent in quoted multi-line strings, where carriage returns would slip into the strings as verbatim characters otherwise). This change is required to let t9902-completion pass when Git's source code is checked out with `core.autocrlf = true`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | git-new-workdir: mark script as LF-onlyJohannes Schindelin2017-05-101-0/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bash does not handle scripts with CR/LF line endings correctly, therefore they *have* to be forced to LF-only line endings. Funnily enough, this fixes t3000-ls-files-others and t1021-rerere-in-workdir when git.git was checked out with core.autocrlf=true, as these test still use git-new-workdir (once `git worktree` is no longer marked as experimental, both scripts probably want to be ported to using that command instead). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ab/clone-no-tags'Junio C Hamano2017-05-161-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git clone" learned the "--no-tags" option not to fetch all tags initially, and also set up the tagopt not to follow any tags in subsequent fetches. * ab/clone-no-tags: tests: rename a test having to do with shallow submodules clone: add a --no-tags option to clone without tags tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"
| * | | | | clone: add a --no-tags option to clone without tagsÆvar Arnfjörð Bjarmason2017-05-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a --no-tags option to clone without fetching any tags. Without this change there's no easy way to clone a repository without also fetching its tags. When supplying --single-branch the primary remote branch will be cloned, but in addition tags will be followed & retrieved. Now --no-tags can be added --single-branch to clone a repository without tags, and which only tracks a single upstream branch. This option works without --single-branch as well, and will do a normal clone but not fetch any tags. Many git commands pay some fixed overhead as a function of the number of references. E.g. creating ~40k tags in linux.git will cause a command like `git log -1 >/dev/null` to run in over a second instead of in a matter of milliseconds, in addition numerous other things will slow down, e.g. "git log <TAB>" with the bash completion will slowly show ~40k references instead of 1. The user might want to avoid all of that overhead to simply use a repository like that to browse the "master" branch, or something like a CI tool might want to keep that one branch up-to-date without caring about any other references. Without this change the only way of accomplishing this was either by manually tweaking the config in a fresh repository: git init git && cat >git/.git/config <<EOF && [remote "origin"] url = git@github.com:git/git.git tagOpt = --no-tags fetch = +refs/heads/master:refs/remotes/origin/master [branch "master"] remote = origin merge = refs/heads/master EOF cd git && git pull Which requires hardcoding the "master" name, which may not be the main --single-branch would have retrieved, or alternatively by setting tagOpt=--no-tags right after cloning & deleting any existing tags: git clone --single-branch git@github.com:git/git.git && cd git && git config remote.origin.tagOpt --no-tags && git tag -l | xargs git tag -d Which of course was also subtly buggy if --branch was pointed at a tag, leaving the user in a detached head: git clone --single-branch --branch v2.12.0 git@github.com:git/git.git && cd git && git config remote.origin.tagOpt --no-tags && git tag -l | xargs git tag -d Now all this complexity becomes the much simpler: git clone --single-branch --no-tags git@github.com:git/git.git Or in the case of cloning a single tag "branch": git clone --single-branch --branch v2.12.0 --no-tags git@github.com:git/git.git Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'sk/status-short-branch-color-config'Junio C Hamano2017-05-161-0/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The colors in which "git status --short --branch" showed the names of the current branch and its remote-tracking branch are now configurable. * sk/status-short-branch-color-config: status: add color config slots for branch info in "--short --branch" status: fix missing newline when comment chars are disabled
| * | | | | status: add color config slots for branch info in "--short --branch"sk/status-short-branch-color-configStephen Kent2017-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add color config slots to be used in the status short-format when displaying local and remote tracking branch information. [jc: rebased on top of Peff's fix to 'git status' and tweaked the test to check both local and remote-tracking branch output] Signed-off-by: Stephen Kent <smkent@smkent.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jk/complete-checkout-sans-dwim-remote'Junio C Hamano2017-05-011-1/+10
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completion for "git checkout <branch>" that auto-creates the branch out of a remote tracking branch can now be disabled, as this completion often gets in the way when completing to checkout an existing local branch that happens to share the same prefix with bunch of remote tracking branches. * jk/complete-checkout-sans-dwim-remote: completion: optionally disable checkout DWIM