Commit graph

9192 commits

Author SHA1 Message Date
John Keeping d132b32b4e Documentation/git-push: fix placeholder formatting
Format the placeholder as monospace to match other occurrences in this
file and obey CodingGuidelines.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-25 15:21:32 -07:00
Junio C Hamano a0feb1b187 Merge branch 'mm/doc-hooks-linkgit-fix' into maint
* mm/doc-hooks-linkgit-fix:
  Documentation: fix broken linkgit to git-config
2016-03-21 13:32:18 -07:00
Matthieu Moy ad52148a7d Documentation: fix broken linkgit to git-config
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-21 13:31:57 -07:00
Junio C Hamano 937978e0f3 Git 2.7.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-17 11:32:13 -07:00
Junio C Hamano 8e9cc5f3e2 Sync with Git 2.6.6
* maint-2.6:
  Git 2.6.6
  Git 2.5.5
  Git 2.4.11
2016-03-17 11:28:52 -07:00
Junio C Hamano e46579643d Git 2.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-17 11:26:41 -07:00
Junio C Hamano ce4d4e763c Merge branch 'maint-2.5' into maint-2.6
* maint-2.5:
  Git 2.5.5
  Git 2.4.11
  list-objects: pass full pathname to callbacks
  list-objects: drop name_path entirely
  list-objects: convert name_path to a strbuf
  show_object_with_name: simplify by using path_name()
  http-push: stop using name_path
  tree-diff: catch integer overflow in combine_diff_path allocation
  add helpers for detecting size_t overflow
2016-03-17 11:26:18 -07:00
Junio C Hamano e568e563ad Git 2.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-17 11:24:59 -07:00
Junio C Hamano c638f3e4d5 Merge branch 'maint-2.4' into maint-2.5
* maint-2.4:
  Git 2.4.11
  list-objects: pass full pathname to callbacks
  list-objects: drop name_path entirely
  list-objects: convert name_path to a strbuf
  show_object_with_name: simplify by using path_name()
  http-push: stop using name_path
  tree-diff: catch integer overflow in combine_diff_path allocation
  add helpers for detecting size_t overflow
2016-03-17 11:24:14 -07:00
Junio C Hamano 765428699a Git 2.4.11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-17 11:23:05 -07:00
Junio C Hamano 594730e980 Git 2.7.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-10 11:14:08 -08:00
Junio C Hamano d4e7b9bcb0 Merge branch 'mm/push-simple-doc' into maint
The documentation did not clearly state that the 'simple' mode is
now the default for "git push" when push.default configuration is
not set.

* mm/push-simple-doc:
  Documentation/git-push: document that 'simple' is the default
2016-03-10 11:13:44 -08:00
Junio C Hamano b7a6ec609f Merge branch 'jk/tighten-alloc' into maint
* jk/tighten-alloc: (23 commits)
  compat/mingw: brown paper bag fix for 50a6c8e
  ewah: convert to REALLOC_ARRAY, etc
  convert ewah/bitmap code to use xmalloc
  diff_populate_gitlink: use a strbuf
  transport_anonymize_url: use xstrfmt
  git-compat-util: drop mempcpy compat code
  sequencer: simplify memory allocation of get_message
  test-path-utils: fix normalize_path_copy output buffer size
  fetch-pack: simplify add_sought_entry
  fast-import: simplify allocation in start_packfile
  write_untracked_extension: use FLEX_ALLOC helper
  prepare_{git,shell}_cmd: use argv_array
  use st_add and st_mult for allocation size computation
  convert trivial cases to FLEX_ARRAY macros
  use xmallocz to avoid size arithmetic
  convert trivial cases to ALLOC_ARRAY
  convert manual allocations to argv_array
  argv-array: add detach function
  add helpers for allocating flex-array structs
  harden REALLOC_ARRAY and xcalloc against size_t overflow
  ...
2016-03-10 11:13:43 -08:00
Matthieu Moy f6b1fb372e Documentation/git-push: document that 'simple' is the default
The default behavior is well documented already in git-config(1), but
git-push(1) itself did not mention it at all. For users willing to learn
how "git push" works but not how to configure it, this makes the
documentation cumbersome to read.

