Commit graph

6262 commits

Author SHA1 Message Date
Junio C Hamano 29c2a3dbad Merge branch 'zj/diff-stat-smaller-num-columns'
Spend only minimum number of columns necessary to show the number of lines
in the output from "diff --stat", instead of always allocating 4 columns
even when showing changes that are much smaller than 1000 lines.

By Zbigniew Jędrzejewski-Szmek
* zj/diff-stat-smaller-num-columns:
  diff --stat: use less columns for change counts
2012-05-02 13:53:28 -07:00
Junio C Hamano d274fc093c Merge branch 'jk/doc-asciidoc-inline-literal'
Our documentation was written for an ancient version of AsciiDoc,
making the source not very readable.

By Jeff King
* jk/doc-asciidoc-inline-literal:
  docs: stop using asciidoc no-inline-literal
2012-05-02 13:51:45 -07:00
Junio C Hamano a3db8511b7 Merge branch 'mm/simple-push'
New users tend to work on one branch at a time and push the result
out. The current and upstream modes of push is a more suitable default
mode than matching mode for these people, but neither is surprise-free
depending on how the project is set up. Introduce a "simple" mode that
is a subset of "upstream" but only works when the branch is named the same
between the remote and local repositories.

The plan is to make it the new default when push.default is not
configured.

By Matthieu Moy (5) and others
* mm/simple-push:
  push.default doc: explain simple after upstream
  push: document the future default change for push.default (matching -> simple)
  t5570: use explicit push refspec
  push: introduce new push.default mode "simple"
  t5528-push-default.sh: add helper functions
  Undocument deprecated alias 'push.default=tracking'
  Documentation: explain push.default option a bit more
2012-05-02 13:51:24 -07:00
Junio C Hamano d4a5d872c0 Merge branch 'jc/index-v4'
Trivially shrinks the on-disk size of the index file to save both I/O and
checksum overhead.

The topic should give a solid base to build on further updates, with the
code refactoring in its earlier parts, and the backward compatibility
mechanism in its later parts.

* jc/index-v4:
  index-v4: document the entry format
  unpack-trees: preserve the index file version of original
  update-index: upgrade/downgrade on-disk index version
  read-cache.c: write prefix-compressed names in the index
  read-cache.c: read prefix-compressed names in index on-disk version v4
  read-cache.c: move code to copy incore to ondisk cache to a helper function
  read-cache.c: move code to copy ondisk to incore cache to a helper function
  read-cache.c: report the header version we do not understand
  read-cache.c: make create_from_disk() report number of bytes it consumed
  read-cache.c: allow unaligned mapping of the index file
  cache.h: hide on-disk index details
  varint: make it available outside the context of pack
2012-05-02 13:51:13 -07:00
Junio C Hamano 07bc4f5870 Sync with v1.7.10.1 2012-05-01 21:21:46 -07:00
Junio C Hamano bf505158d0 Git 1.7.10.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-01 21:18:44 -07:00
Junio C Hamano cda03b6ad3 Merge branch 'it/fetch-pack-many-refs' into maint
When "git fetch" encounters repositories with too many references, the
command line of "fetch-pack" that is run by a helper e.g. remote-curl, may
fail to hold all of them. Now such an internal invocation can feed the
references through the standard input of "fetch-pack".

By Ivan Todoroski
* it/fetch-pack-many-refs:
  remote-curl: main test case for the OS command line overflow
  fetch-pack: test cases for the new --stdin option
  remote-curl: send the refs to fetch-pack on stdin
  fetch-pack: new --stdin option to read refs from stdin

Conflicts:
	t/t5500-fetch-pack.sh
2012-05-01 21:12:36 -07:00
Junio C Hamano 9768cafe68 Merge branch 'ld/git-p4-tags-and-labels'
By Luke Diamand
* ld/git-p4-tags-and-labels:
  git p4: fix unit tests
  git p4: move verbose to base class
  git p4: Ignore P4EDITOR if it is empty
  git p4: Squash P4EDITOR in test harness
  git p4: fix-up "import/export of labels to/from p4"
  git p4: import/export of labels to/from p4
  git p4: Fixing script editor checks
