Commit graph

7745 commits

Author SHA1 Message Date
Junio C Hamano d5d0a23dbb Merge branch 'jc/pager-configuration-doc'
It was unclear in the documentation how various configurations and
environment variables determine which pager is eventually used.

* jc/pager-configuration-doc:
  config: rewrite core.pager documentation
2013-09-12 14:41:54 -07:00
Junio C Hamano 7b828a0514 Merge branch 'mm/remote-helpers-doc'
* mm/remote-helpers-doc:
  Documentation/remote-helpers: document common use-case for private ref
2013-09-12 14:41:50 -07:00
Junio C Hamano 8ee9a18300 Merge branch 'mn/doc-pack-heu-remove-dead-pastebin'
* mn/doc-pack-heu-remove-dead-pastebin:
  remove dead pastebin link from pack-heuristics document
2013-09-12 14:41:47 -07:00
Junio C Hamano 07fc8a9944 Merge branch 'mm/fast-import-feature-doc'
* mm/fast-import-feature-doc:
  Documentation/fast-import: clarify summary for `feature` command
2013-09-12 14:41:45 -07:00
Junio C Hamano 100ce1c543 Merge branch 'mm/mediawiki-dumb-push-fix'
* mm/mediawiki-dumb-push-fix:
  git-remote-mediawiki: no need to update private ref in non-dumb push
  git-remote-mediawiki: use no-private-update capability on dumb push
  transport-helper: add no-private-update capability
  git-remote-mediawiki: add test and check Makefile targets
2013-09-12 14:41:41 -07:00
Felipe Contreras 9ba89f484e Add new @ shortcut for HEAD
Typing 'HEAD' is tedious, especially when we can use '@' instead.

The reason for choosing '@' is that it follows naturally from the
ref@op syntax (e.g. HEAD@{u}), except we have no ref, and no
operation, and when we don't have those, it makes sens to assume
'HEAD'.

So now we can use 'git show @~1', and all that goody goodness.

Until now '@' was a valid name, but it conflicts with this idea, so
let's make it invalid. Probably very few people, if any, used this name.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-12 14:39:34 -07:00
Junio C Hamano a194eaddca Update draft release notes to 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-11 15:05:57 -07:00
Junio C Hamano 6026f68652 Merge branch 'sh/pull-rebase-preserve'
"git pull --rebase" always flattened the history; pull.rebase can
now be set to "preserve" to invoke "rebase --preserve-merges".

* sh/pull-rebase-preserve:
  pull: allow pull to preserve merges when rebasing
2013-09-11 14:57:49 -07:00
Junio C Hamano 26776c9737 checkout: update synopsys and documentation on detaching HEAD
In the synopsis, the second form to detach HEAD at the named commit
labelled the argument as '<commit>'.  While this is technically more
correct, because the feature to detach is not limited to the tip of
a named branch, it was found confusing and did not express the fact
that you have to give `--detach` if you are naming the commit you
want to detach HEAD at with a branch name.

Separate this case into two syntactical forms, mimicking the way how
the DESCRIPTION section shows this usage.  Also update the text that
explains the syntax to name the commit to detach HEAD at to clarify.

Suggested-by: Benjamin Bergman <ben@benbergman.ca>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-11 12:32:01 -07:00
Jens Lehmann bb58b696c6 Improve documentation concerning the status.submodulesummary setting
'git status' and 'git commit' can be told to also show the output of "git
submodule summary" by setting the "status.submodulesummary" config option.
But status and commit also honor the "diff.ignoreSubmodules" and the
"submodule.<name>.ignore" settings, which then disable the summary partly
or completely. This - and the fact that the last two settings do not
affect the "git submodule" commands at all - is not well documented.

Extend the documentation in those places where "status.submodulesummary",
"diff.ignoreSubmodules" and "submodule.<name>.ignore" are described to
better explain these dependencies.

Thanks-to: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-11 12:20:41 -07:00
Junio C Hamano bb80ee0997 Update draft release notes to 1.8.5 for the second batch of topics
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 14:51:42 -07:00
Junio C Hamano a0a08d48d0 Merge branch 'jc/url-match'
Allow section.<urlpattern>.var configuration variables to be
treated as a "virtual" section.var given a URL, and use the
mechanism to enhance http.* configuration variables.

This is a reroll of Kyle J. McKay's work.

* jc/url-match:
  builtin/config.c: compilation fix
  config: "git config --get-urlmatch" parses section.<url>.key
  builtin/config: refactor collect_config()
  config: parse http.<url>.<variable> using urlmatch
  config: add generic callback wrapper to parse section.<url>.key
  config: add helper to normalize and match URLs
  http.c: fix parsing of http.sslCertPasswordProtected variable
2013-09-09 14:50:36 -07:00
Junio C Hamano b02f5aeda6 Merge branch 'jl/submodule-mv'
"git mv A B" when moving a submodule A does "the right thing",
inclusing relocating its working tree and adjusting the paths in
the .gitmodules file.

* jl/submodule-mv: (53 commits)
  rm: delete .gitmodules entry of submodules removed from the work tree
  mv: update the path entry in .gitmodules for moved submodules
  submodule.c: add .gitmodules staging helper functions
  mv: move submodules using a gitfile
  mv: move submodules together with their work trees
  rm: do not set a variable twice without intermediate reading.
  t6131 - skip tests if on case-insensitive file system
  parse_pathspec: accept :(icase)path syntax
  pathspec: support :(glob) syntax
  pathspec: make --literal-pathspecs disable pathspec magic
  pathspec: support :(literal) syntax for noglob pathspec
  kill limit_pathspec_to_literal() as it's only used by parse_pathspec()
  parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN
  parse_pathspec: make sure the prefix part is wildcard-free
  rename field "raw" to "_raw" in struct pathspec
  tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
  remove match_pathspec() in favor of match_pathspec_depth()
  remove init_pathspec() in favor of parse_pathspec()
  remove diff_tree_{setup,release}_paths
  convert common_prefix() to use struct pathspec
  ...
2013-09-09 14:36:15 -07:00
Junio C Hamano de9a25354a Merge branch 'es/blame-L-twice'
Teaches "git blame" to take more than one -L ranges.

* es/blame-L-twice:
  line-range: reject -L line numbers less than 1
  t8001/t8002: blame: add tests of -L line numbers less than 1
  line-range: teach -L^:RE to search from start of file
  line-range: teach -L:RE to search from end of previous -L range
  line-range: teach -L^/RE/ to search from start of file
  line-range-format.txt: document -L/RE/ relative search
  log: teach -L/RE/ to search from end of previous -L range
  blame: teach -L/RE/ to search from end of previous -L range
  line-range: teach -L/RE/ to search relative to anchor point
  blame: document multiple -L support
  t8001/t8002: blame: add tests of multiple -L options
  blame: accept multiple -L ranges
  blame: inline one-line function into its lone caller
  range-set: publish API for re-use by git-blame -L
  line-range-format.txt: clarify -L:regex usage form
  git-log.txt: place each -L option variation on its own line
2013-09-09 14:35:11 -07:00
Junio C Hamano 24703ead4b Merge branch 'jk/cat-file-batch-optim'
Rework the reverted change to `cat-file --batch-check`.

* jk/cat-file-batch-optim:
  cat-file: only split on whitespace when %(rest) is used
2013-09-09 14:33:07 -07:00
Junio C Hamano 4301262640 Merge branch 'db/http-savecookies'
* db/http-savecookies:
  t5551: Remove header from curl cookie file
  http: add http.savecookies option to write out HTTP cookies