Make the git-push(1) page self-contained by adding a short summary of
what 'push.default=simple' does, early in the page.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-23 13:35:10 -08:00
Jeff King b992657ed0 argv-array: add detach function
The usual pattern for an argv array is to initialize it,
push in some strings, and then clear it when done. Very
occasionally, though, we must do other exotic things with
the memory, like freeing the list but keeping the strings.
Let's provide a detach function so that callers can make use
of our API to build up the array, and then take ownership of
it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-22 14:50:32 -08:00
Junio C Hamano 326e5bc91e Git 2.7.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-22 13:12:56 -08:00
Junio C Hamano 924459c516 Merge branch 'mm/clean-doc-fix' into maint
The documentation for "git clean" has been corrected; it mentioned
that .git/modules/* are removed by giving two "-f", which has never
been the case.

* mm/clean-doc-fix:
  Documentation/git-clean.txt: don't mention deletion of .git/modules/*
2016-02-22 13:10:20 -08:00
Junio C Hamano 8a71d90b7e Start preparing for 2.7.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-17 10:05:44 -08:00
Junio C Hamano 88221d92cb Merge branch 'nd/do-not-move-worktree-manually' into maint
"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.

* nd/do-not-move-worktree-manually:
  worktree: stop supporting moving worktrees manually
  worktree.c: fix indentation
2016-02-17 10:03:40 -08:00
Matt McCutchen 31e3c2d7f8 Documentation/git-clean.txt: don't mention deletion of .git/modules/*
The latter half of this sentence, the removal of the submodules, was
never done with (or without) double -f back when it was written, and
we still do not do so.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-09 10:07:34 -08:00
Junio C Hamano a08595f761 Git 2.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-05 14:54:56 -08:00
Junio C Hamano 5276be848b Merge branch 'lv/add-doc-working-tree' into maint
* lv/add-doc-working-tree:
  git-add doc: do not say working directory when you mean working tree
2016-02-05 14:54:23 -08:00
Junio C Hamano 2db7d79be9 Merge branch 'ss/clone-depth-single-doc' into maint
Documentation for "git fetch --depth" has been updated for clarity.

* ss/clone-depth-single-doc:
  docs: clarify that --depth for git-fetch works with newly initialized repos
  docs: say "commits" in the --depth option wording for git-clone
  docs: clarify that passing --depth to git-clone implies --single-branch
2016-02-05 14:54:22 -08:00
Junio C Hamano 01517bd26f Merge branch 'ew/for-each-ref-doc' into maint
* ew/for-each-ref-doc:
  for-each-ref: document `creatordate` and `creator` fields
2016-02-05 14:54:20 -08:00
Junio C Hamano 353f685572 Merge branch 'ss/user-manual' into maint
Drop a few old "todo" items by deciding that the change one of them
suggests is not such a good idea, and doing the change the other
one suggested to do.

* ss/user-manual:
  user-manual: add addition gitweb information
  user-manual: add section documenting shallow clones
  glossary: define the term shallow clone
  user-manual: remove temporary branch entry from todo list
2016-02-05 14:54:19 -08:00
Junio C Hamano 88ec75dba4 Merge branch 'jk/list-tag-2.7-regression' into maint
"git tag" started listing a tag "foo" as "tags/foo" when a branch
named "foo" exists in the same repository; remove this unnecessary
disambiguation, which is a regression introduced in v2.7.0.

* jk/list-tag-2.7-regression:
  tag: do not show ambiguous tag names as "tags/foo"
  t6300: use test_atom for some un-modern tests
2016-02-05 14:54:15 -08:00
Junio C Hamano 9496acc144 Merge branch 'nd/exclusion-regression-fix' into maint
The ignore mechanism saw a few regressions around untracked file
listing and sparse checkout selection areas in 2.7.0; the change
that is responsible for the regression has been reverted.

* nd/exclusion-regression-fix:
  Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
2016-02-05 14:54:11 -08:00
Junio C Hamano 7aae9ba661 Merge branch 'dw/signoff-doc' into maint
The documentation has been updated to hint the connection between
the '--signoff' option and DCO.

* dw/signoff-doc:
  Expand documentation describing --signoff
2016-02-05 14:54:09 -08:00
Jeff King 0571979bd6 tag: do not show ambiguous tag names as "tags/foo"
Since b7cc53e9 (tag.c: use 'ref-filter' APIs, 2015-07-11),
git-tag has started showing tags with ambiguous names (i.e.,
when both "heads/foo" and "tags/foo" exists) as "tags/foo"
instead of just "foo". This is both:

  - pointless; the output of "git tag" includes only
    refs/tags, so we know that "foo" means the one in
    "refs/tags".

and

  - ambiguous; in the original output, we know that the line
    "foo" means that "refs/tags/foo" exists. In the new
    output, it is unclear whether we mean "refs/tags/foo" or
    "refs/tags/tags/foo".

The reason this happens is that commit b7cc53e9 switched
git-tag to use ref-filter's "%(refname:short)" output
formatting, which was adapted from for-each-ref. This more
general code does not know that we care only about tags, and
uses shorten_unambiguous_ref to get the short-name. We need
to tell it that we care only about "refs/tags/", and it
should shorten with respect to that value.

In theory, the ref-filter code could figure this out by us
passing FILTER_REFS_TAGS. But there are two complications
there:

  1. The handling of refname:short is deep in formatting
     code that does not even have our ref_filter struct, let
     alone the arguments to the filter_ref struct.

  2. In git v2.7.0, we expose the formatting language to the
     user. If we follow this path, it will mean that
     "%(refname:short)" behaves differently for "tag" versus
     "for-each-ref" (including "for-each-ref refs/tags/"),
     which can lead to confusion.

Instead, let's add a new modifier to the formatting
language, "strip", to remove a specific set of prefix
components. This fixes "git tag", and lets users invoke the
same behavior from their own custom formats (for "tag" or
"for-each-ref") while leaving ":short" with its same
consistent meaning in all places.

We introduce a test in t7004 for "git tag", which fails
without this patch. We also add a similar test in t3203 for
"git branch", which does not actually fail. But since it is
likely that "branch" will eventually use the same formatting
code, the test helps defend against future regressions.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-26 13:34:10 -08:00
Nguyễn Thái Ngọc Duy 618244e160 worktree: stop supporting moving worktrees manually
The current update_linked_gitdir() has a bug that can create "gitdir"
file in non-multi-worktree setup. Worse, sometimes it can write relative
path to "gitdir" file, which will not work (e.g. "git worktree list"
will display the worktree's location incorrectly)

Instead of fixing this, we step back a bit. The original design was
probably not well thought out. For now, if the user manually moves a
worktree, they have to fix up "gitdir" file manually or the worktree
will get pruned.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-22 14:28:42 -08:00
Lars Vogel bd02e97f68 git-add doc: do not say working directory when you mean working tree
The usage of working directory is inconsistent in the git add help.
Also http://git-scm.com/docs/git-clone speaks only about working tree.
Remaining entry found by "git grep -B1 '^directory' git-add.txt" really
relates to a directory.

Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-21 09:06:35 -08:00
Sebastian Schuberth 60253a605d docs: clarify that --depth for git-fetch works with newly initialized repos
The original wording sounded as if --depth could only be used to deepen or
shorten the history of existing repos. However, that is not the case. In a
workflow like

    $ git init
    $ git remote add origin https://github.com/git/git.git
    $ git fetch --depth=1

The newly initialized repo is properly created as a shallow repo.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-08 12:40:12 -08:00
Sebastian Schuberth fc142811d1 docs: say "commits" in the --depth option wording for git-clone
It is not wrong to talk about "revisions" here, but in this context
revisions are always commits, and that is how we already name it in the
git-fetch docs. So align the docs by always referring to "commits".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-08 12:39:58 -08:00
Nguyễn Thái Ngọc Duy 8c722360d1 Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
This reverts commit 57534ee77d. The
feature added in that commit requires that patterns behave the same way
from anywhere. But some patterns can behave differently depending on
current "working" directory. The conditions to catch and avoid these
patterns are too loose. The untracked listing[1] and sparse-checkout
selection[2] can become incorrect as a result.

  [1] http://article.gmane.org/gmane.comp.version-control.git/283520
  [2] http://article.gmane.org/gmane.comp.version-control.git/283532

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-08 11:24:14 -08:00
Sebastian Schuberth 28a1b56932 docs: clarify that passing --depth to git-clone implies --single-branch
It is confusing to document how --depth behaves as part of the
--single-branch docs. Better move that part to the --depth docs, saying
that it implies --single-branch by default.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-07 11:45:19 -08:00
David A. Wheeler b2c150d3aa Expand documentation describing --signoff
Modify various document (man page) files to explain
in more detail what --signoff means.

This was inspired by https://lwn.net/Articles/669976/ where
paulj noted, "adding [the] '-s' argument to [a] git commit
doesn't really mean you have even heard of the DCO...".
Extending git's documentation will make it easier to argue
that developers understood --signoff when they use it.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-05 13:42:39 -08:00
Eric Wong e914ef0d03 for-each-ref: document creatordate and creator fields
These were introduced back in 2006 at 3175aa1ec2 but
never documented.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-05 09:44:19 -08:00
Junio C Hamano 754884255b Git 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-04 14:08:04 -08:00
Junio C Hamano 3e9226acc8 Git 2.6.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWiuzQAAoJELC16IaWr+bL9q4P/A9p1EMRvT1Bgw0umQosE0Bc
 U241cR8K3lH4CaJZTBreNcDlHJljmf1nzBLbSemniGn+7fwQQRsRva9ts2gOdWUX
 ekJq6Uj5U1fwEUVLVJWCaEqe8QORGGR5DsrlwoitjTZ8AAzRuLcCDZzNADkl64qD
 D3q8AFlWIhFIP12e1FxveTV5yhy1FQcAG90uYpWdAKkMPzciAM6ChqJyBJ+OCZXb
 DI1zoX1rSWtG27q9D2j3s0hc27glovW1khGMOfTQKAzgkCZLsqFOombTn8ndVPv4
 8kB/PdXSK3R6oUoU2ZQVv9fkqzzcvs4buqX8DA3uaDUMqoAhr7f4VqCXoc7y91qO
 dCHeL1lpYOHgfXULWp6rqKi6i8kfHqPIS48TdFRS4eL2c0Z1VV1WWUsmvYVPCPt4
 Lm5TIheHShUOewzHHHITnkbXXs9A8GX0gOHqSM6GZeJvel8LP+GbWCoxzNz3stVA
 pZpUJt2r/H8C4PYzT31M0gmAAeeN0q6BcP3YJ6utbF9xpzx4gszBt2NehVDEPN9g
 m06Bv1UQDP1X+wsZ4YKXrjGaS/BypCVhBqvtFMN0WbUurQIPUl1zrf7eVkMElKtT
 4XAJMtzdy1wL5O4VfzEmgwOWDSS/21xGuy2J0TRifVRnOh5ExefFpt8yJ5Kqp0Iq
 RmT2UHk8dLmz52etpQ9F
 =zPJG
 -----END PGP SIGNATURE-----

Sync with 2.6.5
2016-01-04 14:06:59 -08:00
Junio C Hamano 833e48259e Git 2.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-04 14:06:00 -08:00
Stephen P. Smith 99487cf228 user-manual: add addition gitweb information
Rework the section on gitweb to add information about the cgi script
and the instaweb command.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-30 15:27:04 -08:00
Stephen P. Smith 9cfde9ee8f user-manual: add section documenting shallow clones
Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-30 11:44:56 -08:00
Stephen P. Smith bac58749bb glossary: define the term shallow clone
There are several places in the documentation that
the term shallow clone is used. Defining the term
enables its use elsewhere with a known definition.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-29 11:18:36 -08:00
Junio C Hamano 28274d02c4 Git 2.7-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-28 14:00:52 -08:00
Stephen P. Smith 1de2e442af user-manual: remove temporary branch entry from todo list
In the section on "How to check out a different version of a
project" the "new" branch is used as a temporary branch.  A detached
HEAD was not used since it was a new feature introduced just a
couple weeks prior.

The section could be changed to use and explain a detached HEAD,
except that would increase the learning curve early in the manual.
Detached HEADs are discussed a couple sections later under
"Examining an old version without creating a new branch".

Let's declare that it is a bad idea to rewrite the example that
uses a temporary branch to do the sightseeing on a detached HEAD.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-28 13:47:37 -08:00
Junio C Hamano 554f6e4106 Git 2.7-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-22 14:46:01 -08:00
Junio C Hamano 1d88dab47a Update release notes to 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-21 11:08:20 -08:00
Junio C Hamano fbe959dde7 Merge branch 'bc/format-patch-null-from-line'
"format-patch" has learned a new option to zero-out the commit
object name on the mbox "From " line.

* bc/format-patch-null-from-line:
  format-patch: check that header line has expected format
  format-patch: add an option to suppress commit hash
  sha1_file.c: introduce a null_oid constant
2015-12-21 10:59:08 -08:00
Junio C Hamano 5d35d72fc3 Merge branch 'mc/push-recurse-submodules-config'
Add new config to avoid typing "--recurse-submodules" on each push.

* mc/push-recurse-submodules-config:
  push: follow the "last one wins" convention for --recurse-submodules
  push: test that --recurse-submodules on command line overrides config
  push: add recurseSubmodules config option
2015-12-21 10:59:05 -08:00
brian m. carlson 3a30aa1787 format-patch: add an option to suppress commit hash
Oftentimes, patches created by git format-patch will be stored in
version control or compared with diff.  In these cases, two otherwise
identical patches can have different commit hashes, leading to diff
noise.  Teach git format-patch a --zero-commit option that instead
produces an all-zero hash to avoid this diff noise.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-15 10:03:40 -08:00