2012-04-30 14:58:16 -07:00
Junio C Hamano 1692579dd3 Merge branch 'nh/empty-rebase'
"git rebase" learned to optionally keep commits that do not introduce
any change in the original history.

By Neil Horman
* nh/empty-rebase:
  git-rebase: add keep_empty flag
  git-cherry-pick: Add test to validate new options
  git-cherry-pick: Add keep-redundant-commits option
  git-cherry-pick: add allow-empty option
2012-04-30 14:58:01 -07:00
Zbigniew Jędrzejewski-Szmek dc801e71a7 diff --stat: use less columns for change counts
Number of columns required for change counts is now computed based on
the maximum number of changed lines instead of being fixed. This means
that usually a few more columns will be available for the filenames
and the graph.

The graph width logic is also modified to include enough space for
"Bin XXX -> YYY bytes".

If changes to binary files are mixed with changes to text files,
change counts are padded to take at least three columns. And the other
way around, if change counts require more than three columns, then
"Bin"s are padded to align with the change count. This way, the +-
part starts in the same column as "XXX -> YYY" part for binary files.
This makes the graph easier to parse visually thanks to the empty
column. This mimics the layout of diff --stat before this change.

Tests and the tutorial are updated to reflect the new --stat output.
This means either the removal of extra padding and/or the addition of
up to three extra characters to truncated filenames. One test is added
to check the graph alignment when a binary file change and text file
change of more than 999 lines are committed together.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-30 14:17:26 -07:00
Junio C Hamano 10d4332e00 The seventh batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-29 18:00:47 -07:00
Junio C Hamano 55375e9473 Merge branch 'kk/gitweb-omit-expensive'
"gitweb" learned to optionally omit output of fields that are expensive
to generate.

By Kacper Kornet
* kk/gitweb-omit-expensive:
  gitweb: Option to not display information about owner
  gitweb: Option to omit column with time of the last change
2012-04-29 17:52:00 -07:00
Junio C Hamano 5fa8bf6bf9 Merge branch 'mm/include-userpath'
The new "include.path" directive in the configuration files learned
to understand "~/path" and "~user/path".

By Jeff King
* mm/include-userpath:
  config: expand tildes in include.path variable
2012-04-29 17:51:27 -07:00
Junio C Hamano 9e234af281 Merge branch 'jk/repack-no-explode-objects-from-old-pack'
Avoid writing out unreachable objects as loose objects when repacking,
if such loose objects will immediately pruned due to its age anyway.

By Jeff King
* jk/repack-no-explode-objects-from-old-pack:
  gc: use argv-array for sub-commands
  argv-array: add a new "pushl" method
  argv-array: refactor empty_argv initialization
  gc: do not explode objects which will be immediately pruned
2012-04-29 17:50:27 -07:00
Jeff King 4c0a89fcde config: expand tildes in include.path variable
You can already use relative paths in include.path, which
means that including "foo" from your global "~/.gitconfig"
will look in your home directory. However, you might want to
do something clever like putting "~/.gitconfig-foo" in a
specific repository's config file.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-29 17:46:32 -07:00
Junio C Hamano afd7bd2220 index-v4: document the entry format
Document the format so that others can learn from and build on top of
the series.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-27 16:03:31 -07:00
Junio C Hamano 62bc83349d The sixth batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-27 14:12:56 -07:00
Jeff King 6cf378f0cb docs: stop using asciidoc no-inline-literal
In asciidoc 7, backticks like `foo` produced a typographic
effect, but did not otherwise affect the syntax. In asciidoc
8, backticks introduce an "inline literal" inside which markup
is not interpreted. To keep compatibility with existing
documents, asciidoc 8 has a "no-inline-literal" attribute to
keep the old behavior. We enabled this so that the
documentation could be built on either version.

