Commit graph

9230 commits

Author SHA1 Message Date
Junio C Hamano 86c95ac5d2 Update release notes to 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 12:43:52 -08:00
Junio C Hamano 56d63d0eab Merge branch 'nd/doc-check-ref-format-typo'
* nd/doc-check-ref-format-typo:
  git-check-ref-format.txt: typo, s/avoids/avoid/
2015-12-10 12:36:15 -08:00
Christian Couder bc49712789 Documentation/git-update-index: add missing opts to synopsis
Split index related options should appear in the 'SYNOPSIS'
section.

These options are already documented in the 'OPTIONS' section.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 12:21:26 -08:00
Lars Schneider 4ae048e67e git-p4: add option to keep empty commits
A changelist that contains only excluded files due to a client spec was
imported as an empty commit. Fix that issue by ignoring these commits.
Add option "git-p4.keepEmptyCommits" to make the previous behavior
available.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Helped-by: Pete Harlan
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 10:45:02 -08:00
Junio C Hamano fa5f2398e5 Sync with 2.6.4 2015-12-08 14:13:52 -08:00
Junio C Hamano bdfc6b364a Git 2.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-08 14:12:45 -08:00
Junio C Hamano 697bd2871c Merge branch 'jk/rebase-no-autostash' into maint
There was no way to defeat a configured rebase.autostash variable
from the command line, as "git rebase --no-autostash" was missing.

* jk/rebase-no-autostash:
  Documentation/git-rebase: fix --no-autostash formatting
  rebase: support --no-autostash
2015-12-08 14:05:01 -08:00
Nguyễn Thái Ngọc Duy 56a8aea0c6 git-check-ref-format.txt: typo, s/avoids/avoid/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-04 13:09:48 -08:00
Stefan Beller e7220c40b1 document submodule sync --recursive
The git-submodule(1) is inconsistent. In the synopsis, it says:

       git submodule [--quiet] sync [--recursive] [--] [<path>...]

The description of the sync does not mention --recursive, and the
description of --recursive says that it is only available for foreach,
update and status.

The option was introduced (82f49f294c, Teach --recursive to submodule
sync, 2012-10-26) a while ago, so let's document it, too.

Reported-by: Per Cederqvist <cederp@opera.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-04 13:08:05 -08:00
Junio C Hamano e5da8655b2 Sync with maint
* maint:
  Prepare for 2.6.4
2015-12-04 11:39:56 -08:00
Junio C Hamano 9a8c740225 Prepare for 2.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-04 11:39:19 -08:00
Junio C Hamano 9ed86a5d4e RelNotes update for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-04 11:31:28 -08:00
Junio C Hamano 3a5b6eeceb Merge branch 'np/credential-cache-sighup'
Workaround for using credential-cache with emacs.

* np/credential-cache-sighup:
  credential-cache: new option to ignore sighup
2015-12-04 11:19:11 -08:00
Junio C Hamano c69d08df96 Merge branch 'jk/send-email-complete-aliases'
Teach send-email to dump mail aliases, so that we can do tab completion
on the command line.

* jk/send-email-complete-aliases:
  completion: add support for completing email aliases
  sendemail: teach git-send-email to dump alias names
2015-12-04 11:19:11 -08:00
Jeff King 40fdcc5357 Merge branch 'maint'
* maint:
  http: treat config options sslCAPath and sslCAInfo as paths
  Documentation/diff: give --word-diff-regex=. example
  filter-branch: deal with object name vs. pathname ambiguity in tree-filter
  check-ignore: correct documentation about output
  git-p4: clean up after p4 submit failure
  git-p4: work with a detached head
  git-p4: add option to system() to return subshell status
  git-p4: add failing test for submit from detached head
  remote-http(s): support SOCKS proxies
  t5813: avoid creating urls that break on cygwin
  Escape Git's exec path in contrib/rerere-train.sh script
  allow hooks to ignore their standard input stream
  rebase-i-exec: Allow space in SHELL_PATH
  Documentation: make environment variable formatting more consistent
2015-12-01 17:32:38 -05:00
Jeff King 35f263545c Merge branch 'dk/check-ignore-docs' into maint
Documentation clarification for "check-ignore" without "--verbose".

* dk/check-ignore-docs:
  check-ignore: correct documentation about output
2015-12-01 17:21:32 -05:00
Jeff King 2cc36407df Merge branch 'mg/doc-word-diff-example' into maint
* mg/doc-word-diff-example:
  Documentation/diff: give --word-diff-regex=. example
2015-12-01 17:21:11 -05:00
Jeff King 2945adcc2d Merge branch 'ar/doc-env-variable-format' into maint
Minor documentation fixup.

* ar/doc-env-variable-format:
  Documentation: make environment variable formatting more consistent
2015-12-01 17:19:33 -05:00
Jeff King 718a9e67b6 Merge branch 'maint'
* maint:
  Documentation/git-update-index: add missing opts to synopsys
2015-11-24 19:04:41 -05:00
Michael J Gruber 2c15c00651 Documentation/diff: give --word-diff-regex=. example
It's just so useful.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-24 18:38:46 -05:00
Dennis Kaarsemaker 219cbf091a check-ignore: correct documentation about output
By default git check-ignore shows only the filenames that will be
ignored, not the pattern that causes their exclusion. Instead of moving
the partial exclude pattern precendence information to the -v option
where it belongs, link to gitignore(5) which describes this more
thoroughly.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-24 17:13:36 -05:00
Christian Couder 5cb2e162d2 Documentation/git-update-index: add missing opts to synopsys
Untracked cache related options should appear in the synopsis.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-24 15:44:40 -05:00
Mike Crowe b33a15b081 push: add recurseSubmodules config option
The --recurse-submodules command line parameter has existed for some
time but it has no config file equivalent.

Following the style of the corresponding parameter for git fetch, let's
invent push.recurseSubmodules to provide a default for this
parameter. This also requires the addition of --recurse-submodules=no to
allow the configuration to be overridden on the command line when
required.

The most straightforward way to implement this appears to be to make
push use code in submodule-config in a similar way to fetch.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:07 -05:00
Noam Postavsky 7f4d4746c1 credential-cache: new option to ignore sighup
Introduce new option "credentialCache.ignoreSIGHUP" which stops
git-credential-cache--daemon from quitting on SIGHUP.  This is useful
when "git push" is started from Emacs, because all child
processes (including the daemon) will receive a SIGHUP when "git push"
exits.