2013-09-09 14:32:08 -07:00
Junio C Hamano 2233ad4534 Merge branch 'jc/push-cas'
Allow a safer "rewind of the remote tip" push than blind "--force",
by requiring that the overwritten remote ref to be unchanged since
the new history to replace it was prepared.

The machinery is more or less ready.  The "--force" option is again
the big red button to override any safety, thanks to J6t's sanity
(the original round allowed --lockref to defeat --force).

The logic to choose the default implemented here is fragile
(e.g. "git fetch" after seeing a failure will update the
remote-tracking branch and will make the next "push" pass,
defeating the safety pretty easily).  It is suitable only for the
simplest workflows, and it may hurt users more than it helps them.

* jc/push-cas:
  push: teach --force-with-lease to smart-http transport
  send-pack: fix parsing of --force-with-lease option
  t5540/5541: smart-http does not support "--force-with-lease"
  t5533: test "push --force-with-lease"
  push --force-with-lease: tie it all together
  push --force-with-lease: implement logic to populate old_sha1_expect[]
  remote.c: add command line option parser for "--force-with-lease"
  builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN
  cache.h: move remote/connect API out of it
2013-09-09 14:30:29 -07:00
Junio C Hamano 711b276974 Merge branch 'nd/clone-connectivity-shortcut'
* nd/clone-connectivity-shortcut:
  smart http: use the same connectivity check on cloning
2013-09-09 14:30:01 -07:00
Junio C Hamano a5e10f8bc1 Merge branch 'ms/fetch-prune-configuration'
Allow fetch.prune and remote.*.prune configuration variables to be set,
and "git fetch" to behave as if "--prune" is given.

"git fetch" that honors remote.*.prune is fine, but I wonder if we
should somehow make "git push" aware of it as well.  Perhaps
remote.*.prune should not be just a boolean, but a 4-way "none",
"push", "fetch", "both"?

* ms/fetch-prune-configuration:
  fetch: make --prune configurable
2013-09-09 14:27:11 -07:00
Jeff King 115dedd722 upload-pack: bump keepalive default to 5 seconds
There is no reason not to turn on keepalives by default.
They take very little bandwidth, and significantly less than
the progress reporting they are replacing. And in the case
that progress reporting is on, we should never need to send
a keepalive anyway, as we will constantly be showing
progress and resetting the keepalive timer.

We do not necessarily know what the client's idea of a
reasonable timeout is, so let's keep this on the low side of
5 seconds. That is high enough that we will always prefer
our normal 1-second progress reports to sending a keepalive
packet, but low enough that no sane client should consider
the connection hung.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 11:15:17 -07:00
Jeff King 05e95155a1 upload-pack: send keepalive packets during pack computation
When upload-pack has started pack-objects, there may be a quiet
period while pack-objects prepares the pack (i.e., counting objects
and delta compression). Normally we would see (and send to the
client) progress information, but if "--quiet" is in effect,
pack-objects will produce nothing at all until the pack data is
ready. On a large repository, this can take tens of seconds (or even
minutes if the system is loaded or the repository is badly packed).
Clients or intermediate proxies can sometimes give up in this
situation, assuming that the server or connection has hung.

This patch introduces a "keepalive" option; if upload-pack sees no
data from pack-objects for a certain number of seconds, it will send
an empty sideband data packet to let the other side know that we are
still working on it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 11:14:37 -07:00
Johan Herland fef0e991aa Refer to branch.<name>.remote/merge when documenting --track
Make it easier for readers to find the actual config variables that
implement the "upstream" relationship.

Suggested-by: Per Cederqvist <cederp@opera.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 11:03:01 -07:00
Brad King c750ba9519 update-ref: support multiple simultaneous updates
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together.  Use an input format that
supports any update that could be specified via the command-line,
including object names like "branch:path with space".

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 09:54:37 -07:00
Nazri Ramliy 44e1e4d67d git: run in a directory given with -C option
This is similar in spirit to "make -C dir ..." and "tar -C dir ...".

It takes more keypresses to invoke git command in a different
directory without leaving the current directory:

    1. (cd ~/foo && git status)
       git --git-dir=~/foo/.git --work-dir=~/foo status
       GIT_DIR=~/foo/.git GIT_WORK_TREE=~/foo git status
    2. (cd ../..; git grep foo)
    3. for d in d1 d2 d3; do (cd $d && git svn rebase); done

The methods shown above are acceptable for scripting but are too
cumbersome for quick command line invocations.

With this new option, the above can be done with fewer keystrokes:

    1. git -C ~/foo status
    2. git -C ../.. grep foo
    3. for d in d1 d2 d3; do git -C $d svn rebase; done

A new test script is added to verify the behavior of this option with
other path-related options like --git-dir and --work-tree.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 09:33:17 -07:00
Philip Oakley 9074925341 Doc: 'replace' merge and non-merge commits
Merges are often treated as special case objects so tell users that
they are not special here.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 08:16:30 -07:00
Sebastian Schuberth d5ff3b4be5 Documentation: make AsciiDoc links always point to HTML files
AsciiDoc's "link" is supposed to create hyperlinks for HTML output, so
prefer a "link" to point to an HTML file instead of a text file if an HTML
version of the file is being generated. For RelNotes, keep pointing to
text files as no equivalent HTML files are generated.

If appropriate, also update the link description to not contain the linked
file's extension.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-06 14:49:06 -07:00
Matthieu Moy 2556b9962e status: disable display of '#' comment prefix by default
Historically, "git status" needed to prefix each output line with '#' so
that the output could be added as comment to the commit message. This
prefix comment has no real purpose when "git status" is ran from the
command-line, and this may distract users from the real content.

Disable this prefix comment by default, and make it re-activable for
users needing backward compatibility with status.displayCommentPrefix.

Obviously, "git commit" ignores status.displayCommentPrefix and keeps the
comment unconditionnaly when writing to COMMIT_EDITMSG (but not when
writing to stdout for an error message or with --dry-run).

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-06 13:33:18 -07:00
Christian Couder ed0ff80984 replace: allow long option names
It is now standard practice in Git to have both short and long option
names. So let's give a long option name to the git replace options too.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-06 13:32:24 -07:00
Christian Couder b8fcce1e7f Documentation/replace: add Creating Replacement Objects section
There were no hints in the documentation about how to create
replacement objects.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-06 13:29:53 -07:00
Christian Couder 160df71ef5 Documentation/replace: state that objects must be of the same type
A previous patch ensures that both the replaced and the replacement
objects passed to git replace must be of the same type, except if
-f option is used.

While at it state that there is no other restriction on both objects.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-06 13:25:21 -07:00
Junio C Hamano d2dbd399fa Sync with maint
* maint:
  Documentation/git-merge.txt: fix formatting of example block
2013-09-05 14:41:40 -07:00
Junio C Hamano b5699d17c3 Merge branch 'maint-1.8.3' into maint
* maint-1.8.3:
  Documentation/git-merge.txt: fix formatting of example block
2013-09-05 14:24:59 -07:00
Junio C Hamano 69490f3459 Merge branch 'maint-1.8.2' into maint-1.8.3
* maint-1.8.2:
  Documentation/git-merge.txt: fix formatting of example block