It has been several years now, and asciidoc 7 is no longer
in wide use. We can now decide whether or not we want
inline literals on their own merits, which are:

  1. The source is much easier to read when the literal
     contains punctuation. You can use `master~1` instead
     of `master{tilde}1`.

  2. They are less error-prone. Because of point (1), we
     tend to make mistakes and forget the extra layer of
     quoting.

This patch removes the no-inline-literal attribute from the
Makefile and converts every use of backticks in the
documentation to an inline literal (they must be cleaned up,
or the example above would literally show "{tilde}" in the
output).

Problematic sites were found by grepping for '`.*[{\\]' and
examined and fixed manually. The results were then verified
by comparing the output of "html2text" on the set of
generated html pages. Doing so revealed that in addition to
making the source more readable, this patch fixes several
formatting bugs:

  - HTML rendering used the ellipsis character instead of
    literal "..." in code examples (like "git log A...B")

  - some code examples used the right-arrow character
    instead of '->' because they failed to quote

  - api-config.txt did not quote tilde, and the resulting
    HTML contained a bogus snippet like:

      <tt><sub></tt> foo <tt></sub>bar</tt>

    which caused some parsers to choke and omit whole
    sections of the page.

  - git-commit.txt confused ``foo`` (backticks inside a
    literal) with ``foo'' (matched double-quotes)

  - mentions of `A U Thor <author@example.com>` used to
    erroneously auto-generate a mailto footnote for
    author@example.com

  - the description of --word-diff=plain incorrectly showed
    the output as "[-removed-] and {added}", not "{+added+}".

  - using "prime" notation like:

      commit `C` and its replacement `C'`

    confused asciidoc into thinking that everything between
    the first backtick and the final apostrophe were meant
    to be inside matched quotes

  - asciidoc got confused by the escaping of some of our
    asterisks. In particular,

      `credential.\*` and `credential.<url>.\*`

    properly escaped the asterisk in the first case, but
    literally passed through the backslash in the second
    case.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 13:19:06 -07:00
Kacper Kornet 0ebe7827b6 gitweb: Option to not display information about owner
In some setups the repository owner is not a well defined concept
and administrator can prefer it to be not shown. This commit add
and an option that enable to reach this effect.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 11:24:40 -07:00
Junio C Hamano 010b260e6f Update draft release notes to 1.7.11
A handful of topics have been merged to maintenance releases, and
the first half of 6th batch graduates to 'master'.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 11:04:41 -07:00
Junio C Hamano 210a75c38c Merge bundle error message fix in
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 10:55:08 -07:00
Junio C Hamano 868d662399 Start preparing for 1.7.10.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 10:53:55 -07:00
Junio C Hamano b4bd6bb356 Merge branch 'jc/commit-unedited-template' into maint
When "git commit --template F" errors out because the user did not
touch the message, it claimed that it aborts due to "empty message",
which was utterly wrong.

By Junio C Hamano (4) and Adam Monsen (1)
* jc/commit-unedited-template:
  Documentation/git-commit: rephrase the "initial-ness" of templates
  git-commit.txt: clarify -t requires editing message
  commit: rephrase the error when user did not touch templated log message
  commit: do not trigger bogus "has templated message edited" check
  t7501: test the right kind of breakage
2012-04-26 10:35:15 -07:00
Junio C Hamano 50bf38ac23 Sync with 1.7.9.7 2012-04-26 10:31:43 -07:00
Junio C Hamano d0f1ea6003 Git 1.7.9.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 10:23:15 -07:00
Junio C Hamano b2bab5b338 Sync with 1.7.8.6 2012-04-26 10:22:20 -07:00
Junio C Hamano d9f5ef7a4a Git 1.7.8.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 10:14:45 -07:00
Junio C Hamano aba5f57c8f Sync with 1.7.7.7 2012-04-26 09:52:33 -07:00
Junio C Hamano 8258858493 Git 1.7.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26 09:41:52 -07:00
Kacper Kornet 5710be46d8 gitweb: Option to omit column with time of the last change
Generating information about last change for a large number of git
repositories can be very time consuming. This commit add an option to
omit 'Last Change' column when presenting the list of repositories.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-25 16:42:34 -07:00
Neil Horman 90e1818f9a git-rebase: add keep_empty flag
Add a command line switch to git-rebase to allow a user the ability to specify
that they want to keep any commits in a series that are empty.