Signed-off-by: Noam Postavsky <npostavs@users.sourceforge.net>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:07 -05:00
Jacob Keller 17b7a83244 sendemail: teach git-send-email to dump alias names
Add an option "--dump-aliases" which changes the default behavior of
git-send-email. This mode will simply read the alias files configured by
sendemail.aliasesfile and sendemail.aliasfiletype and dump a list of all
configured aliases, one per line. The intended use case for this option
is the bash-completion script which will use it to autocomplete aliases
on the options which take addresses.

Add some tests for the new option using various alias file formats.

A possible future extension to the alias dump format could be done by
extending the --dump-aliases to take an optional argument defining the
format to display. This has not been done in this patch as no user of
this information has been identified.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Jeff King dbba85e46b Merge branch 'lf/ref-is-hidden-namespace'
Extend transfer.hideRefs to work better with use of namespaces.

* lf/ref-is-hidden-namespace:
  t5509: add basic tests for hideRefs
  hideRefs: add support for matching full refs
  upload-pack: strip refs before calling ref_is_hidden()
  config.txt: document the semantics of hideRefs with namespaces
2015-11-20 06:56:11 -05:00
Андрей Рыбак 6dedd8001b Documentation: make environment variable formatting more consistent
Documentation/git.txt is not consistent in the way it
stylizes mentions of Environment Variables. Most of them are
enclosed in single quotes, some are enclosed in backticks,
some are not enclosed.

Signed-off-by: Andrey Rybak <rybak.a.v@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-11 16:46:34 -05:00
Junio C Hamano f34be46e47 Eleventh batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-05 15:26:08 -08:00
Junio C Hamano 6a38bd6268 Merge branch 'ea/checkout-progress'
"git checkout" did not follow the usual "--[no-]progress"
convention and implemented only "--quiet" that is essentially
a superset of "--no-progress".  Extend the command to support the
usual "--[no-]progress".

* ea/checkout-progress:
  checkout: add --progress option
2015-11-05 15:24:28 -08:00
Junio C Hamano 2c78628255 Git 2.6.3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWO7oaAAoJELC16IaWr+bLwiQQANoJ1mtinMYQjqq4oNTKTNw1
 YTPCg1CF+QglubvywBSWxujhpdou/Ibup6DSKnGQKiueRbCZZXkxWSgGaTY5mpi1
 N9Y6NaQDlTwdZIF6LYv+5PrKFw2Ad2n3Pcj8EELsw7FnC5EiiBwmagJPzuwsyznK
 07pJ5kySJW3Zq06jiv1xKKiqKhMyYiLtlqFsrevAnOm5WFG2eNPLMneBrcXE4/yV
 u4DCAuXtfjiXq3zLMdjXNgRia64SQ+TukIbBox7hAh+TFaPiE9ZB+dM4dlSJM8DP
 lHQT/WjMJx0AgkUdFsF7HZ/K3I3yoXGR4oe/2QH+Tu6UXCeb+ol1Xm0JhqX7xDXN
 /59DPdGEgZQe5OJ2swh4kqIYlkKLKE6QW+n2ZhUAZzAG08br8h0IE3afap90Lh1M
 E4qS2NpT28ig++FXcfvYUNYHrZzVp/bEsMZjQv9zX76FCsBgjr7FDptm+VyBgL/+
 8PXOcBsBBTdf+hUDO84XV1IWkXi2icOgSRBmY76AYHnCxMguiPnzaKhIG4MnGyyp
 VwkBWm/gjg3dNuO2XhyELdlxw+jO4B6ULrku3oN1NmIpkbEIc4dyVwWRF4dvNq8F
 eFZLbXSAWPDBIB9fLuSbg7YW2f/NFigycQEISzsJrlhXqCTTzkVeBqgJFp9+wFJw
 4Ue+XxrFgz7dW15B4Ggi
 =ohVR
 -----END PGP SIGNATURE-----

Sync with 2.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-05 12:22:34 -08:00
Junio C Hamano af40944bda Git 2.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-05 12:20:34 -08:00
Junio C Hamano b8f5242592 Merge branch 'rs/daemon-plug-child-leak' into maint
"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
  daemon: plug memory leak
  run-command: factor out child_process_clear()
2015-11-05 12:18:17 -08:00
Lukas Fleischer 78a766ab6e hideRefs: add support for matching full refs
In addition to matching stripped refs, one can now add hideRefs
patterns that the full (unstripped) ref is matched against. To
distinguish between stripped and full matches, those new patterns
must be prefixed with a circumflex (^).

This commit also removes support for the undocumented and unintended
hideRefs settings ".have" (suppressing all "have" lines) and
"capabilities^{}" (suppressing the capabilities line).

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-05 11:25:02 -08:00
Lukas Fleischer 92cab492ba config.txt: document the semantics of hideRefs with namespaces
Right now, there is no clear definition of how transfer.hideRefs should
behave when a namespace is set. Explain that hideRefs prefixes match
stripped names in that case. This is how hideRefs patterns are currently
handled in receive-pack.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-05 11:25:00 -08:00
Junio C Hamano 684fea3794 Merge branch 'xf/user-manual-ff' into maint
* xf/user-manual-ff:
  user-manual: fix the description of fast-forward
2015-11-04 14:20:49 -08:00
Junio C Hamano 6c66686e0b Merge branch 'xf/user-manual-markup' into maint
AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup
2015-11-04 14:20:47 -08:00
Junio C Hamano 7974b3fd75 Merge branch 'jc/everyday-markup' into maint
AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text
2015-11-04 14:20:46 -08:00
Junio C Hamano bc1e0481bf Merge branch 'jc/em-dash-in-doc' into maint
AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple
2015-11-04 14:20:45 -08:00
Junio C Hamano 5c15ca0b3c Merge branch 'jk/merge-file-exit-code' into maint
"git merge-file" tried to signal how many conflicts it found, which
obviously would not work well when there are too many of them.

* jk/merge-file-exit-code:
  merge-file: clamp exit code to maximum 127