2013-09-05 14:24:52 -07:00
Andreas Schwab e45bda876a Documentation/git-merge.txt: fix formatting of example block
You need at least four dashes in a line to have it recognized as listing
block delimiter by asciidoc.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-05 10:50:49 -07:00
Richard Hansen 4b6acde543 glossary: fix and clarify the definition of 'ref'
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:04:01 -07:00
Richard Hansen abdb54a1d2 revisions.txt: fix and clarify <rev>^{<type>}
If possible, <rev> will be dereferenced even if it is not a tag type
(e.g., commit dereferenced to a tree).

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:03:59 -07:00
Richard Hansen 930f302cdb glossary: more precise definition of tree-ish (a.k.a. treeish)
A tree-ish isn't a ref.  Also, mention dereferencing, and that a
commit dereferences to a tree, to support gitrevisions(7) and
rev-parse's error messages.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:03:49 -07:00
Richard Hansen a8a5406ab3 use 'commit-ish' instead of 'committish'
Replace 'committish' in documentation and comments with 'commit-ish'
to match gitglossary(7) and to be consistent with 'tree-ish'.

The only remaining instances of 'committish' are:
  * variable, function, and macro names
  * "(also committish)" in the definition of commit-ish in
    gitglossary[7]

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:03:03 -07:00
Richard Hansen bb8040f9f9 use 'tree-ish' instead of 'treeish'
Replace 'treeish' in documentation and comments with 'tree-ish' to
match gitglossary(7).

The only remaining instances of 'treeish' are:
  * variable, function, and macro names
  * "(also treeish)" in the definition of tree-ish in gitglossary(7)

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:02:56 -07:00
Richard Hansen 406fde17da glossary: define commit-ish (a.k.a. committish)
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:02:35 -07:00
Richard Hansen 36a2a54dbf glossary: mention 'treeish' as an alternative to 'tree-ish'
The documentation contains a mix of the two spellings, so include both
in the glossary so that a search for either will lead to the
definition.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 15:02:25 -07:00
Stephen Haberman 66713ef3b0 pull: allow pull to preserve merges when rebasing
If a user is working on master, and has merged in their feature branch, but now
has to "git pull" because master moved, with pull.rebase their feature branch
will be flattened into master.

This is because "git pull" currently does not know about rebase's preserve
merges flag, which would avoid this behavior, as it would instead replay just
the merge commit of the feature branch onto the new master, and not replay each
individual commit in the feature branch.

Add a --rebase=preserve option, which will pass along --preserve-merges to
rebase.

Also add 'preserve' to the allowed values for the pull.rebase config setting.

Signed-off-by: Stephen Haberman <stephen@exigencecorp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04 12:45:48 -07:00
Junio C Hamano 57e4c1783f Update draft release notes after merging the first batch of topics 2013-09-04 12:41:05 -07:00
Junio C Hamano a86a8b9752 Merge branch 'sb/parseopt-boolean-removal'
Convert most uses of OPT_BOOLEAN/OPTION_BOOLEAN that can use
OPT_BOOL/OPTION_BOOLEAN which have much saner semantics, and turn
remaining ones into OPT_SET_INT, OPT_COUNTUP, etc. as necessary.

* sb/parseopt-boolean-removal:
  revert: use the OPT_CMDMODE for parsing, reducing code
  checkout-index: fix negations of even numbers of -n
  config parsing options: allow one flag multiple times
  hash-object: replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP
  branch, commit, name-rev: ease up boolean conditions
  checkout: remove superfluous local variable
  log, format-patch: parsing uses OPT__QUIET
  Replace deprecated OPT_BOOLEAN by OPT_BOOL
  Remove deprecated OPTION_BOOLEAN for parsing arguments
2013-09-04 12:39:03 -07:00
Junio C Hamano 05584b2a4e Merge branch 'nd/gc-lock-against-each-other'
* nd/gc-lock-against-each-other:
  gc: reject if another gc is running, unless --force is given
2013-09-04 12:35:34 -07:00
Junio C Hamano 0db320d023 Merge branch 'jc/check-x-z'
"git check-ignore -z" applied the NUL termination to both its input
(with --stdin) and its output, but "git check-attr -z" ignored the
option on the output side.

This is potentially a backward incompatible fix.  Let's see if
anybody screams before deciding if we want to do anything to help
existing users (there may be none).

* jc/check-x-z:
  check-attr -z: a single -z should apply to both input and output
  check-ignore -z: a single -z should apply to both input and output
  check-attr: the name of the character is NUL, not NULL
  check-ignore: the name of the character is NUL, not NULL
2013-09-04 12:23:25 -07:00
Richard Hansen 75aa26d34c peel_onion(): add support for <rev>^{tag}
Complete the <rev>^{<type>} family of object descriptors by having
<rev>^{tag} dereference <rev> until a tag object is found (or fail if
unable).

At first glance this may not seem very useful, as commits, trees, and
blobs cannot be peeled to a tag, and a tag would just peel to itself.
However, this can be used to ensure that <rev> names a tag object:

    $ git rev-parse --verify v1.8.4^{tag}
    04f013dc38
    $ git rev-parse --verify master^{tag}
    error: master^{tag}: expected tag type, but the object dereferences to tree type
    fatal: Needed a single revision

Users can already ensure that <rev> is a tag object by checking the
output of 'git cat-file -t <rev>', but:
  * users may expect <rev>^{tag} to exist given that <rev>^{commit},
    <rev>^{tree}, and <rev>^{blob} all exist
  * this syntax is more convenient/natural in some circumstances

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-03 13:09:17 -07:00
Matthieu Moy 597b831afb transport-helper: add no-private-update capability
Since 664059fb (transport-helper: update remote helper namespace,
2013-04-17), a 'push' operation on a remote helper updates the
private ref by default. This is often a good thing, but it can also
be desirable to disable this update to force the next 'pull' to
re-import the pushed revisions.

Allow remote-helpers to disable the automatic update by introducing a new
capability.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-03 11:57:53 -07:00
Junio C Hamano 992c38644a Start the post-1.8.4 cycle
It is tentatively called 1.8.5, but it should be an easy matter of
renaming the release-notes file and RelNotes symlink to later call
it 1.9 near the end of the cycle if we wanted to.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-30 10:16:16 -07:00
Junio C Hamano 36d80208c5 Merge branch 'sp/doc-smart-http'
* sp/doc-smart-http:
  Document the HTTP transport protocols
2013-08-30 10:10:52 -07:00
Junio C Hamano 9bb78de519 Merge branch 'mm/war-on-whatchanged'
* mm/war-on-whatchanged:
  whatchanged: document its historical nature
  core-tutorial: trim the section on Inspecting Changes
2013-08-30 10:08:26 -07:00
Junio C Hamano 482bd22d49 Merge branch 'rt/doc-merge-file-diff3'
* rt/doc-merge-file-diff3:
  Documentation/git-merge-file: document option "--diff3"
2013-08-30 10:08:23 -07:00
Junio C Hamano 04d0eb89e3 Merge branch 'mb/docs-favor-en-us'
Declare that the official grammar & spelling of the source of this
project is en_US, but strongly discourage patches only to "fix"
existing en_UK strings to avoid unnecessary churns.

* mb/docs-favor-en-us:
  Provide some linguistic guidance for the documentation.
2013-08-30 10:08:19 -07:00
Junio C Hamano e30db6dbcf Merge branch 'rj/doc-rev-parse'
* rj/doc-rev-parse:
  rev-parse(1): logically group options
  rev-parse: remove restrictions on some options
2013-08-30 10:08:13 -07:00
Junio C Hamano 97d01f2a88 config: rewrite core.pager documentation
The text mentions core.pager and GIT_PAGER without giving the
overall picture of precedences.  Borrow a better description from
the git-var(1) documentation.

