Commit graph

7745 commits

Author SHA1 Message Date
Junio C Hamano 1d25dd416f Update draft release notes to 1.8.5
List notable topics that graduated during Jonathan's interim
maintainership.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 12:27:45 -07:00
Junio C Hamano 1668b7d78f Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: Warn about changing default for --prefix in Git v2.0
  Documentation/git-svn: Promote the use of --prefix in docs + examples
  git-svn.txt: elaborate on rev_map files
  git-svn.txt: replace .git with $GIT_DIR
  git-svn.txt: reword description of gc command
  git-svn.txt: fix AsciiDoc formatting error
  git-svn: fix signed commit parsing
2013-10-16 10:45:58 -07:00
Junio C Hamano 9768648144 Merge branch 'maint'
* maint:
  git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY
  clone --branch: refuse to clone if upstream repo is empty
2013-10-15 16:15:00 -07:00
Steffen Prohaska 3991e91063 git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY
git-prune-packed operates on GIT_OBJECT_DIRECTORY, not
GIT_OBJECT_DIR.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 16:01:22 -07:00
Steffen Prohaska 6fb02165a3 git.txt: fix asciidoc syntax of --*-pathspecs
Labeled lists require a double colon.

[jc] I eyeballed the output from

        git grep '[^:]:$' Documentation/\*.txt

     and the patch fixes all breakages of this kind.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 15:47:05 -07:00
Philip Oakley 08f8d5d0c0 doc/cli: make "dot repository" an independent bullet point
The way to spell the current repository with a '.' dot is
independent from how the pathspec allows globs expanded by Git.

Make them two separate bullet items in the enumeration.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 14:58:21 -07:00
Ramsay Jones f737684d34 format-patch doc: Thunderbird wraps lines unless mailnews.wraplength=0
The Thunderbird section of the 'MUA-specific hints' contains three
different approaches to setting up the mail client to leave patch
emails unmolested. The second approach (configuration) has a step
missing when configuring the composition window not to wrap. In
particular, the "mailnews.wraplength" configuration variable needs
to be set to zero. Update the documentation to add the missing
setting.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:20:01 -07:00
brian m. carlson b75a6ca7f3 CodingGuidelines: style for multi-line comments
The style for multi-line comments is often mentioned and should be documented
for clarity.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 12:48:06 -07:00
Jonathan Nieder 110f415ce8 Merge branch 'nv/doc-config-signingkey'
* nv/doc-config-signingkey:
  config doc: user.signingkey is also used for signed commits
2013-10-14 12:45:50 -07:00
Nicolas Vigier f0551693cc config doc: user.signingkey is also used for signed commits
The description of the user.signingkey option only mentioned its use
when creating a signed tag. Make it clear that is is also used when
creating signed commits.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 12:45:22 -07:00
Jonathan Nieder 865156a7cb Merge branch 'rj/doc-formatting-fix'
* rj/doc-formatting-fix:
  howto/revert-a-faulty-merge: fix unescaped '^'s
  howto/setup-git-server-over-http: fix unescaped '^'s
2013-10-14 11:07:50 -07:00
Jonathan Nieder c766e6f429 Merge branch 'po/remote-set-head-usage'
* po/remote-set-head-usage:
  remote set-head -h: add long options to synopsis
  remote doc: document long forms of set-head options