2015-11-03 15:32:41 -08:00
Junio C Hamano f5f7684596 Merge branch 'jc/usage-stdin' into maint
The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file
2015-11-03 15:32:38 -08:00
Junio C Hamano f89baca1b9 Merge branch 'jk/repository-extension' into maint
Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion
2015-11-03 15:32:25 -08:00
Junio C Hamano c29024e5d1 Tenth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-03 15:18:22 -08:00
Junio C Hamano c3c592ef95 Merge branch 'rs/daemon-plug-child-leak'
"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
  daemon: plug memory leak
  run-command: factor out child_process_clear()
2015-11-03 15:13:12 -08:00
René Scharfe 2d71608ec0 run-command: factor out child_process_clear()
Avoid duplication by moving the code to release allocated memory for
arguments and environment to its own function, child_process_clear().
Export it to provide a counterpart to child_process_init().

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-02 15:01:00 -08:00
Edmundo Carmona Antoranz 870ebdb9c4 checkout: add --progress option
Under normal circumstances, and like other git commands,
git checkout will write progress info to stderr if
attached to a terminal. This option allows progress
to be forced even if not using a terminal. Also,
progress can be skipped if using option --no-progress.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-01 14:08:17 -08:00
Junio C Hamano 2635c2b8bf Ninth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-30 13:17:31 -07:00
Junio C Hamano 54bc41416c Merge branch 'jk/merge-file-exit-code'
"git merge-file" tried to signal how many conflicts it found, which
obviously would not work well when there are too many of them.

* jk/merge-file-exit-code:
  merge-file: clamp exit code to maximum 127
2015-10-30 13:07:08 -07:00
Junio C Hamano 7fd4181c66 Merge branch 'xf/user-manual-ff'
* xf/user-manual-ff:
  user-manual: fix the description of fast-forward
2015-10-30 13:07:05 -07:00
Junio C Hamano 908700c008 Merge branch 'ar/clone-dissociate'
"git clone --dissociate" used to require that "--reference" was
used at the same time, but you can create a new repository that
borrows objects from another without using "--reference", namely
with "clone --local" from a repository that borrows objects from
other repositories.

* ar/clone-dissociate:
  clone: allow "--dissociate" without reference
2015-10-30 13:06:53 -07:00
Junio C Hamano 80980a1d5c Eighth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-29 14:02:40 -07:00
Junio C Hamano 73167677c0 Merge branch 'jc/em-dash-in-doc'
AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple
2015-10-29 13:59:16 -07:00
Junio C Hamano f7a88b6c58 Merge branch 'jc/everyday-markup'
AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text
2015-10-29 13:59:15 -07:00
Junio C Hamano 6abe8f4439 Merge branch 'xf/user-manual-markup'
AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup
2015-10-29 13:59:14 -07:00
Jeff King e34f80278e merge-file: clamp exit code to maximum 127
Git-merge-file is documented to return one of three exit
codes:

  - zero means the merge was successful

  - a negative number means an error occurred

  - a positive number indicates the number of conflicts

Unfortunately, this all gets stuffed into an 8-bit return
code. Which means that if you have 256 conflicts, this wraps
to zero, and the merge appears to succeed (and commits a
blob full of conflict-marker cruft!).

This patch clamps the return value to a maximum of 127,
which we should be able to safely represent everywhere. This
also leaves 128-255 for other values. Shells (and some parts
of git) will typically represent signal death as 128 plus
the signal number. And negative values are typically coerced
to an 8-bit unsigned value (so "return -1" ends up as 255).

Technically negative returns have the same problem (e.g.,
"-256" wraps back to 0), but this is not a problem in
practice, as the only negative value we use is "-1".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-29 12:10:23 -07:00
Junio C Hamano 37023ba381 Seventh batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 16:02:08 -07:00
Junio C Hamano fa46579555 Merge branch 'jk/repository-extension'
Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion
2015-10-26 15:55:25 -07:00
Junio C Hamano 97a9e546a2 Merge branch 'jc/usage-stdin'
The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file
2015-10-26 15:55:17 -07:00
Junio C Hamano a46dcfb840 Merge branch 'mr/worktree-list'
Add the "list" subcommand to "git worktree".

* mr/worktree-list:
  worktree: add 'list' command
  worktree: add details to the worktree struct
  worktree: add a function to get worktree details
  worktree: refactor find_linked_symref function
  worktree: add top-level worktree.c
2015-10-26 15:55:16 -07:00
Xue Fuqiao b2af4829cc user-manual: fix the description of fast-forward
The "Fast-forward merges" section of user-manual.txt incorrectly
says if the current branch is a descendant of the other, Git will
perform a fast-forward merge, but it should the other way around.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:03:44 -07:00
Junio C Hamano 3b19dba703 Documentation: AsciiDoc spells em-dash as double-dashes, not triple
Again, we do not usually process release notes with AsciiDoc, but it
is better to be consistent.

This incidentally reveals breakages left by an ancient 5e00439f
(Documentation: build html for all files in technical and howto,
2012-10-23).  The index-format documentation was originally written
to be read as straight text without formatting and when the commit
forced everything in Documentation/ to go through AsciiDoc, it did
not do any adjustment--hence the double-dashes will be seen in the
resulting text that is rendered as preformatted fixed-width without
converted into em-dashes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 13:02:33 -07:00
Alex Riesen 0181681e92 clone: allow "--dissociate" without reference
The "--reference" option is not the only way to provide a repository
to borrow objects from.  A repository that borrows from another
repository can be cloned with "clone --local" and the resulting
repository will borrow from the same repository, which the user
may want to "--dissociate" from.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 12:13:29 -07:00
Junio C Hamano 77d5f715c2 Documentation: match undefline with the text in old release notes
These are not processed with AsciiDoc, but it is better to be
consistent.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:16:17 -07:00
Junio C Hamano 142d035a02 Documentation: match underline with the text
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:16:12 -07:00
Junio C Hamano f3f38c7d9b Documentation/everyday: match undefline with the text
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:14:44 -07:00
Xue Fuqiao a3e1fa97bc Documentation: fix header markup
Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 09:35:36 -07:00
Junio C Hamano bca92e88e7 Sixth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-20 15:29:50 -07:00
Junio C Hamano ce555f3842 Merge branch 'jc/doc-gc-prune-now' into maint
"git gc" is safe to run anytime only because it has the built-in
grace period to protect young objects.  In order to run with no
grace period, the user must make sure that the repository is
quiescent.