When git-rebase's type is am, then this option will automatically keep any
commit that has a tree object identical to its parent.

This patch changes the default behavior of interactive rebases as well.  With
this patch, git-rebase -i will produce a revision set passed to
git-revision-editor, in which empty commits are commented out.  Empty commits
may be kept manually by uncommenting them.  If the new --keep-empty option is
used in an interactive rebase the empty commits will automatically all be
uncommented in the editor.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 15:24:14 -07:00
Junio C Hamano f4d80d2639 push.default doc: explain simple after upstream
As the "simple" mode is described in terms of what "upstream" does,
swap the order of these two entries so that the reader sees "upstream"
first and then reads "simple" with the knowledge of what "upstream"
does.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 15:22:17 -07:00
Matthieu Moy 67804c2731 push: document the future default change for push.default (matching -> simple)
It is too early to start warning loudly about the future default change
in favor of 'simple', since many users use different versions of Git, and
would be harmed if we advised them to explicitely set
'push.default=simple' when using old versions of Git.

Still, we want to document the upcomming change so that:

* Users who may be affected by the change get one more chance to know it
  in advance.

* We actually commit to changing the default, and avoid repeating past
  errors.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 15:22:17 -07:00
Matthieu Moy b55e677522 push: introduce new push.default mode "simple"
When calling "git push" without argument, we want to allow Git to do
something simple to explain and safe. push.default=matching is unsafe
when used to push to shared repositories, and hard to explain to
beginners in some contexts. It is debatable whether 'upstream' or
'current' is the safest or the easiest to explain, so introduce a new
mode called 'simple' that is the intersection of them: push to the
upstream branch, but only if it has the same name remotely. If not, give
an error that suggests the right command to push explicitely to
'upstream' or 'current'.

A question is whether to allow pushing when no upstream is configured. An
argument in favor of allowing the push is that it makes the new mode work
in more cases. On the other hand, refusing to push when no upstream is
configured encourages the user to set the upstream, which will be
beneficial on the next pull. Lacking better argument, we chose to deny
the push, because it will be easier to change in the future if someone
shows us wrong.

Original-patch-by: Jeff King <peff@peff.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 15:22:16 -07:00
Neil Horman b27cfb0d8d git-cherry-pick: Add keep-redundant-commits option
The git-cherry-pick --allow-empty command by default only preserves empty
commits that were originally empty, i.e only those commits for which
<commit>^{tree} and <commit>^^{tree} are equal.  By default commits which are
non-empty, but were made empty by the inclusion of a prior commit on the current
history are filtered out.  This option allows us to override that behavior and
include redundant commits as empty commits in the change history.

Note that this patch changes the default behavior of git cherry-pick slightly.
Prior to this patch all commits in a cherry-pick sequence were applied and git
commit was run.  The implication here was that, if a commit was redundant, and
the commit did not trigger the fast forward logic, the git commit operation, and
therefore the git cherry-pick operation would fail, displaying the cherry pick
advice (i.e. run git commit --allow-empty).  With this patch however, such
redundant commits are automatically skipped without stopping, unless
--keep-redundant-commits is specified, in which case, they are automatically
applied as empty commits.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 14:52:12 -07:00
Junio C Hamano f9d995d5dd The fifth batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 14:50:06 -07:00
Junio C Hamano 77cab8af4a Merge branch 'it/fetch-pack-many-refs'
When "git fetch" encounters repositories with too many references, the
command line of "fetch-pack" that is run by a helper e.g. remote-curl,
may fail to hold all of them. Now such an internal invocation can feed
the references through the standard input of "fetch-pack".