The use of the mechanism to allow system-wide, global and
per-repository configuration files is not limited to this particular
variable.  Remove it to clarify the paragraph.

Rewrite the part that explains how the environment variable LESS is
set to Git's default value, and how to selectively customize it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-29 12:03:08 -07:00
Junio C Hamano 286bc123cd diff --no-index: describe in a separate paragraph
The documentation for "diff-files" mode of "git diff" primarily
talks about how changes in the files in the working tree are shown
relative to the contents previously added to that index, and tucks
explanation on how "--no-index" mode, which works in a quite
different way, may be implicitly used instead.  Instead, add a
separate paragraph to explain what "--no-index" mode does, and also
mention when "--no-index" can be omitted from the command line
(essentially, when it is obvious from the context).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-28 15:17:18 -07:00
Jiang Xin f85f7947c3 documentation: clarify notes for clean.requireForce
Add "-i" (interactive clean option) to clarify the documentation for
"clean.requireForce" config variable.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-28 12:51:46 -07:00
Thomas Ackermann ddeb817f25 "git prune" is safe
"git prune" is safe in case of concurrent accesses to a repository
but using it in such a case is not recommended.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:46 -07:00
Thomas Ackermann 381183fbc6 Remove irrelevant reference from "Tying it all together"
Sorry Jon, but this might not be of any help to new Git users ;)