* jc/doc-gc-prune-now:
  Documentation/gc: warn against --prune=<now>
2015-10-20 15:22:40 -07:00
Junio C Hamano 33e8fc8740 usage: do not insist that standard input must come from a file
The synopsys text and the usage string of subcommands that read list
of things from the standard input are often shown like this:

	git gostak [--distim] < <list-of-doshes>

This is problematic in a number of ways:

 * The way to use these commands is more often to feed them the
   output from another command, not feed them from a file.

 * Manual pages outside Git, commands that operate on the data read
   from the standard input, e.g "sort", "grep", "sed", etc., are not
   described with such a "< redirection-from-file" in their synopsys
   text.  Our doing so introduces inconsistency.

 * We do not insist on where the output should go, by saying

	git gostak [--distim] < <list-of-doshes> > <output>

 * As it is our convention to enclose placeholders inside <braket>,
   the redirection operator followed by a placeholder filename
   becomes very hard to read, both in the documentation and in the
   help text.

Let's clean them all up, after making sure that the documentation
clearly describes the modes that take information from the standard
input and what kind of things are expected on the input.

[jc: stole example for fmt-merge-msg from Jonathan]

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 15:27:52 -07:00
Junio C Hamano 0c4dd78434 Git 2.6.2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWIW7HAAoJELC16IaWr+bLrDAP/iyXz6A2ooVM/9/c3XzzZqSk
 njU1C5frBoHHe9Xa/RMTnhVTK8zQLfcjpo2YGuQ+t9rmwKZ045c8EE5o1cx0fc4y
 WFt36rOYirp3m52l95p5EwfRXvHupk9Pk8xsh1j8nuFNKMpDCuhXfY0gLyBlD3Fs
 c8tKzAPgN9wTkZO0RlpKmmVIeI60UTik99fp6Wbc4jovomSH3IK+roEKPXfoqI1m
 l7zrIynDV3POUqLUzTulx9pIjbZpCh+djWOMVPbnoTPR59vZaUScdhyml+iNaLtR
 QGsu8+amzuTz6n/voECKy+v5cyZGWTgsvOcgqP+U+R8wmOjXSy5LANDQ7nq+V0UO
 JZauiUy+KFjeFd7tYq9fRN2XKMkpbDR6ocPLWQ+yJrHXv71ImxG5LpRV9iHbfBdL
 q1jCipsnuvIX0BuOT6EIs7F/dJbvKJlSFXajkokuFmYuIp/nr5zA3dArI9tnkhJ2
 ye8Ck33mR/XeXMXBCLErECFSLRr8QD2TjFipiGa7XT7cIITgVimwRcCJ/86SU9VA
 G9yQ4cdj5exK4/iAG8HpGxN+NwaQvdSD3425Wq4+I0KaGsV6itEXm1WyU1tvqFzj
 HU2hOwiyzCsGG0BX+nmsFa13ALUyqB5saZNrAJjEEJFGmq4MzzEoTXCpOFrTFj/M
 JC9YKCI4Smx4+QtTuzaK
 =ObN4
 -----END PGP SIGNATURE-----

Sync with 2.6.2
2015-10-16 14:45:49 -07:00
Junio C Hamano 906c32b9c3 Fifth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 14:44:00 -07:00
Junio C Hamano d5d1e35ace Merge branch 'jc/doc-gc-prune-now'
"git gc" is safe to run anytime only because it has the built-in
grace period to protect young objects.  In order to run with no
grace period, the user must make sure that the repository is
quiescent.

* jc/doc-gc-prune-now:
  Documentation/gc: warn against --prune=<now>
2015-10-16 14:42:50 -07:00
Junio C Hamano 3c3d3f629a Git 2.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 14:40:05 -07:00
Junio C Hamano 0dd9e571e8 Merge branch 'tk/doc-interpret-trailers-grammo' into maint
* tk/doc-interpret-trailers-grammo:
  Documentation/interpret-trailers: Grammar fix
2015-10-16 14:32:56 -07:00
Junio C Hamano aa8f64dead Merge branch 'jk/asciidoctor-section-heading-markup-fix' into maint
* jk/asciidoctor-section-heading-markup-fix:
  Documentation: fix section header mark-up
2015-10-16 14:32:53 -07:00
Junio C Hamano 22f4b15e88 Merge branch 'nd/ls-remote-does-not-have-u-option' into maint
* nd/ls-remote-does-not-have-u-option:
  ls-remote.txt: delete unsupported option
2015-10-16 14:32:52 -07:00
Junio C Hamano d5fea2418e Merge branch 'dt/log-follow-config' into maint
Description of the "log.follow" configuration variable in "git log"
documentation is now also copied to "git config" documentation.

* dt/log-follow-config:
  log: Update log.follow doc and add to config.txt
2015-10-16 14:32:42 -07:00
Junio C Hamano f4892a3c28 Merge branch 'jk/notes-dwim-doc' into maint
The way how --ref/--notes to specify the notes tree reference are
DWIMmed was not clearly documented.

* jk/notes-dwim-doc:
  notes: correct documentation of DWIMery for notes references
2015-10-16 14:32:40 -07:00
Junio C Hamano be4d6f4c7f Merge branch 'mm/keyid-docs' into maint
Very small number of options take a parameter that is optional
(which is not a great UI element as they can only appear at the end
of the command line).  Add notice to documentation of each and
every one of them.

* mm/keyid-docs:
  Documentation: explain optional arguments better
  Documentation/grep: fix documentation of -O
  Documentation: use 'keyid' consistently, not 'key-id'
2015-10-16 14:32:33 -07:00
Junio C Hamano a838ae9d49 Fourth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-15 15:48:56 -07:00
Junio C Hamano 6ff518f593 Merge branch 'ls/p4-lfs'
Teach "git p4" to send large blobs outside the repository by
talking to Git LFS.

* ls/p4-lfs:
  git-p4: add Git LFS backend for large file system
  git-p4: add support for large file systems
  git-p4: check free space during streaming
  git-p4: add file streaming progress in verbose mode
  git-p4: return an empty list if a list config has no values
  git-p4: add gitConfigInt reader
  git-p4: add optional type specifier to gitConfig reader