By Ivan Todoroski
* it/fetch-pack-many-refs:
  remote-curl: main test case for the OS command line overflow
  fetch-pack: test cases for the new --stdin option
  remote-curl: send the refs to fetch-pack on stdin
  fetch-pack: new --stdin option to read refs from stdin
2012-04-24 14:40:51 -07:00
Junio C Hamano 419f2ecf78 Merge branch 'hv/submodule-recurse-push'
"git push --recurse-submodules" learns to optionally look into the
histories of submodules bound to the superproject and push them out.

By Heiko Voigt
* hv/submodule-recurse-push:
  push: teach --recurse-submodules the on-demand option
  Refactor submodule push check to use string list instead of integer
  Teach revision walking machinery to walk multiple times sequencially
2012-04-24 14:40:20 -07:00
Luke Diamand 6a10b6aa1e git p4: move verbose to base class
The verbose flag is common to all classes, or at least should be.
Make it a member of the base Command class, rather than
reimplementing for each class. Make option parsing mirror this.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 14:22:23 -07:00
Luke Diamand c8942a223d git p4: fix-up "import/export of labels to/from p4"
The previous one is already in 'next' but was somewhat lacking.

The configuration "git-p4.validLabelRegexp" is now called
"labelExportRegexp", and its default covers lowercase alphabets as
well.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 14:17:39 -07:00
Matthieu Moy 628ab0ea10 Undocument deprecated alias 'push.default=tracking'
It's been deprecated since 53c4031 (Johan Herland, Wed Feb 16 2011,
push.default: Rename 'tracking' to 'upstream'), so it's OK to remove it
from documentation (even though it's still supported) to make the
explanations more readable.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 12:11:58 -07:00
Matthieu Moy 185c0874b1 Documentation: explain push.default option a bit more
The previous documentation was explaining _what_ the options were doing,
but were of little help explaining _why_ a user should set his default to
either of the options.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 12:11:58 -07:00
Junio C Hamano aa39b858a3 RelNotes: the fourth batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-23 13:30:22 -07:00
Junio C Hamano b5d681ba81 Merge branch 'jn/fast-import-doc'
By Jonathan Nieder
* jn/fast-import-doc:
  fast-import doc: cat-blob and ls responses need to be consumed quickly
2012-04-23 13:01:32 -07:00
Junio C Hamano 2347982d1a Merge branch 'jn/debian-customizes-default-editor'
Make it easier for distros to document custom pager and editor they
used when building their binary releases in "git var" documentation.

By Jonathan Nieder
* jn/debian-customizes-default-editor:
  var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings
  var doc: default editor and pager are configurable at build time
2012-04-23 12:41:15 -07:00
Junio C Hamano 4c9d7bc4a6 Merge branch 'pw/git-p4'
By Pete Wyckoff
* pw/git-p4:
  git p4: use "git p4" directly in tests
  git p4: update name in script
  git-p4: move to toplevel
2012-04-23 12:40:03 -07:00
Junio C Hamano d1ca788fcd RelNotes: the third batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-20 15:58:40 -07:00
Junio C Hamano c5da24a73a Merge branch 'ct/advise-push-default'
Break down the cases in which "git push" fails due to non-ff into
three categories, and give separate advise messages for each case.

By Christopher Tiwald (2) and Jeff King (1)
* ct/advise-push-default:
  Fix httpd tests that broke when non-ff push advice changed
  clean up struct ref's nonfastforward field
  push: Provide situational hints for non-fast-forward errors
2012-04-20 15:50:37 -07:00
Junio C Hamano 334dde8532 Merge branch 'jb/am-include'
"git am" learned the "--include" option, which is an opposite of existing
the "--exclude" option.

By Johannes Berg
* jb/am-include:
  am: support --include option
2012-04-20 15:49:16 -07:00
Jeff King d15bbe1379 argv-array: add a new "pushl" method
It can be convenient to push many strings in a single line
(e.g., if you are initializing an array with defaults). This
patch provides a convenience wrapper to allow this.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-18 16:16:38 -07:00