2013-10-14 11:07:29 -07:00
Ramsay Jones 78bef06589 howto/revert-a-faulty-merge: fix unescaped '^'s
Several uses of the '^' operator are being interpreted by asciidoc
as requests to show the following text as a superscript. In order
to fix this problem, use backticks (`) to quote the text of the
affected git command invocations.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 07:25:42 -07:00
Ramsay Jones 6430692135 howto/setup-git-server-over-http: fix unescaped '^'s
The text contains two 'grep' invocations which include the 'start
of line' regular expression character '^'. Asciidoc mis-interprets
this use of '^' as a superscript request. In order to fix this
formatting problem, use backticks (`) to quote the text of the
affected 'grep' command invocations.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 07:23:40 -07:00
Johan Herland f849bb6b3b git-svn: Warn about changing default for --prefix in Git v2.0
In Git v2.0, we will change the default --prefix for init/clone from
none/empty to "origin/" (which causes SVN-tracking branches to be
placed at refs/remotes/origin/* instead of refs/remotes/*).

This patch warns users about the upcoming change, both in the git-svn
manual page, and on stderr when running init/clone in the "multi-mode"
without providing a --prefix.

Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-12 22:30:53 +00:00
Johan Herland 7091a2d0bf Documentation/git-svn: Promote the use of --prefix in docs + examples
Currently, the git-svn defaults to using an empty prefix, which ends
up placing the SVN-tracking refs directly in refs/remotes/*. This
placement runs counter to Git's convention of placing remote-tracking
branches in refs/remotes/$remote/*.

Furthermore, combining git-svn with "regular" Git remotes run the risk
of clobbering refs under refs/remotes (e.g. if you have a git remote
called "tags" with a "v1" branch, it will overlap with the git-svn's
tracking branch for the "v1" tag from Subversion.

Even though the git-svn refs stored in refs/remotes/* are not "proper"
remote-tracking branches (since they are not covered by a proper git
remote's refspec), they clearly represent a similar concept, and would
benefit from following the same convention.

For example, if git-svn tracks Subversion branch "foo" at
refs/remotes/foo, and you create a local branch refs/heads/foo to add
some commits to be pushed back to Subversion (using "git svn dcommit),
then it is clearly unhelpful of Git to throw

  warning: refname 'foo' is ambiguous.

every time you checkout, rebase, or otherwise interact with the branch.

At this time, the user is better off using the --prefix=foo/ (the
trailing slash is important) to git svn init/clone, to cause the
SVN-tracking refs to be placed at refs/remotes/foo/* instead of
refs/remotes/*. This patch updates the documentation to encourage
use of --prefix.

This is also in preparation for changing the default value of --prefix
at some point in the future.

Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-12 22:30:39 +00:00
Keshav Kini 945b9c14ff git-svn.txt: elaborate on rev_map files
The man page for `git svn` describes a situation in which "'git svn'
will not be able to rebuild" your $GIT_DIR/svn/**/.rev_map* files, but
no mention is made of in what circumstances `git svn` *will* be able to
do so, how to get `git svn` to do so, or even what these files are.

This patch adds a FILES section to the man page with a description of
what $GIT_DIR/svn/**/.rev_map* files are and how they are (re)built, and
links to this description from various other parts of the man page.

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:56:12 +00:00
Keshav Kini 6fe7a30aec git-svn.txt: replace .git with $GIT_DIR
As $GIT_DIR may not equal '.git', it's usually more generally correct to
refer to files in $GIT_DIR rather than in .git .

This will also allow me to link some of the occurrences of '.git' in
git-svn.txt to a new reference target inside this file in an upcoming
commit, because in AsciiDoc definitions apparently can't start with
a '.' character.

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:56:05 +00:00
Keshav Kini e618c3960a git-svn.txt: reword description of gc command
It's redundant to say that $GIT_DIR/svn/<refname>/unhandled.log or
$GIT_DIR/svn/<refname>/index is in .git/svn when $GIT_DIR is '.git', and
is wrong when $GIT_DIR is not '.git'

Also, a '/' was missing from the pathname $GIT_DIR/svn/<refname>/index .

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:55:48 +00:00
Keshav Kini 9ebeb3392b git-svn.txt: fix AsciiDoc formatting error
As asterisks are used to indicate bold text in AsciiDoc, shell glob
expressions must be escaped appropriately.

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:55:23 +00:00
John Keeping 0079d6ebd7 Documentation/Makefile: make AsciiDoc dblatex dir configurable
On my system this is in /usr/share/asciidoc/dblatex not
/etc/asciidoc/dblatex.  Extract this portion of the path to a variable
so that is can be set in config.mak.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-03 12:21:19 -07:00
Matthieu Moy 9cd755b2fc RelNotes/1.8.5: direct script writers to "git status --porcelain"
[jn: with wording tweak from Keshav Kini]

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 17:05:02 -07:00
Philip Oakley 159543e831 remote doc: document long forms of set-head options
"git remote set-head" has always supported --add and --delete
as synonyms for the -a and -d option but forgot to document
them.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 16:49:18 -07:00
Jonathan Nieder 8de8e40caa Sync with Git 1.8.4.1 2013-09-26 15:36:57 -07:00
Jonathan Nieder 02a110ad43 Git 1.8.4.1
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26 15:01:41 -07:00
Jonathan Nieder 5636a20070 Merge branch 'bc/submodule-status-ignored'
* bc/submodule-status-ignored:
  Improve documentation concerning the status.submodulesummary setting
  submodule: don't print status output with ignore=all
  submodule: fix confusing variable name
2013-09-24 23:36:08 -07:00
Jonathan Nieder 80f165a58a Merge branch 'cc/replace-with-the-same-type'
* cc/replace-with-the-same-type:
  Doc: 'replace' merge and non-merge commits
  t6050-replace: use some long option names
  replace: allow long option names
  Documentation/replace: add Creating Replacement Objects section
  t6050-replace: add test to clean up all the replace refs
  t6050-replace: test that objects are of the same type
  Documentation/replace: state that objects must be of the same type
  replace: forbid replacing an object with one of a different type
2013-09-24 23:35:24 -07:00
Michael S. Tsirkin ccba805681 doc: don't claim that cherry calls patch-id
The id is already different for binary files.  The hash used is an
implementation detail, so let's just document how diffs are compared.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-24 15:54:48 -07:00
Junio C Hamano 128a96c984 Update draft release notes to 1.8.5 for the fifth batch of topics
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-20 12:42:02 -07:00
Junio C Hamano 7b8315bb59 Merge branch 'jk/upload-pack-keepalive'
When running "fetch -q", a long silence while the sender side
computes the set of objects to send can be mistaken by proxies as
dropped connection.  The server side has been taught to send a small
empty messages to keep the connection alive.

* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation
2013-09-20 12:39:05 -07:00
Junio C Hamano f406140baa Merge branch 'fc/at-head'
Instead of typing four capital letters "HEAD", you can say "@" now,
e.g. "git log @".

* fc/at-head:
  Add new @ shortcut for HEAD
  sha1-name: pass len argument to interpret_branch_name()
2013-09-20 12:38:10 -07:00
Junio C Hamano 005a1de380 Merge branch 'dw/check-ignore-sans-index'
"git check-ignore" follows the same rule as "git add" and "git
status" in that the ignore/exclude mechanism does not take effect
on paths that are already tracked.  With "--no-index" option, it
can be used to diagnose which paths that should have been ignored
have been mistakenly added to the index.

* dw/check-ignore-sans-index:
  check-ignore: Add option to ignore index contents
2013-09-20 12:37:32 -07:00
Junio C Hamano 9a86b89941 Merge branch 'bk/refs-multi-update'
Give "update-refs" a "--stdin" option to read multiple update
requests and perform them in an all-or-none fashion.

* bk/refs-multi-update:
  update-ref: add test cases covering --stdin signature
  update-ref: support multiple simultaneous updates
  refs: add update_refs for multiple simultaneous updates
  refs: add function to repack without multiple refs
  refs: factor delete_ref loose ref step into a helper
  refs: factor update_ref steps into helpers
  refs: report ref type from lock_any_ref_for_update
  reset: rename update_refs to reset_refs
2013-09-20 12:36:12 -07:00
Junio C Hamano 087350398e Merge branch 'nr/git-cd-to-a-directory'
Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.

* nr/git-cd-to-a-directory:
  t0056: "git -C" test updates
  git: run in a directory given with -C option
2013-09-20 12:35:42 -07:00
Junio C Hamano b05fc49adc Merge branch 'jh/checkout-auto-tracking'
Fix a minor regression in v1.8.3.2 and later that made it
impossible to base your local work on anything but a local branch
of the upstream repository you are tracking from.

* jh/checkout-auto-tracking:
  t3200: fix failure on case-insensitive filesystems
  branch.c: Relax unnecessary requirement on upstream's remote ref name
  t3200: Add test demonstrating minor regression in 41c21f2
  Refer to branch.<name>.remote/merge when documenting --track
  t3200: Minor fix when preparing for tracking failure
  t2024: Fix &&-chaining and a couple of typos
2013-09-20 12:31:57 -07:00
Junio C Hamano 6d3e1f2e45 Merge branch 'mm/status-without-comment-char'
"git status" now omits the prefix to make its output a comment in a
commit log editor, which is not necessary for human consumption.

We may want to tighten the output to omit unnecessary trailing blank
lines, but that does not have to be in the scope of this series.

* mm/status-without-comment-char:
  t7508: avoid non-portable sed expression
  status: add missing blank line after list of "other" files
  tests: don't set status.displayCommentPrefix file-wide
  status: disable display of '#' comment prefix by default
  submodule summary: ignore --for-status option
  wt-status: use argv_array API
  builtin/stripspace.c: fix broken indentation
2013-09-20 12:29:01 -07:00
Junio C Hamano 638924fec2 Merge branch 'rh/peeling-tag-to-tag'
Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
"foo" is not a tag.  "git rev-parse --verify v1.0^{tag}" would be a
more convenient way to say "test $(git cat-file -t v1.0) = tag".

* rh/peeling-tag-to-tag:
  peel_onion: do not assume length of x_type globals
  peel_onion(): add support for <rev>^{tag}
2013-09-20 12:27:18 -07:00
Junio C Hamano eeaee045c8 Merge branch 'maint'
* maint:
  Start preparing for 1.8.4.1
2013-09-18 12:08:41 -07:00
Junio C Hamano a0d3f1090d Start preparing for 1.8.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-18 12:08:09 -07:00
Junio C Hamano 587e0a164a Update draft release notes to 1.8.5 for the fourth batch of topics 2013-09-18 11:55:59 -07:00
Junio C Hamano 8d8387116a Update draft release notes to 1.8.5 for the first half of the fourth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-17 11:43:58 -07:00
Junio C Hamano 287c0feeab Merge branch 'ss/doclinks'
When we converted many documents that were traditionally text-only
to be formatted to AsciiDoc, we did not update links that point at
them to refer to the formatted HTML files.

* ss/doclinks:
  Documentation: make AsciiDoc links always point to HTML files
2013-09-17 11:42:54 -07:00
Junio C Hamano 89dde7882f Merge branch 'rh/ishes-doc'
We liberally use "committish" and "commit-ish" (and "treeish" and
"tree-ish"); as these are non-words, let's unify these terms to
their dashed form.  More importantly, clarify the documentation on
object peeling using these terms.

* rh/ishes-doc:
  glossary: fix and clarify the definition of 'ref'
  revisions.txt: fix and clarify <rev>^{<type>}
  glossary: more precise definition of tree-ish (a.k.a. treeish)
  use 'commit-ish' instead of 'committish'
  use 'tree-ish' instead of 'treeish'
  glossary: define commit-ish (a.k.a. committish)
  glossary: mention 'treeish' as an alternative to 'tree-ish'
2013-09-17 11:42:51 -07:00
Junio C Hamano cd8c891b74 Merge branch 'dw/diff-no-index-doc'
When the user types "git diff" outside a working tree, thinking he
is inside one, the current error message that is a single-liner
"usage: git diff --no-index <path> <path>" may not be sufficient to
make him realize the mistake. Add "Not a git repository" to the
error message when we fell into the "--no-index" mode without an
explicit command line option to instruct us to do so.

* dw/diff-no-index-doc:
  diff --no-index: describe in a separate paragraph
  diff --no-index: clarify operation when not inside a repository
2013-09-17 11:42:44 -07:00
Junio C Hamano 8fbb07e3f3 Merge branch 'ta/user-manual'
Update the user's manual to more recent versions of Git.

* ta/user-manual:
  "git prune" is safe
  Remove irrelevant reference from "Tying it all together"
  Remove unnecessary historical note from "Object storage format"
  Improve section "Merging multiple trees"
  Improve section "Manipulating branches"
  Simplify "How to make a commit"
  Fix some typos and improve wording
  Use "git merge" instead of "git pull ."
  Use current output for "git repack"
  Use current "detached HEAD" message
  Call it "Git User Manual" and remove reference to very old Git version
2013-09-17 11:42:41 -07:00
Junio C Hamano 9b4aa47e7d Merge branch 'jx/clean-interactive'
Finishing touches to update the document to adjust to a new option
"git clean" learned recently.

* jx/clean-interactive:
  documentation: clarify notes for clean.requireForce
2013-09-17 11:40:23 -07:00
Philip Oakley b85ecea625 config doc: update dot-repository notes
branch.<name>.remote can be set to '.' (period) as the repository
path (URL) as part of the remote name dwimmery. Tell the reader.

Such relative paths are not 'special'. Correct the branch.<name>.merge
note.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-13 15:30:01 -07:00
Philip Oakley 431260cc8d doc: command line interface (cli) dot-repository dwimmery
The Git cli will accept dot '.' (period) as the relative path
to the current repository. Explain this action.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-13 15:29:59 -07:00
Dave Williams 8231fa6ae1 check-ignore: Add option to ignore index contents
check-ignore currently shows how .gitignore rules would treat untracked
paths. Tracked paths do not generate useful output.  This prevents
debugging of why a path became tracked unexpectedly unless that path is
first removed from the index with `git rm --cached <path>`.

The option --no-index tells the command to bypass the check for the
path being in the index and hence allows tracked paths to be checked
too.

Whilst this behaviour deviates from the characteristics of `git add` and
`git status` its use case is unlikely to cause any user confusion.

Test scripts are augmented to check this option against the standard
ignores to ensure correct behaviour.

Signed-off-by: Dave Williams <dave@opensourcesolutions.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-12 15:40:29 -07:00
Junio C Hamano 89b1b47b0a Update draft release notes to 1.8.5 for the third batch of topics
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-12 14:42:47 -07:00
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