Acked-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:45 -07:00
Thomas Ackermann e14c86156c Remove unnecessary historical note from "Object storage format"
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:45 -07:00
Thomas Ackermann e8e9964de4 Improve section "Merging multiple trees"
Remove unnecessary quoting.
Simplify description of three-way merge.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:44 -07:00
Thomas Ackermann df47da758e Improve section "Manipulating branches"
Add some missing punctuation.
Simplify description of "git branch -d/-D".

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:44 -07:00
Thomas Ackermann d39765b12e Simplify "How to make a commit"
Combine the two cases for "git add" into one.
Add verb "use" to "git rm" case.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:44 -07:00
Thomas Ackermann ddd4ddef78 Fix some typos and improve wording
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:44 -07:00
Thomas Ackermann a7bdee1122 Use "git merge" instead of "git pull ."
"git pull ." works, but "git merge" is the recommended
way for new users to do things. (The old description
also should have read "The former is actually *not* very
commonly used".)

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:43 -07:00
Thomas Ackermann 3e65ac49e7 Use current output for "git repack"
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:43 -07:00
Thomas Ackermann 95f9be556d Use current "detached HEAD" message
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:42 -07:00
Thomas Ackermann 333d7d37b6 Call it "Git User Manual" and remove reference to very old Git version
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-27 15:14:41 -07:00
Matthieu Moy 3f36eb4305 Documentation/remote-helpers: document common use-case for private ref
The current documentation mentions the private ref namespace, but does
not really explain why it can be useful.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-26 09:31:04 -07:00
Matthieu Moy 87c9a140d2 Documentation/fast-import: clarify summary for feature command
In most cases, "feature <foo>" does not just require that the feature
exists, but also changes the behavior by enabling it.

Cases where the feature is only requested like cat-blob, notes or ls are
clearly documented below.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-25 22:31:07 -07:00
Michal Nazarewicz 4b36374955 remove dead pastebin link from pack-heuristics document
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-23 12:09:31 -07:00
Junio C Hamano e230c568c4 Git 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-23 11:49:46 -07:00
Dale R. Worley b214eddfb2 diff --no-index: clarify operation when not inside a repository
Clarify documentation for "diff --no-index".  State that when not
inside a repository, --no-index is implied and two arguments are
mandatory.

Clarify error message from diff-no-index to inform user that CWD is
not inside a repository and thus two arguments are mandatory.

Signed-off-by: Dale Worley <worley@ariadne.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-22 13:55:28 -07:00
Junio C Hamano 0d8beaa5b7 Typofix draft release notes to 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-21 15:30:04 -07:00
Shawn O. Pearce 4c6fffe2ae Document the HTTP transport protocols
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Revised-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-21 11:37:53 -07:00
Junio C Hamano 4d06473928 Git 1.8.4-rc4
As we had to revert two topics at the last minute, let's have
another (hopefully short) round of rc to make sure the final release
will be sound.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-19 10:34:14 -07:00
Junio C Hamano 2c2b6646c2 Revert "Add new @ shortcut for HEAD"
This reverts commit cdfd94837b, as it
does not just apply to "@" (and forms with modifiers like @{u}
applied to it), but also affects e.g. "refs/heads/@/foo", which it
shouldn't.

The basic idea of giving a short-hand might be good, and the topic
can be retried later, but let's revert to avoid affecting existing
use cases for now for the upcoming release.
2013-08-14 15:04:24 -07:00
Junio C Hamano c1ebd90c83 Revert "git stash: avoid data loss when "git stash save" kills a directory"
This reverts commit a73653130e, as it
has been reported that "ls-files --killed" is too time-consuming in
a deep directory with too many untracked crufts (e.g. $HOME/.git
tracking only a few files).

We'd need to revisit it later but "ls-files --killed" needs to be
optimized before it happens.
2013-08-14 09:53:43 -07:00
Junio C Hamano 52f425e1a9 whatchanged: document its historical nature
Encourage new users to use 'log' instead.  These days, these
commands are unified and just have different defaults.

'git log' only allowed you to view the log messages and no diffs
when it was added in early June 2005.  It was only in early April
2006 that the command learned to take diff options.  Because of
this, power users tended to use 'whatchanged' that already existed
since mid May 2005 and supported diff options.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-13 09:01:54 -07:00
Junio C Hamano 627a8b8dcd core-tutorial: trim the section on Inspecting Changes
Back when the core tutorial was written, `log` and `whatchanged`
were scripted Porcelains.  In the "Inspecting Changes" section that
talks about the plumbing commands in the diff family, it made sense
to use `log` and `whatchanged` as good examples of the use of these
plumbing commands, and because even these scripted Porcelains were
novelty (there wasn't the new end-user tutorial written), it made
some sense to illustrate uses of the `git log` (and `git
whatchanged`) scripted Porcelain commands.

But we no longer have scripted `log` and `whatchanged` to serve as
examples, and this document is not where the end users learn what
`git log` command is about.  Stop at briefly mentioning the
possibility of combining rev-list with diff-tree to build your own
log, and leave the end-user documentation of `log` to the new
tutorial and the user manual.

Also resurrect the last version of `git-log`, `git-whatchanged`, and
`git-show` to serve as examples to contrib/examples/ directory.

While at it, remove 'whatchanged' from a list of sample commands
that are affected by GIT_FLUSH environment variable. This is not
meant to be an exhaustive list but as a list of typical ones, and an
old command that is kept primarily for backward compatibility does
not belong to it.

Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-13 09:01:52 -07:00
Ralf Thielow 67ed84f3e2 Documentation/git-merge-file: document option "--diff3"
The option "--diff3" was added to "git merge-file" in e0af48e
(xdiff-merge: optionally show conflicts in "diff3 -m" style)
but it was never documented in "Documentation/git-merge-file.txt".
Add documentation for this option.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-09 14:19:59 -07:00
Nguyễn Thái Ngọc Duy 64a99eb476 gc: reject if another gc is running, unless --force is given
This may happen when `git gc --auto` is run automatically, then the
user, to avoid wait time, switches to a new terminal, keeps working
and `git gc --auto` is started again because the first gc instance has
not clean up the repository.

This patch tries to avoid multiple gc running, especially in --auto
mode. In the worst case, gc may be delayed 12 hours if a daemon reuses
the pid stored in gc.pid.

kill(pid, 0) support is added to MinGW port so it should work on
Windows too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-09 09:10:05 -07:00
Junio C Hamano 64948ad775 Git 1.8.4-rc2
This is with mostly minor documentation and test updates, nothing
spectacular except for removal of funky lstat(2) emulation on Cygwin.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-08 14:03:21 -07:00
Eric Sunshine 215e76c7ff line-range: teach -L^:RE to search from start of file
The -L:RE option of blame/log searches from the end of the previous -L
range, if any. Add new notation -L^:RE to override this behavior and
search from start of file.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:48:02 -07:00
Eric Sunshine 1ce761a524 line-range: teach -L:RE to search from end of previous -L range
For consistency with -L/RE/, teach -L:RE to search relative to the end
of the previous -L range, if any.

The new behavior invalidates one test in t4211 which assumes that -L:RE
begins searching at start of file. This test will be resurrected in a
follow-up patch which teaches -L:RE how to override the default relative
search behavior.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:47:34 -07:00
Eric Sunshine a6ac5f9864 line-range: teach -L^/RE/ to search from start of file
The -L/RE/ option of blame/log searches from the end of the previous -L
range, if any. Add new notation -L^/RE/ to override this behavior and
search from start of file.

The new ^/RE/ syntax is valid only as the <start> argument of
-L<start>,<end>. The <end> argument, as usual, is relative to <start>.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:47:04 -07:00
Eric Sunshine 0bc2cdd550 line-range-format.txt: document -L/RE/ relative search
Option -L/RE/ of blame/log now searches relative to the previous -L
range, if any. Document this.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:46:28 -07:00
Eric Sunshine 5bd9b79a20 blame: document multiple -L support
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:34:43 -07:00
Eric Sunshine 0ddd47193c line-range-format.txt: clarify -L:regex usage form
blame/log documentation describes -L option as:

  -L<start>,<end>
  -L:<regex>

  <start> and <end> can take one of these forms:

    * number
    * /regex/
    * +offset or -offset
    * :regex

which is incorrect and confusing since :regex is not one of the valid
forms of <start> or <end>; in fact, it must be -L's lone argument.

Clarify by discussing :<regex> at the same indentation level as "<start>
and <end>...":

  -L<start>,<end>
  -L:<regex>

  <start> and <end> can take one of these forms:

    * number
    * /regex/
    * +offset or -offset

  If :<regex> is given in place of <start> and <end> ...

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:26:26 -07:00
Eric Sunshine 1e159833c7 git-log.txt: place each -L option variation on its own line
Standard practice in Git documentation is for each variation of an
option (such as: -p / --porcelain) to be placed on its own line in the
OPTIONS table. The -L option does not follow suit. It cuddles "-L
<start>,<end>:<file>" and "-L :<regex>:<file>", separated by a comma.
This is inconsistent and potentially confusing since the comma
separating them is typeset the same as the comma in "<start>,<end>". Fix
this by placing each variation on its own line.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:25:22 -07:00
Jens Lehmann 95c16418f0 rm: delete .gitmodules entry of submodules removed from the work tree
Currently using "git rm" on a submodule removes the submodule's work tree
from that of the superproject and the gitlink from the index. But the
submodule's section in .gitmodules is left untouched, which is a leftover
of the now removed submodule and might irritate users (as opposed to the
setting in .git/config, this must stay as a reminder that the user showed
interest in this submodule so it will be repopulated later when an older
commit is checked out).

Let "git rm" help the user by not only removing the submodule from the
work tree but by also removing the "submodule.<submodule name>" section
from the .gitmodules file and stage both. This doesn't happen when the
"--cached" option is used, as it would modify the work tree. This also
silently does nothing when no .gitmodules file is found and only issues a
warning when it doesn't have a section for this submodule. This is because
the user might just use plain gitlinks without the .gitmodules file or has
already removed the section by hand before issuing the "git rm" command
(in which case the warning reminds him that rm would have done that for
him). Only when .gitmodules is found and contains merge conflicts the rm
command will fail and tell the user to resolve the conflict before trying
again.

Also extend the man page to inform the user about this new feature. While
at it promote the submodule sub-section to a chapter as it made not much
sense under "REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM".

In t7610 three uses of "git rm submod" had to be replaced with "git rm
--cached submod" because that test expects .gitmodules and the work tree
to stay untouched. Also in t7400 the tests for the remaining settings in
the .gitmodules file had to be changed to assert that these settings are
missing.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:11:00 -07:00
Jens Lehmann 0656781fad mv: update the path entry in .gitmodules for moved submodules
Currently using "git mv" on a submodule moves the submodule's work tree in
that of the superproject. But the submodule's path setting in .gitmodules
is left untouched, which is now inconsistent with the work tree and makes
git commands that rely on the proper path -> name mapping (like status and
diff) behave strangely.

Let "git mv" help here by not only moving the submodule's work tree but
also updating the "submodule.<submodule name>.path" setting from the
.gitmodules file and stage both. This doesn't happen when no .gitmodules
file is found and only issues a warning when it doesn't have a section for
this submodule. This is because the user might just use plain gitlinks
without the .gitmodules file or has already updated the path setting by
hand before issuing the "git mv" command (in which case the warning
reminds him that mv would have done that for him). Only when .gitmodules
is found and contains merge conflicts the mv command will fail and tell
the user to resolve the conflict before trying again.

Also extend the man page to inform the user about this new feature.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06 14:10:35 -07:00
Junio C Hamano d4770964d5 config: "git config --get-urlmatch" parses section.<url>.key
Using the same urlmatch_config_entry() infrastructure, add a new
mode "--get-urlmatch" to the "git config" command, to learn values
for the "virtual" two-level variables customized for the specific
URL.

    git config [--<type>] --get-urlmatch <section>[.<key>] <url>

With <section>.<key> fully specified, the configuration data for
<section>.<urlpattern>.<key> for <urlpattern> that best matches the
given <url> is sought (and if not found, <section>.<key> is used)
and reported.  For example, with this configuration:

    [http]
        sslVerify
    [http "https://weak.example.com"]
        cookieFile = /tmp/cookie.txt
        sslVerify = false

You would get

    $ git config --bool --get-urlmatch http.sslVerify https://good.example.com
    true
    $ git config --bool --get-urlmatch http.sslVerify https://weak.example.com
    false

With only <section> specified, you can get a list of all variables
in the section with their values that apply to the given URL.  E.g

    $ git config --get-urlmatch http https://weak.example.com
    http.cookiefile /tmp/cookie.txt
    http.sslverify false

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 16:02:28 -07:00
Kyle J. McKay 6a56993b2e config: parse http.<url>.<variable> using urlmatch
Use the urlmatch_config_entry() to wrap the underlying
http_options() two-level variable parser in order to set
http.<variable> to the value with the most specific URL in the
configuration.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 16:02:03 -07:00
Junio C Hamano fb56570821 Sync with maint to grab trivial doc fixes
* maint:
  fix typo in documentation of git-svn
  Documentation/rev-list-options: add missing word in --*-parents
  log doc: the argument to --encoding is not optional
2013-08-05 13:00:20 -07:00
Stefan Beller b7df098c6d log, format-patch: parsing uses OPT__QUIET
This patch allows users to use the short form -q on
log and format-patch, which was non possible before.

Also the documentation of format-patch mentions -q now.

The documentation of log doesn't even talk about --quiet, so I'll leave
that for more experienced git contributors. ;)
It doesn't seem to change the default behavior, but in combination
with --stat for example it suppresses the actual stats.
however the only relevant code in log is
	if (quiet)
		rev->diffopt.output_format |= DIFF_FORMAT_NO_OUTPUT;

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 11:32:19 -07:00
Felix Gruber 0bf5ce4ef2 fix typo in documentation of git-svn
Signed-off-by: Felix Gruber <felgru@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 09:39:01 -07:00
Jeff King 97be04077f cat-file: only split on whitespace when %(rest) is used
Commit c334b87b (cat-file: split --batch input lines on whitespace,
2013-07-11) taught `cat-file --batch-check` to split input lines on
the first whitespace, and stash everything after the first token
into the %(rest) output format element.  It claimed:

   Object names cannot contain spaces, so any input with
   spaces would have resulted in a "missing" line.

But that is not correct.  Refs, object sha1s, and various peeling
suffixes cannot contain spaces, but some object names can. In
particular:

  1. Tree paths like "[<tree>]:path with whitespace"

  2. Reflog specifications like "@{2 days ago}"

  3. Commit searches like "rev^{/grep me}" or ":/grep me"

To remain backwards compatible, we cannot split on whitespace by
default, hence we will ship 1.8.4 with the commit reverted.

Resurrect its attempt but in a weaker form; only do the splitting
when "%(rest)" is used in the output format. Since that element did
not exist at all before c334b87, old scripts cannot be affected.

The existence of object names with spaces does mean that you
cannot reliably do:

  echo ":path with space and other data" |
  git cat-file --batch-check="%(objectname) %(rest)"

as it would split the path and feed only ":path" to get_sha1. But
that command is nonsensical. If you wanted to see "and other data"
in "%(rest)", git cannot possibly know where the filename ends and
the "rest" begins.

It might be more robust to have something like "-z" to separate the
input elements. But this patch is still a reasonable step before
having that.  It makes the easy cases easy; people who do not care
about %(rest) do not have to consider it, and the %(rest) code
handles the spaces and newlines of "rev-list --objects" correctly.

Hard cases remain hard but possible (if you might get whitespace in
your input, you do not get to use %(rest) and must split and join
the output yourself using more flexible tools). And most
importantly, it does not preclude us from having different splitting
rules later if a "-z" (or similar) option is added.  So we can make
the hard cases easier later, if we choose to.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 09:30:48 -07:00
Torstein Hegge 5104d21fbd Documentation/rev-list-options: add missing word in --*-parents
A commit has "parent commits" or "parents", not "commits".

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 08:47:06 -07:00
Jonathan Nieder e6604c3537 log doc: the argument to --encoding is not optional
$ git log --encoding
 fatal: Option '--encoding' requires a value
 $ git rev-list --encoding
 fatal: Option '--encoding' requires a value

The argument to --encoding has always been mandatory.  Unfortunately
manpages like git-rev-list(1), git-log(1), and git-show(1) have
described the option's syntax as "--encoding[=<encoding>]" since it
was first documented.  Clarify by removing the extra brackets.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05 08:19:47 -07:00
Junio C Hamano d6cbf2fa7a Merge branch 'rj/cygwin-clarify-use-of-cheating-lstat'
Cygwin port added a "not quite correct but a lot faster and good
enough for many lstat() calls that are only used to see if the
working tree entity matches the index entry" lstat() emulation some
time ago, and it started biting us in places.  This removes it and
uses the standard lstat() that comes with Cygwin.

Recent topic that uses lstat on packed-refs file is broken when
this cheating lstat is used, and this is a simplest fix that is
also the cleanest direction to go in the long run.

* rj/cygwin-clarify-use-of-cheating-lstat:
  cygwin: Remove the Win32 l/stat() implementation
2013-08-02 11:01:01 -07:00
Junio C Hamano c7eb614c5c Merge branch 'jk/cat-file-batch-optim'
* jk/cat-file-batch-optim:
  Revert "cat-file: split --batch input lines on whitespace"
2013-08-02 09:32:48 -07:00
Junio C Hamano 062aeee8aa Revert "cat-file: split --batch input lines on whitespace"
This reverts commit c334b87b30c1464a1ab563fe1fb8de5eaf0e5bac; the
update assumed that people only used the command to read from
"rev-list --objects" output, whose lines begin with a 40-hex object
name followed by a whitespace, but it turns out that scripts feed
random extended SHA-1 expressions (e.g. "HEAD:$pathname") in which
a whitespace has to be kept.
2013-08-02 09:29:30 -07:00
Marc Branchaud 42e0fae98e Provide some linguistic guidance for the documentation.
This will hopefully avoid questions over which spelling and grammar should
be used.  Translators are of course free to create localizations for
specific English dialects.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-01 13:13:52 -07:00
Junio C Hamano d50cb7569c Merge branch 'ob/typofixes'
* ob/typofixes:
  many small typofixes
2013-08-01 12:01:01 -07:00
Junio C Hamano c2980866b7 Merge branch 'jx/clean-interactive'
* jx/clean-interactive:
  git-clean: implement partial matching for selection
  Documentation/git-clean: fix description for range
2013-08-01 11:52:37 -07:00
Junio C Hamano 652d2bfa83 Merge branch 'ds/doc-two-kinds-of-tags'
* ds/doc-two-kinds-of-tags:
  docs/git-tag: explain lightweight versus annotated tags
2013-07-31 12:38:21 -07:00
Junio C Hamano 5ecc4b53f7 Merge branch 'rr/maint-tilde-markup-in-doc'
* rr/maint-tilde-markup-in-doc:
  config doc: quote paths, fixing tilde-interpretation
2013-07-31 12:38:15 -07:00
Jens Lehmann a88c915de9 mv: move submodules using a gitfile
When moving a submodule which uses a gitfile to point to the git directory
stored in .git/modules/<name> of the superproject two changes must be made
to make the submodule work: the .git file and the core.worktree setting
must be adjusted to point from work tree to git directory and back.

Achieve that by remembering which submodule uses a gitfile by storing the
result of read_gitfile() of each submodule. If that is not NULL the new
function connect_work_tree_and_git_dir() is called after renaming the
submodule's work tree which updates the two settings to the new values.

Extend the man page to inform the user about that feature (and while at it
change the description to not talk about a script anymore, as mv is a
builtin for quite some time now).

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-30 13:52:53 -07:00
Dave Borowitz 912b2acf2f http: add http.savecookies option to write out HTTP cookies
HTTP servers may send Set-Cookie headers in a response and expect them
to be set on subsequent requests. By default, libcurl behavior is to
store such cookies in memory and reuse them across requests within a
single session. However, it may also make sense, depending on the
server and the cookies, to store them across sessions. Provide users
an option to enable this behavior, writing cookies out to the same
file specified in http.cookiefile.

Signed-off-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-30 09:19:04 -07:00
Junio C Hamano 35f5eaa2ee Merge branch 'jk/capabilities-doc'
* jk/capabilities-doc:
  document 'allow-tip-sha1-in-want' capability
  document 'quiet' receive-pack capability
  document 'agent' protocol capability
  docs: note that receive-pack knows side-band-64k capability
  docs: fix 'report-status' protocol capability thinko
2013-07-30 09:16:42 -07:00
Ondřej Bílka 98e023dea4 many small typofixes
Signed-off-by: Ondřej Bílka <neleai@seznam.cz>
Reviewed-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-29 12:32:25 -07:00
Daniele Segato 29d55538b7 docs/git-tag: explain lightweight versus annotated tags
Stress the difference between the two with a suggestion on
when the user should use one in place of the other.

Signed-off-by: Daniele Segato <daniele.segato@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-29 08:03:33 -07:00
Ramkumar Ramachandra 5ff0c0e875 config doc: quote paths, fixing tilde-interpretation
The --global section of git-config(1) currently reads like:

  For writing options: write to global /.gitconfig file rather than the
                                       ^
				       start tilde

  repository .git/config, write to $XDG_CONFIG_HOME/git/config file if
  this file exists and the/.gitconfig file doesn’t.
                          ^
			  end tilde

Instead of tilde (~) being interpreted literally, asciidoc subscripts
the text between the two tildes.  To fix this problem, use backticks (`)
to quote all the paths in the file uniformly, just like config.txt does.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-26 08:55:18 -07:00
Nguyễn Thái Ngọc Duy 4acbe91a82 document 'allow-tip-sha1-in-want' capability
See 390eb36 (upload-pack: optionally allow fetching from the tips of
hidden refs - 2013-01-28) for more information.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-26 08:33:38 -07:00
Junio C Hamano c490a60790 Git 1.8.4-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24 19:29:07 -07:00
Junio C Hamano 0def7126fd Merge branch 'ob/typofixes'
* ob/typofixes:
  typofix: in-code comments
  typofix: documentation
  typofix: release notes
2013-07-24 19:23:01 -07:00
Junio C Hamano 677f32c79f Merge branch 'jm/doc-ref-prune'
* jm/doc-ref-prune:
  Documentation: fix git-prune example usage
  Documentation: remove --prune from pack-refs examples
2013-07-24 19:21:15 -07:00
Jiang Xin 309422e033 Documentation/git-clean: fix description for range
The descriptions of "select by numbers" section for interactive
git-clean are borrowed from git-add, and one sentence should be
replaced.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24 19:16:13 -07:00
Jeff King 69fb96037f document 'quiet' receive-pack capability
This was added in c207e34 (fix push --quiet: add 'quiet'
capability to receive-pack, 2012-01-08) but never
documented.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24 15:57:01 -07:00
Jeff King af608260f6 document 'agent' protocol capability
This was added in ff5effd (include agent identifier in
capability string, 2012-08-03), but neither the syntax nor
the semantics were ever documented outside of the commit
message.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24 15:57:01 -07:00
Jeff King 9354b9a4f0 docs: note that receive-pack knows side-band-64k capability
The protocol-capabilities documentation notes that any
capabilities not explicitly mentioned for receive-pack work
only for upload-pack.

Receive-pack has advertised and understood side-band-64k
since 38a81b4 (receive-pack: Wrap status reports inside
side-band-64k, 2010-02-05), but we do not mention it
explicitly. Let's do so.

Note that receive-pack does not understand side-band, which
was obsolete by that point.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24 15:57:01 -07:00
Jeff King 9a621ad085 docs: fix 'report-status' protocol capability thinko
The report-status capability is understood by receive-pack,
not upload-pack.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24 15:57:01 -07:00
Nguyễn Thái Ngọc Duy 9ba380481c smart http: use the same connectivity check on cloning
This is an extension of c6807a4 (clone: open a shortcut for
connectivity check - 2013-05-26) to reduce the cost of connectivity
check at clone time, this time with smart http protocol.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-23 12:18:18 -07:00
Junio C Hamano 28f5d17611 remote.c: add command line option parser for "--force-with-lease"
Update "git push" and "git send-pack" to parse this commnd line
option.

The intended sematics is:

 * "--force-with-lease" alone, without specifying the details, will
   protect _all_ remote refs that are going to be updated by
   requiring their current value to be the same as some reasonable
   default, unless otherwise specified;

 * "--force-with-lease=refname", without specifying the expected
   value, will protect that refname, if it is going to be updated,
   by requiring its current value to be the same as some reasonable
   default.

 * "--force-with-lease=refname:value" will protect that refname, if
   it is going to be updated, by requiring its current value to be
   the same as the specified value; and

 * "--no-force-with-lease" will cancel all the previous --force-with-lease on the
   command line.

For now, "some reasonable default" is tentatively defined as "the
value of the remote-tracking branch we have for the ref of the
remote being updated", and it is an error if we do not have such a
remote-tracking branch.  But this is known to be fragile, its use is
not yet recommended, and hopefully we will find more reasonable
default as we gain experience with this feature.  The manual marks
the feature as experimental unless the expected value is specified
explicitly for this reason.

Because the command line options are parsed _before_ we know which
remote we are pushing to, there needs further processing to the
parsed data after we instantiate the transport object to:

 * expand "refname" given by the user to a full refname to be
   matched with the list of "struct ref" used in match_push_refs()
   and set_ref_status_for_push(); and

 * learning the actual local ref that is the remote-tracking branch
   for the specified remote ref.

Further, some processing need to be deferred until we find the set
of remote refs and match_push_refs() returns in order to find the
ones that need to be checked after explicit ones have been processed
for "--force-with-lease" (no specific details).

These post-processing will be the topic of the next patch.

This option was originally called "cas" (for "compare and swap"),
the name which nobody liked because it was too technical.  The
second attempt called it "lockref" (because it is conceptually like
pushing after taking a lock) but the word "lock" was hated because
it implied that it may reject push by others, which is not the way
this option works.  This round calls it "force-with-lease".  You
assume you took the lease on the ref when you fetched to decide what
the rebased history should be, and you can push back only if the
lease has not been broken.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 22:02:55 -07:00
Ondřej Bílka 17b83d71d5 typofix: documentation
Signed-off-by: Ondřej Bílka <neleai@seznam.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 16:06:48 -07:00
Ondřej Bílka 1114fc0237 typofix: release notes
Signed-off-by: Ondřej Bílka <neleai@seznam.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 16:06:48 -07:00
Junio C Hamano 0bde8c0c1e Git 1.8.3.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7Xg1AAoJELC16IaWr+bLT2cQANXHMbmOLXLqaXf1/HhhcKza
 umI8UaVEBLWyD9dopiygTRTIWD5NLj8DXfEIQ6uADlRIQiZD21wG3m/HD2mfsDEg
 Dzx9AQAz5akOyRjbWTR/LEfgSZq836kkmWXI5gLPTqzAn2pG9PaIrO+9StTvLL1f
 CVPJOOO5ceyby13BNmuUynOLCTBc7+a2lU+Pw3fgQNSnkikjJHeOpvtbz3lbW+0i
 seFOZniqZJKQsOy9u5jvO4yXDiJ/Lnaxu8L+TEWKSxmks5lISTz7vybEpCp8pjHp
 AuUV2+kCHgCG7rm+uTzG0SHmWnviEgGTusTKvk7E8v+gzj6yFO812wHq/awyGgBT
 Voo4v9twflY3LoxVZPEJLRilqU3tuRKp57URlYThg2mjLaR8Jo8M5XOKTumbJjPE
 LaIj3XsADjhl6qZ3wMZnpcVETLwAhjXuSD2LsA2iYSMhtrVGsfvwUiSCfPWA7yZM
 oYK4zrs3QpWv+Ll1txP1B2I1W4LhT5bJV+YScnIr9XJRL+DboZ2ng1iVvbqdMNIv
 sk0ZrVxVi3pD9XthmWDNK8TbIzK151JYTp7fa93VwmjtCjjzIO8QNkGGPhGeWjrS
 0KUI0WsvNLhAoVvWMlHueA/aQFCjUzZyoQn+6WeCZz8MqssKSNnWl9On9BOa1HyW
 qvaD4JPNRscR0mgMkeC7
 =28j+
 -----END PGP SIGNATURE-----

Sync with Git 1.8.3.4
2013-07-22 11:34:25 -07:00
Junio C Hamano 9c559d5b86 Update draft release notes to 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 11:34:10 -07:00
Junio C Hamano 07b83b5d98 Merge branch 'rr/send-email-ssl-verify'
Newer Net::SMTP::SSL module does not want the user programs to use
the default behaviour to let server certificate go without
verification, so by default enable the verification with a
mechanism to turn it off if needed.

* rr/send-email-ssl-verify:
  send-email: be explicit with SSL certificate verification
2013-07-22 11:24:17 -07:00
Junio C Hamano e683889b75 Merge branch 'es/check-mailmap'
A new command to allow scripts to query the mailmap information.

* es/check-mailmap:
  t4203: test check-mailmap command invocation
  builtin: add git-check-mailmap command
2013-07-22 11:24:14 -07:00
Junio C Hamano 988f98f61f Merge branch 'jx/clean-interactive'
Add "interactive" mode to "git clean".

The early part to refactor relative path related helper functions
looked sensible.

* jx/clean-interactive:
  test: run testcases with POSIX absolute paths on Windows
  test: add t7301 for git-clean--interactive
  git-clean: add documentation for interactive git-clean
  git-clean: add ask each interactive action
  git-clean: add select by numbers interactive action
  git-clean: add filter by pattern interactive action
  git-clean: use a git-add-interactive compatible UI
  git-clean: add colors to interactive git-clean
  git-clean: show items of del_list in columns
  git-clean: add support for -i/--interactive
  git-clean: refactor git-clean into two phases
  write_name{_quoted_relative,}(): remove redundant parameters
  quote_path_relative(): remove redundant parameter
  quote.c: substitute path_relative with relative_path
  path.c: refactor relative_path(), not only strip prefix
  test: add test cases for relative_path
2013-07-22 11:24:11 -07:00
Junio C Hamano c714f9fd8a Merge branch 'hv/config-from-blob'
Allow configuration data to be read from in-tree blob objects,
which would help working in a bare repository and submodule
updates.

* hv/config-from-blob:
  do not die when error in config parsing of buf occurs
  teach config --blob option to parse config from database
  config: make parsing stack struct independent from actual data source
  config: drop cf validity check in get_next_char()
  config: factor out config file stack management
2013-07-22 11:24:09 -07:00
Junio C Hamano d0b3fa8fd9 Merge branch 'db/show-ref-head'
The "--head" option to "git show-ref" was only to add "HEAD" to the
list of candidate refs to be filtered by the usual rules
(e.g. "--heads" that only show refs under refs/heads).  Change the
meaning of the option to always show "HEAD" regardless of what
filtering will be applied to any other ref (this is a backward
incompatible change, so I may need to add an entry to the Release
Notes).

* db/show-ref-head:
  show-ref: make --head always show the HEAD ref
2013-07-22 11:23:56 -07:00
Junio C Hamano e9682cc028 Merge branch 'es/blame-L-breakage'
The refactoring made for parsing "-L" option recently to support
"git log -L" seems to have broken "git blame -L X,-5" to show 5
lines leading to X.

* es/blame-L-breakage:
  blame-options.txt: explain that -L <start> and <end> are optional
  blame-options.txt: place each -L option variation on its own line
  t8001/t8002 (blame): add blame -L :funcname tests
  t8001/t8002 (blame): add blame -L tests
  t8001/t8002 (blame): modernize style
  line-range: fix "blame -L X,-N" regression
2013-07-22 11:23:53 -07:00
Junio C Hamano e2ecd252b5 Merge branch 'mm/diff-no-patch-synonym-to-s'
"git show -s" was less discoverable than it should be.

* mm/diff-no-patch-synonym-to-s:
  Documentation/git-log.txt: capitalize section names
  Documentation: move description of -s, --no-patch to diff-options.txt
  Documentation/git-show.txt: include common diff options, like git-log.txt
  diff: allow --patch & cie to override -s/--no-patch
  diff: allow --no-patch as synonym for -s
  t4000-diff-format.sh: modernize style
2013-07-22 11:23:27 -07:00
Junio C Hamano 117eea7eaa Git 1.8.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 11:21:34 -07:00
John Keeping 49c639139c rev-parse(1): logically group options
The options section of the git-rev-parse manual page has grown
organically so that there now does not seem to be much logic behind the
ordering of the options.  It also does not make it clear that certain
options must appear first on the command line.

Address this by reorganising the options into groups with subheadings.
The text of option descriptions does not change.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 10:43:21 -07:00
Ondřej Bílka efe6de6e40 update URL to the marc.info mail archive
The name marc.theaimsgroup.com is no longer active, and has
migrated to marc.info.

Signed-off-by: Ondřej Bílka <neleai@seznam.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 10:11:18 -07:00
Junio C Hamano 805c5a5789 Sync with maint
* maint:
  Update draft release notes to 1.8.3.4
  t9801: git-p4: check ignore files with client spec
2013-07-21 23:03:46 -07:00
Junio C Hamano 31fe4057b1 Update draft release notes to 1.8.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-21 23:03:19 -07:00
Junio C Hamano 281ff456fe Merge branch 'rr/maint-fetch-tag-doc-asterisks' into maint
* rr/maint-fetch-tag-doc-asterisks:
  fetch-options.txt: prevent a wildcard refspec from getting misformatted
2013-07-21 22:51:45 -07:00
Junio C Hamano b6538a0b4e Merge branch 'nk/config-local-doc' into maint
* nk/config-local-doc:
  config: Add description of --local option
2013-07-21 22:51:39 -07:00
Junio C Hamano eac00c508d Merge branch 'kb/diff-blob-blob-doc' into maint
* kb/diff-blob-blob-doc:
  Documentation: Move "git diff <blob> <blob>"
2013-07-21 22:51:37 -07:00
Junio C Hamano 4f9f1f5d56 Merge branch 'mm/merge-in-dirty-worktree-doc' into maint
* mm/merge-in-dirty-worktree-doc:
  Documentation/git-merge.txt: weaken warning about uncommited changes
2013-07-21 22:51:32 -07:00
Junio C Hamano 80f074396d Merge branch 'ph/builtin-srcs-are-in-subdir-these-days' into maint
* ph/builtin-srcs-are-in-subdir-these-days:
  fix "builtin-*" references to be "builtin/*"
2013-07-21 22:51:29 -07:00
Junio C Hamano 8c091d918d Merge branch 'ft/doc-git-transport' into maint
* ft/doc-git-transport:
  documentation: add git:// transport security notice
2013-07-21 22:51:24 -07:00
Junio C Hamano e3d4493031 Sync with maint 2013-07-19 11:15:48 -07:00
Junio C Hamano f893b7420c Start preparing for 1.8.3.4
Hopefully this will be the final maintenance release before we go to
feature freeze for 1.8.4.
2013-07-19 11:15:17 -07:00
Junio C Hamano 871ed7842c Merge branch 'rr/name-rev-stdin-doc' into maint
* rr/name-rev-stdin-doc:
  name-rev doc: rewrite --stdin paragraph
2013-07-19 10:43:08 -07:00