2015-10-15 15:43:53 -07:00
Junio C Hamano b80dd559c9 Merge branch 'tk/doc-interpret-trailers-grammo'
* tk/doc-interpret-trailers-grammo:
  Documentation/interpret-trailers: Grammar fix
2015-10-15 15:43:48 -07:00
Junio C Hamano 50337d0f71 Merge branch 'dt/log-follow-config'
Description of the "log.follow" configuration variable in "git log"
documentation is now also copied to "git config" documentation.

* dt/log-follow-config:
  log: Update log.follow doc and add to config.txt
2015-10-15 15:43:46 -07:00
Junio C Hamano 7f11b48521 Merge branch 'kn/for-each-branch'
Update "git branch" that list existing branches, using the
ref-filter API that is shared with "git tag" and "git
for-each-ref".

* kn/for-each-branch:
  branch: add '--points-at' option
  branch.c: use 'ref-filter' APIs
  branch.c: use 'ref-filter' data structures
  branch: drop non-commit error reporting
  branch: move 'current' check down to the presentation layer
  branch: roll show_detached HEAD into regular ref_list
  branch: bump get_head_description() to the top
  branch: refactor width computation
2015-10-15 15:43:38 -07:00
Junio C Hamano b27dacc1a8 Third batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-14 14:31:23 -07:00
Junio C Hamano c35acb632c Merge branch 'nd/ls-remote-does-not-have-u-option'
* nd/ls-remote-does-not-have-u-option:
  ls-remote.txt: delete unsupported option
2015-10-14 14:30:19 -07:00
Junio C Hamano 8e2b4b2942 Merge branch 'jk/asciidoctor-section-heading-markup-fix'
* jk/asciidoctor-section-heading-markup-fix:
  Documentation: fix section header mark-up
2015-10-14 14:30:18 -07:00
Junio C Hamano 262cffe6c9 Merge branch 'jk/notes-dwim-doc'
The way how --ref/--notes to specify the notes tree reference are
DWIMmed was not clearly documented.

* jk/notes-dwim-doc:
  notes: correct documentation of DWIMery for notes references
2015-10-14 14:30:15 -07:00
Junio C Hamano fae1a901ec Documentation/gc: warn against --prune=<now>
"git gc" is safe to run anytime only because it has the built-in
grace period to protect objects that are created by other processes
that are waiting for ref updates to anchor them to the history.  In
order to run with no grace period, the user must make sure that the
repository is quiescent.

Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-14 13:48:39 -07:00
Michael Rappazzo bb9c03b82a worktree: add 'list' command
'git worktree list' iterates through the worktree list, and outputs
details of the worktree including the path to the worktree, the currently
checked out revision and branch, and if the work tree is bare.  There is
also porcelain format option available.

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-08 11:57:14 -07:00
Junio C Hamano f5b6079871 Second batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07 13:38:43 -07:00
Junio C Hamano 98f9556a44 Merge branch 'ls/p4-path-encoding'
"git p4" learned to reencode the pathname it uses to communicate
with the p4 depot with a new option.

* ls/p4-path-encoding:
  git-p4: use replacement character for non UTF-8 characters in paths
  git-p4: improve path encoding verbose output
  git-p4: add config git-p4.pathEncoding
2015-10-07 13:38:19 -07:00
Junio C Hamano 506d8f1b39 Merge branch 'nd/ignore-then-not-ignore'
Allow a later "!/abc/def" to override an earlier "/abc" that
appears in the same .gitignore file to make it easier to express
"everything in /abc directory is ignored, except for ...".

* nd/ignore-then-not-ignore:
  dir.c: don't exclude whole dir prematurely if neg pattern may match
  dir.c: make last_exclude_matching_from_list() run til the end
2015-10-07 13:38:17 -07:00
Tobias Klauser a43eb67e65 Documentation/interpret-trailers: Grammar fix
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07 10:53:34 -07:00
Eric N. Vander Weele fd8d07efda log: Update log.follow doc and add to config.txt
Documentation/config.txt does not include the documentation for
log.follow that is in Documentation/git-log.txt.  This commit adds the
log.follow documentation to config.txt and also updates the wording to
be consistent with the format that is followed by other boolean
configuration variables.

Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
Acked-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07 10:37:48 -07:00
Junio C Hamano 24a00ef646 Start cycle toward 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-05 13:20:21 -07:00
Junio C Hamano 590f6e4235 Sync with 2.6.1 2015-10-05 13:20:08 -07:00
Junio C Hamano e13d854322 Merge branch 'mm/keyid-docs'
Very small number of options take a parameter that is optional
(which is not a great UI element as they can only appear at the end
of the command line).  Add notice to documentation of each and
every one of them.

* mm/keyid-docs:
  Documentation: explain optional arguments better
  Documentation/grep: fix documentation of -O
  Documentation: use 'keyid' consistently, not 'key-id'
2015-10-05 12:30:26 -07:00
Junio C Hamano e437cbd015 Merge branch 'bb/remote-get-url'
"git remote" learned "get-url" subcommand to show the URL for a
given remote name used for fetching and pushing.

* bb/remote-get-url:
  remote: add get-url subcommand
2015-10-05 12:30:25 -07:00
Junio C Hamano 6560584494 Merge branch 'jk/rebase-no-autostash'
There was no way to defeat a configured rebase.autostash variable
from the command line, as "git rebase --no-autostash" was missing.

* jk/rebase-no-autostash:
  Documentation/git-rebase: fix --no-autostash formatting
  rebase: support --no-autostash
2015-10-05 12:30:22 -07:00
Junio C Hamano 8a54523f0f Merge branch 'kn/for-each-tag'
The "ref-filter" code was taught about many parts of what "tag -l"
does and then "tag -l" is being reimplemented in terms of "ref-filter".

* kn/for-each-tag:
  tag.c: implement '--merged' and '--no-merged' options
  tag.c: implement '--format' option
  tag.c: use 'ref-filter' APIs
  tag.c: use 'ref-filter' data structures
  ref-filter: add option to match literal pattern
  ref-filter: add support to sort by version
  ref-filter: add support for %(contents:lines=X)
  ref-filter: add option to filter out tags, branches and remotes
  ref-filter: implement an `align` atom
  ref-filter: introduce match_atom_name()
  ref-filter: introduce handler function for each atom
  utf8: add function to align a string into given strbuf
  ref-filter: introduce ref_formatting_state and ref_formatting_stack
  ref-filter: move `struct atom_value` to ref-filter.c
  strtoul_ui: reject negative values
2015-10-05 12:30:18 -07:00
Junio C Hamano 7b09c459d3 Merge branch 'jk/date-local'
"git log --date=local" used to only show the normal (default)
format in the local timezone.  The command learned to take 'local'
as an instruction to use the local timezone with other formats,
e.g. "git show --date=rfc-local".

* jk/date-local:
  t6300: add tests for "-local" date formats
  t6300: make UTC and local dates different
  date: make "local" orthogonal to date format
  date: check for "local" before anything else
  t6300: add test for "raw" date format
  t6300: introduce test_date() helper
  fast-import: switch crash-report date to iso8601
  Documentation/rev-list: don't list date formats
  Documentation/git-for-each-ref: don't list date formats
  Documentation/config: don't list date formats
  Documentation/blame-options: don't list date formats
2015-10-05 12:30:13 -07:00
Junio C Hamano 297ae7151f Merge branch 'dt/refs-bisection'
Move the refs used during a "git bisect" session to per-worktree
hierarchy refs/worktree/* so that independent bisect sessions can
be done in different worktrees.

* dt/refs-bisection:
  refs: make refs/bisect/* per-worktree
  path: optimize common dir checking
  refs: clean up common_list
2015-10-05 12:30:11 -07:00
Junio C Hamano 5e9a74b480 Merge branch 'nk/stash-show-config'
Users who are too busy to type three extra keystrokes to ask for
"git stash show -p" can now set stash.showPatch configuration
varible to true to always see the actual patch, not just the list
of paths affected with feel for the extent of damage via diffstat.

* nk/stash-show-config:
  stash: allow "stash show" diff output configurable
2015-10-05 12:30:10 -07:00
Junio C Hamano db9789ab4e Merge branch 'jh/quiltimport-explicit-series-file'
"quiltimport" allows to specify the series file by honoring the
$QUILT_SERIES environment and also --series command line option.

* jh/quiltimport-explicit-series-file:
  git-quiltimport: add commandline option --series <file>
2015-10-05 12:30:08 -07:00
Junio C Hamano 22dd6eb31f Merge branch 'ad/bisect-terms'
The use of 'good/bad' in "git bisect" made it confusing to use when
hunting for a state change that is not a regression (e.g. bugfix).
The command learned 'old/new' and then allows the end user to
say e.g. "bisect start --term-old=fast --term=new=slow" to find a
performance regression.

Michael's idea to make 'good/bad' more intelligent does have
certain attractiveness ($gname/272867), and makes some of the work
on this topic a moot point.

* ad/bisect-terms:
  bisect: allow setting any user-specified in 'git bisect start'
  bisect: add 'git bisect terms' to view the current terms
  bisect: add the terms old/new
  bisect: sanity check on terms
2015-10-05 12:30:06 -07:00
Junio C Hamano 9958dd8685 Merge branch 'kn/for-each-tag-branch'
Some features from "git tag -l" and "git branch -l" have been made
available to "git for-each-ref" so that eventually the unified
implementation can be shared across all three, in a follow-up
series or two.

* kn/for-each-tag-branch:
  for-each-ref: add '--contains' option
  ref-filter: implement '--contains' option
  parse-options.h: add macros for '--contains' option
  parse-option: rename parse_opt_with_commit()
  for-each-ref: add '--merged' and '--no-merged' options
  ref-filter: implement '--merged' and '--no-merged' options
  ref-filter: add parse_opt_merge_filter()
  for-each-ref: add '--points-at' option
  ref-filter: implement '--points-at' option
  tag: libify parse_opt_points_at()
  t6302: for-each-ref tests for ref-filter APIs
2015-10-05 12:30:03 -07:00
Lars Schneider a5db4b127b git-p4: add support for large file systems
Perforce repositories can contain large (binary) files. Migrating these
repositories to Git generates very large local clones. External storage
systems such as Git LFS [1], Git Fat [2], Git Media [3], git-annex [4]
try to address this problem.

Add a generic mechanism to detect large files based on extension,
uncompressed size, and/or compressed size.

[1] https://git-lfs.github.com/
[2] https://github.com/jedbrown/git-fat
[3] https://github.com/alebedev/git-media
[4] https://git-annex.branchable.com/

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>

Conflicts:
	Documentation/git-p4.txt
	git-p4.py
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-03 10:21:14 -07:00
Junio C Hamano 22f698cb18 Git 2.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 19:19:34 -07:00
Junio C Hamano 3adc4ec7b9 Sync with v2.5.4 2015-09-28 19:16:54 -07:00
Junio C Hamano 24358560c3 Git 2.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 15:34:28 -07:00
Junio C Hamano 11a458befc Sync with 2.4.10 2015-09-28 15:33:56 -07:00
Junio C Hamano a2558fb8e1 Git 2.4.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 15:30:30 -07:00
Junio C Hamano 6343e2f6f2 Sync with 2.3.10 2015-09-28 15:28:31 -07:00
Junio C Hamano 18b58f707f Git 2.3.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 15:26:52 -07:00
Junio C Hamano be08dee973 Git 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 13:18:19 -07:00
Nguyễn Thái Ngọc Duy 29bc480aa1 ls-remote.txt: delete unsupported option
-u <exec> has never been supported, but it was mentioned since
0a2bb55 (git ls-remote: make usage string match manpage -
2008-11-11). Nobody has complained about it for seven years, it's
probably safe to say nobody cares. So let's remove "-u" in documents
instead of adding code to support it.

While at there, fix --upload-pack syntax too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 11:07:04 -07:00
Blake Burkhart f4113cac0c http: limit redirection to protocol-whitelist
Previously, libcurl would follow redirection to any protocol
it was compiled for support with. This is desirable to allow
redirection from HTTP to HTTPS. However, it would even
successfully allow redirection from HTTP to SFTP, a protocol
that git does not otherwise support at all. Furthermore
git's new protocol-whitelisting could be bypassed by
following a redirect within the remote helper, as it was
only enforced at transport selection time.

This patch limits redirects within libcurl to HTTP, HTTPS,
FTP and FTPS. If there is a protocol-whitelist present, this
list is limited to those also allowed by the whitelist. As
redirection happens from within libcurl, it is impossible
for an HTTP redirect to a protocol implemented within
another remote helper.

When the curl version git was compiled with is too old to
support restrictions on protocol redirection, we warn the
user if GIT_ALLOW_PROTOCOL restrictions were requested. This
is a little inaccurate, as even without that variable in the
environment, we would still restrict SFTP, etc, and we do
not warn in that case. But anything else means we would
literally warn every time git accesses an http remote.

This commit includes a test, but it is not as robust as we
would hope. It redirects an http request to ftp, and checks
that curl complained about the protocol, which means that we
are relying on curl's specific error message to know what
happened. Ideally we would redirect to a working ftp server
and confirm that we can clone without protocol restrictions,
and not with them. But we do not have a portable way of
providing an ftp server, nor any other protocol that curl
supports (https is the closest, but we would have to deal
with certificates).

[jk: added test and version warning]

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-25 15:30:39 -07:00
John Keeping be510e0105 Documentation: fix section header mark-up
Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: John Keeping <john@keeping.me.uk>
[jc: squashed in git-bisect one noticed by Michael J Gruber]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-25 10:47:06 -07:00
Karthik Nayak aa3bc55e40 branch: add '--points-at' option
Add the '--points-at' option provided by 'ref-filter'. The option lets
the user to list only branches which points at the given object.

Add documentation and tests for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-25 08:54:54 -07:00
Karthik Nayak aedcb7dc75 branch.c: use 'ref-filter' APIs
Make 'branch.c' use 'ref-filter' APIs for iterating through refs
sorting. This removes most of the code used in 'branch.c' replacing it
with calls to the 'ref-filter' library.

Make 'branch.c' use the 'filter_refs()' function provided by 'ref-filter'
to filter out tags based on the options set.

We provide a sorting option provided for 'branch.c' by using the
sorting options provided by 'ref-filter'. Also by default, we sort by
'refname'.  Since 'HEAD' is alphabatically before 'refs/...' we end up
with an array consisting of the 'HEAD' ref then the local branches and
finally the remote-tracking branches.

Also remove the 'ignore' variable from ref_array_item as it was
previously used for the '--merged' option and now that is handled by
ref-filter.

Modify some of the tests in t1430 to check the stderr for a warning
regarding the broken ref. This is done as ref-filter throws a warning
for broken refs rather than directly printing them.

Add tests and documentation for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-25 08:54:54 -07:00
Jeff King a5adaced2e transport: add a protocol-whitelist environment variable
If we are cloning an untrusted remote repository into a
sandbox, we may also want to fetch remote submodules in
order to get the complete view as intended by the other
side. However, that opens us up to attacks where a malicious
user gets us to clone something they would not otherwise
have access to (this is not necessarily a problem by itself,
but we may then act on the cloned contents in a way that
exposes them to the attacker).

Ideally such a setup would sandbox git entirely away from
high-value items, but this is not always practical or easy
to set up (e.g., OS network controls may block multiple
protocols, and we would want to enable some but not others).

We can help this case by providing a way to restrict
particular protocols. We use a whitelist in the environment.
This is more annoying to set up than a blacklist, but
defaults to safety if the set of protocols git supports
grows). If no whitelist is specified, we continue to default
to allowing all protocols (this is an "unsafe" default, but
since the minority of users will want this sandboxing
effect, it is the only sensible one).

A note on the tests: ideally these would all be in a single
test file, but the git-daemon and httpd test infrastructure
is an all-or-nothing proposition rather than a test-by-test
prerequisite. By putting them all together, we would be
unable to test the file-local code on machines without
apache.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-23 11:35:48 -07:00
Jacob Keller e14c92e841 notes: correct documentation of DWIMery for notes references
expand_notes_ref is used by --ref from git-notes(1) and --notes from the
git log to find the full refname of a notes reference. Previously the
documentation of these options was not clear about what sorts of
expansions would be performed. Fix the documentation to clearly and
accurately describe the behavior of the expansions.

Add a test for this expansion when using git notes get-ref in order to
prevent future patches from changing this behavior.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-22 15:24:01 -07:00
Nguyễn Thái Ngọc Duy 57534ee77d dir.c: don't exclude whole dir prematurely if neg pattern may match
If there is a pattern "!foo/bar", this patch makes it not exclude "foo"
right away. This gives us a chance to examine "foo" and re-include
"foo/bar".

In order for it to detect that the directory under examination should
not be excluded right away, in other words it is a parent directory of a
negative pattern, the "directory path" of the negative pattern must be
literal. Patterns like "!f?o/bar" can't stop "foo" from being excluded.

Basename matching (i.e. "no slashes in the pattern") or must-be-dir
matching (i.e. "trailing slash in the pattern") does not work well with
this. For example, if we descend in "foo" and are examining "foo/abc",
current code for "foo/" pattern will check if path "foo/abc", not "foo",
is a directory. The same problem with basename matching. These may need
big code reorg to make it work.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 11:06:47 -07:00
Matthieu Moy 2b594bf90d Documentation: explain optional arguments better
Improve the documentation of commands taking optional arguments in two
ways:

* Documents the behavior of '-O' (for grep) and '-S' (for commands
  creating commits) when used without the optional argument.

* Document the syntax of these options.

For the second point, the behavior is documented in gitcli(7), but it is
easy for users to miss, and hard for the same user to understand why e.g.
"git status -u no" does not work.

Document this explicitly in the documentation of each short option having
an optional argument: they are the most error prone since there is no '='
sign between the option and its argument.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 10:48:23 -07:00
Matthieu Moy 318ca61531 Documentation/grep: fix documentation of -O
Since the argument of -O, --open-file-in-pager is optional, it must be
stuck to the command. Reflect this in the documentation.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 10:48:21 -07:00
Matthieu Moy 340f2c5e63 Documentation: use 'keyid' consistently, not 'key-id'
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 10:48:17 -07:00
Junio C Hamano 0e5767991b Update RelNotes to 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 12:33:24 -07:00
Junio C Hamano 4d8002429f Sync with 2.5.3
* maint:
  Git 2.5.3
2015-09-17 12:29:49 -07:00
Junio C Hamano a2654356d4 Merge branch 'po/doc-branch-desc'
The branch descriptions that are set with "git branch --edit-description"
option were used in many places but they weren't clearly documented.

* po/doc-branch-desc:
  doc: show usage of branch description
2015-09-17 12:29:03 -07:00
Junio C Hamano 1c1fee746e Merge branch 'as/config-doc-markup-fix'
* as/config-doc-markup-fix:
  Documentation/config: fix formatting for branch.*.rebase and pull.rebase
2015-09-17 12:29:01 -07:00
Ben Boeckel 96f78d3998 remote: add get-url subcommand
Expanding `insteadOf` is a part of ls-remote --url and there is no way
to expand `pushInsteadOf` as well. Add a get-url subcommand to be able
to query both as well as a way to get all configured urls.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 12:19:57 -07:00
Junio C Hamano ee6ad5f4d5 Git 2.5.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 12:16:17 -07:00
Junio C Hamano d6579d9436 Merge branch 'br/svn-doc-include-paths-config' into maint
* br/svn-doc-include-paths-config:
  git-svn doc: mention "svn-remote.<name>.include-paths"
2015-09-17 12:11:46 -07:00
Karthik Nayak 5242860f54 tag.c: implement '--merged' and '--no-merged' options
Use 'ref-filter' APIs to implement the '--merged' and '--no-merged'
options into 'tag.c'. The '--merged' option lets the user to only list
tags merged into the named commit. The '--no-merged' option lets the
user to only list tags not merged into the named commit.  If no object
is provided it assumes HEAD as the object.

Add documentation and tests for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 10:02:50 -07:00
Karthik Nayak df0947417a tag.c: implement '--format' option
Implement the '--format' option provided by 'ref-filter'.
This lets the user list tags as per desired format similar
to the implementation in 'git for-each-ref'.

Add tests and documentation for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 10:02:49 -07:00
Karthik Nayak b7cc53e92c tag.c: use 'ref-filter' APIs
Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting
and printing of refs. This removes most of the code used in 'tag.c'
replacing it with calls to the 'ref-filter' library.

Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter'
to filter out tags based on the options set.

For printing tags we use 'show_ref_array_item()' function provided by
'ref-filter'.

We improve the sorting option provided by 'tag.c' by using the sorting
options provided by 'ref-filter'. This causes the test 'invalid sort
parameter on command line' in t7004 to fail, as 'ref-filter' throws an
error for all sorting fields which are incorrect. The test is changed
to reflect the same.

Modify documentation for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 10:02:49 -07:00
Karthik Nayak 90c004085c ref-filter: add support to sort by version
Add support to sort by version using the "v:refname" and
"version:refname" option. This is achieved by using the 'versioncmp()'
function as the comparing function for qsort.

This option is included to support sorting by versions in `git tag -l`
which will eventually be ported to use ref-filter APIs.

Add documentation and tests for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 10:02:49 -07:00
Karthik Nayak 1bb38e5a6a ref-filter: add support for %(contents:lines=X)
In 'tag.c' we can print N lines from the annotation of the tag using
the '-n<num>' option. Copy code from 'tag.c' to 'ref-filter' and
modify it to support appending of N lines from the annotation of tags
to the given strbuf.

Implement %(contents:lines=X) where X lines of the given object are
obtained.

While we're at it, remove unused "contents:<suboption>" atoms from
the `valid_atom` array.

Add documentation and test for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 10:02:48 -07:00
Karthik Nayak ce59208293 ref-filter: implement an align atom
Implement an `align` atom which left-, middle-, or right-aligns the
content between %(align:...) and %(end).

The "align:" is followed by `<width>` and `<position>` in any order
separated by a comma, where the `<position>` is either left, right or
middle, default being left and `<width>` is the total length of the
content with alignment. If the contents length is more than the width
then no alignment is performed.  e.g. to align a refname atom to the
middle with a total width of 40 we can do:
--format="%(align:middle,40)%(refname)%(end)".

We introduce an `at_end` function for each element of the stack which
is to be called when the `end` atom is encountered. Using this we
implement end_align_handler() for the `align` atom, this aligns the
final strbuf by calling `strbuf_utf8_align()` from utf8.c.

Ensure that quote formatting is performed on the whole of
%(align:...)...%(end) rather than individual atoms inside. We skip
quote formatting for individual atoms when the current stack element
is handling an %(align:...) atom and perform quote formatting at the
end when we encounter the %(end) atom of the second element of then
stack.

Add documentation and tests for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 10:02:48 -07:00
Junio C Hamano f4d9753a89 Update RelNotes to 2.6 to describe leftover bits since -rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-14 15:00:41 -07:00
Junio C Hamano 45733fa93f Git 2.6-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-14 13:17:56 -07:00
Philip Oakley 561d2b7934 doc: show usage of branch description
The branch description will be included in 'git format-patch
--cover-letter' and in 'git pull-request' emails. It can also
be used in the automatic merge message. Tell the reader.

While here, clarify that the description may be a multi-line
explanation of the purpose of the branch's patch series.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-14 12:50:33 -07:00
Junio C Hamano 4be6af6459 Merge branch 'jk/pack-protocol-doc'
Streamline documentation of the pkt-line protocol.

* jk/pack-protocol-doc:
  pack-protocol: clarify LF-handling in PKT-LINE()
2015-09-14 11:46:59 -07:00
Andreas Schwab d23871079f Documentation/config: fix formatting for branch.*.rebase and pull.rebase
Don't format the second paragraph as a literal block.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-12 18:09:24 -07:00
John Keeping 82e0668cde Documentation/git-rebase: fix --no-autostash formatting
All of the other "--option" and "--no-option" pairs in this file are
formatted as separate options.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-10 17:42:04 -07:00
Junio C Hamano f0bc854623 Sync with 2.5.2 2015-09-09 14:30:35 -07:00
Junio C Hamano 7a2c4af7a8 Release Notes: typofix
Thanks to Andreas Schwab for careful reading.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-09 10:34:35 -07:00
Junio C Hamano 27ea6f85be Git 2.5.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04 10:46:07 -07:00
Junio C Hamano 3d3caf0b78 Sync with 2.4.9 2015-09-04 10:43:23 -07:00
Junio C Hamano 74b6763816 Git 2.4.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04 10:36:14 -07:00