Граф коммитов

6334 Коммитов

Автор SHA1 Сообщение Дата
Junio C Hamano 11b17afc93 pulling signed tag: add howto document
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-18 15:17:27 -08:00
Junio C Hamano c74f97a624 Merge branch 'nd/pathspec-recursion-cleanup'
* nd/pathspec-recursion-cleanup:
  diff-index: enable recursive pathspec matching in unpack_trees
  Document limited recursion pathspec matching with wildcards
2012-01-18 15:16:43 -08:00
Junio C Hamano 8ef7933880 Merge branch 'mh/maint-show-ref-doc'
* mh/maint-show-ref-doc:
  git-show-ref doc: typeset regexp in fixed width font
  git-show-ref: fix escaping in asciidoc source
2012-01-18 15:16:23 -08:00
Nguyễn Thái Ngọc Duy 5a7d5b683f clone: allow --branch to take a tag
Because a tag ref cannot be put to HEAD, HEAD will become detached.
This is consistent with "git checkout <tag>".

This is mostly useful in shallow clone, where it allows you to clone a
tag in addtion to branches.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16 16:26:26 -08:00
Thomas Rast f7e5ea171b am: learn passing -b to mailinfo
git-am could pass -k to mailinfo, but not -b.  Introduce an option
that does so.  We change the meaning of the 'keep' state file, but are
careful not to cause a problem unless you downgrade in the middle of
an 'am' run.

This uncovers a bug in mailinfo -b, hence the failing test.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16 16:04:52 -08:00
Nguyễn Thái Ngọc Duy 8c69c1f92e Document limited recursion pathspec matching with wildcards
It's actually unlimited recursion if wildcards are active regardless
--max-depth

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-14 18:39:04 -08:00
Michael Haggerty 87b340b967 git-show-ref doc: typeset regexp in fixed width font
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-13 09:50:45 -08:00
Michael Haggerty 6ab260809b git-show-ref: fix escaping in asciidoc source
Two "^" characters were incorrectly being interpreted as markup for
superscripting.  Fix them by writing them as attribute references
"{caret}".

Although a single "^" character in a paragraph cannot be
misinterpreted in this way, also write other "^" characters as
"{caret}" in the interest of good hygiene (unless they are in literal
paragraphs, of course, in which context attribute references are not
recognized).

Spell "{}" consistently, namely *not* quoted as "\{\}".  Since the
braces are empty, they cannot be interpreted as an attribute
reference, and either spelling is OK.  So arbitrarily choose one
variation and use it consistently.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-13 09:50:17 -08:00
Junio C Hamano 6db5c6e43d Git 1.7.9-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-12 23:43:28 -08:00
Junio C Hamano b51ffa80f6 Merge branch 'tr/maint-mailinfo'
* tr/maint-mailinfo:
  mailinfo documentation: accurately describe non -k case
2012-01-12 23:34:26 -08:00
Junio C Hamano c4a01a3cbb Merge branch 'maint'
* maint:
  Update draft release notes to 1.7.8.4
  Update draft release notes to 1.7.7.6
  Update draft release notes to 1.7.6.6
  thin-pack: try harder to use preferred base objects as base
2012-01-12 23:33:39 -08:00
Junio C Hamano ab8a78084b Update draft release notes to 1.7.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-12 23:33:29 -08:00
Junio C Hamano 5a6a939481 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  Update draft release notes to 1.7.7.6
  Update draft release notes to 1.7.6.6
  thin-pack: try harder to use preferred base objects as base
2012-01-12 23:31:46 -08:00
Junio C Hamano 8f83acf77c Update draft release notes to 1.7.7.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-12 23:31:41 -08:00
Junio C Hamano 901c907d83 Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  Update draft release notes to 1.7.6.6
  thin-pack: try harder to use preferred base objects as base
2012-01-12 23:31:05 -08:00
Junio C Hamano 04f6785a08 Update draft release notes to 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-12 23:30:53 -08:00
Thomas Rast 82553cbb08 mailinfo documentation: accurately describe non -k case
Since its very first description of -k, the documentation for
git-mailinfo claimed that (in the case without -k) after cleaning up
bracketed strings [blah], it would insert [PATCH].

It doesn't; on the contrary, one of the important jobs of mailinfo is
to remove those strings.

Since we're already there, rewrite the paragraph to give a complete
enumeration of all the transformations.  Specifically, it was missing
the whitespace normalization (run of isspace(c) -> ' ') and the
removal of leading ':'.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-11 17:30:16 -08:00
Pete Wyckoff 42d8c27990 git-p4: add tests demonstrating spec overlay ambiguities
Introduce new tests that look more closely at overlay situations
when there are conflicting files.  Five of these are broken.
Document the brokenness.

This is a fundamental problem with how git-p4 only "borrows" a
client spec.  At some sync operation, a new change can contain
a file which is already in the repo or explicitly deleted through
another mapping.  To sort this out would involve listing all the
files in the client spec to find one with a higher priority.
While this is not too hard for the initial import, subsequent
sync operations would be very costly.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-11 16:35:39 -08:00
Junio C Hamano e04dc492ac Sync with maint
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 14:46:22 -08:00
Junio C Hamano be4d2920c2 Prepare for 1.7.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 14:27:14 -08:00
Junio C Hamano 55dcc2ebad Merge the attributes fix in from maint-1.6.7 branch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 14:24:01 -08:00
Junio C Hamano 804e97fc77 Prepare for 1.7.7.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 14:16:49 -08:00
Junio C Hamano 6c65b5ea43 Merge the attributes fix in from maint-1.6.6 branch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 14:14:26 -08:00
Junio C Hamano f14f9803ef Prepare for 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 13:11:03 -08:00
Junio C Hamano b6fb7fed6a Documentation: rerere's rr-cache auto-creation and rerere.enabled
The description of rerere.enabled left the user in the dark as to who
might create an rr-cache directory.  Add a note that simply invoking
rerere does this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-10 12:59:31 -08:00
Nguyễn Thái Ngọc Duy 3e6e0edde2 clone: add --single-branch to fetch only one branch
When --single-branch is given, only one branch, either HEAD or one
specified by --branch, will be fetched. Also only tags that point to
the downloaded history are fetched.

This helps most in shallow clones, where it can reduce the download to
minimum and that is why it is enabled by default when --depth is given.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-08 13:48:27 -08:00
Junio C Hamano eac2d83247 Git 1.7.9-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-06 12:51:09 -08:00
Junio C Hamano 5de89d3abf Merge branch 'jc/show-sig'
* jc/show-sig:
  log --show-signature: reword the common two-head merge case
  log-tree: show mergetag in log --show-signature output
  log-tree.c: small refactor in show_signature()
  commit --amend -S: strip existing gpgsig headers
  verify_signed_buffer: fix stale comment
  gpg-interface: allow use of a custom GPG binary
  pretty: %G[?GS] placeholders
  test "commit -S" and "log --show-signature"
  log: --show-signature
  commit: teach --gpg-sign option

Conflicts:
	builtin/commit-tree.c
	builtin/commit.c
	builtin/merge.c
	notes-cache.c
	pretty.c
2012-01-06 12:44:07 -08:00
Junio C Hamano 1067f8dd0e Merge branch 'jh/fetch-head-update'
* jh/fetch-head-update:
  write first for-merge ref to FETCH_HEAD first
2012-01-06 12:44:01 -08:00
Junio C Hamano 8cbfc1189c Merge branch 'pw/p4-view-updates'
* pw/p4-view-updates:
  git-p4: view spec documentation
  git-p4: rewrite view handling
  git-p4: support single file p4 client view maps
  git-p4: sort client views by reverse View number
  git-p4: fix test for unsupported P4 Client Views
  git-p4: test client view handling
2012-01-06 12:43:59 -08:00
Junio C Hamano 21c6a18c75 Sync with 1.7.8.3 2012-01-06 12:42:48 -08:00
Junio C Hamano 5f4d133fca Git 1.7.8.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-06 12:41:39 -08:00
Junio C Hamano cfdfc5a3b2 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  Documentation: rerere.enabled is the primary way to configure rerere
2012-01-06 12:35:12 -08:00
Junio C Hamano 8769e93327 Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  Documentation: rerere.enabled is the primary way to configure rerere
2012-01-06 12:35:05 -08:00
Thomas Rast 07b88a00c0 Documentation: rerere.enabled is the primary way to configure rerere
The wording seems to suggest that creating the directory is needed and the
setting of rerere.enabled is only for disabling the feature by setting it
to 'false'. But the configuration is meant to be the primary control and
setting it to 'true' will enable it; the rr-cache directory will be
created as necessary and the user does not have to create it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-06 12:27:59 -08:00
Joey Hess 96890f4c42 write first for-merge ref to FETCH_HEAD first
The FETCH_HEAD refname is supposed to refer to the ref that was fetched
and should be merged. However all fetched refs are written to
.git/FETCH_HEAD in an arbitrary order, and resolve_ref_unsafe simply
takes the first ref as the FETCH_HEAD, which is often the wrong one,
when other branches were also fetched.

The solution is to write the for-merge ref(s) to FETCH_HEAD first.
Then, unless --append is used, the FETCH_HEAD refname behaves as intended.
If the user uses --append, they presumably are doing so in order to
preserve the old FETCH_HEAD.

While we are at it, update an old example in the read-tree documentation
that implied that each entry in FETCH_HEAD only has the object name, which
is not true for quite a while.

[jc: adjusted tests]

Signed-off-by: Joey Hess <joey@kitenet.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-03 16:13:14 -08:00
Pete Wyckoff 896a681698 git-p4: view spec documentation
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-03 14:10:03 -08:00
Junio C Hamano 4570aeb0d8 Merge branch 'pw/p4-docs-and-tests'
* pw/p4-docs-and-tests:
  git-p4: document and test submit options
  git-p4: test and document --use-client-spec
  git-p4: test --keep-path
  git-p4: test --max-changes
  git-p4: document and test --import-local
  git-p4: honor --changesfile option and test
  git-p4: document and test clone --branch
  git-p4: test cloning with two dirs, clarify doc
  git-p4: clone does not use --git-dir
  git-p4: introduce asciidoc documentation
  rename git-p4 tests
2012-01-03 14:09:28 -08:00
Junio C Hamano 228c341835 Merge branch 'maint'
* maint:
  docs: describe behavior of relative submodule URLs
  fix hang in git fetch if pointed at a 0 length bundle
  Documentation: read-tree --prefix works with existing subtrees
  Add MYMETA.json to perl/.gitignore
2012-01-03 13:48:00 -08:00
Junio C Hamano bc0fe84b06 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  docs: describe behavior of relative submodule URLs
  Documentation: read-tree --prefix works with existing subtrees
  Add MYMETA.json to perl/.gitignore
2012-01-03 13:47:46 -08:00
Junio C Hamano c07aa5b218 Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  Documentation: read-tree --prefix works with existing subtrees
  Add MYMETA.json to perl/.gitignore
2012-01-03 13:47:15 -08:00
Jens Lehmann 9e6ed475e7 docs: describe behavior of relative submodule URLs
Since the relative submodule URLs have been introduced in f31a522a2d, they
do not conform to the rules for resolving relative URIs but rather to
those of relative directories.

Document that behavior.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-03 12:47:58 -08:00
Clemens Buchacher 5c951ef47b Documentation: read-tree --prefix works with existing subtrees
Since 34110cd4 (Make 'unpack_trees()' have a separate source and
destination index) it is no longer true that a subdirectory with
the same prefix must not exist.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-01 01:18:53 -08:00
Junio C Hamano 17b4e93d5b Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-28 12:07:22 -08:00
Junio C Hamano 48de6569eb Sync with 1.7.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-28 12:04:25 -08:00
Junio C Hamano f3f778df69 Git 1.7.8.2
Contains accumulated fixes since 1.7.8 that have been merged to the
'master' branch in preparation for the 1.7.9 release.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-28 12:03:24 -08:00
Junio C Hamano 00754b20f9 Merge branch 'tr/doc-sh-setup' into maint
* tr/doc-sh-setup:
  git-sh-setup: make require_clean_work_tree part of the interface
2011-12-28 11:42:51 -08:00
Junio C Hamano 81eaa0655f Merge branch 'jk/doc-fsck' into maint
* jk/doc-fsck:
  docs: brush up obsolete bits of git-fsck manpage
2011-12-28 11:42:33 -08:00
Junio C Hamano 3c06ab69b1 Merge branch 'jc/advice-doc' into maint
* jc/advice-doc:
  advice: Document that they all default to true
2011-12-28 11:32:39 -08:00
Junio C Hamano 699eb54876 Merge branch 'jk/maint-mv' into maint
* jk/maint-mv:
  mv: be quiet about overwriting
  mv: improve overwrite warning
  mv: make non-directory destination error more clear
  mv: honor --verbose flag
  docs: mention "-k" for both forms of "git mv"
2011-12-28 11:32:36 -08:00
Junio C Hamano 474294963e Merge branch 'ci/stripspace-docs' into maint
* ci/stripspace-docs:
  Update documentation for stripspace
2011-12-28 11:32:35 -08:00
Pete Wyckoff 28755dbaa5 git-p4: document and test submit options
Clarify there is a -M option, but no -C.  These are both
configurable through variables.

Explain that the allowSubmit variable takes a comma-separated
list of branch names.

Catch earlier an invalid branch name given as an argument to
"git p4 clone".

Test option --origin, variable allowSubmit, and explicit master
branch name.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 10:19:31 -08:00
Pete Wyckoff 09fca77b9e git-p4: test and document --use-client-spec
The depot path is required, even with this option.  Make sure
git-p4 fails and exits with non-zero.

Contents in the specified depot path will be rearranged according
to the client spec.  Test this and add a note in the docs.

Leave an XXX suggesting that this is somewhat confusing behavior
that might be good to fix later.

Function stripRepoPath() looks at self.useClientSpec.  Make sure
this is set both for command-line option --use-client-spec and
for configuration variable git-p4.useClientSpec.  Test this.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 10:19:31 -08:00
Pete Wyckoff 5a92a6ce90 git-p4: document and test --import-local
Explain that it is needed on future syncs to find p4 branches
in refs/heads.  Test this behavior.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 10:19:30 -08:00
Pete Wyckoff 1471c6b155 git-p4: document and test clone --branch
Clone with --branch will not checkout HEAD, unless the branch
happens to be called the default refs/remotes/p4/master.  The
--branch option is most useful with sync; give an example of
that.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 10:19:30 -08:00
Pete Wyckoff da191d15bf git-p4: test cloning with two dirs, clarify doc
Document how git-p4 currently works when specifying multiple
depot paths:

1.  No branches or directories are named.

2.  Conflicting files are silently ignored---the last change
    wins.

2.  Option --destination is required, else the last path is construed
    to be a directory.

3.  Revision specifiers must be the same on all paths for them to
    take effect.

Test this behavior.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 10:19:30 -08:00
Pete Wyckoff 6679c34c47 git-p4: introduce asciidoc documentation
Add proper documentation for git-p4.  Delete the old .txt
documentation from contrib/fast-import.

Cc: Frans Klaver <fransklaver@gmail.com>
Cc: Luke Diamand <luke@diamand.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-27 10:19:30 -08:00
Junio C Hamano ec330158ec Update draft release notes in preparation for 1.7.9-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-22 15:36:48 -08:00
Junio C Hamano f0ede8435a Merge branch 'tr/doc-sh-setup'
* tr/doc-sh-setup:
  git-sh-setup: make require_clean_work_tree part of the interface
2011-12-22 15:30:29 -08:00
Junio C Hamano 5d6dfc7cb1 Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-22 11:43:02 -08:00
Junio C Hamano adb86762e5 Merge branch 'jk/pretty-reglog-ent'
* jk/pretty-reglog-ent:
  pretty: give placeholders to reflog identity
2011-12-22 11:27:28 -08:00
Junio C Hamano a4c628d71d Merge branch 'jk/doc-fsck'
* jk/doc-fsck:
  docs: brush up obsolete bits of git-fsck manpage

Conflicts:
	Documentation/git-fsck.txt
2011-12-22 11:27:27 -08:00
Junio C Hamano e443bdfe1e Sync with v1.7.8.1 2011-12-21 12:02:44 -08:00
Junio C Hamano 2ce0edcd78 Git 1.7.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 12:02:13 -08:00
Thomas Rast d577cd216e git-sh-setup: make require_clean_work_tree part of the interface
92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error
message, 2010-10-19) refactored git's own checking to a function in
git-sh-setup.  This is a very useful thing for script writers, so
document it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 14:01:41 -08:00
Junio C Hamano 184a541fb5 Merge branch 'jc/advice-doc'
* jc/advice-doc:
  advice: Document that they all default to true
2011-12-20 13:25:29 -08:00
Junio C Hamano 876a6f4991 Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-19 16:39:54 -08:00
Junio C Hamano 2dccad3c6f Merge branch 'ab/enable-i18n'
* ab/enable-i18n:
  i18n: add infrastructure for translating Git with gettext

Conflicts:
	Makefile
2011-12-19 16:06:41 -08:00
Junio C Hamano b052781fef Merge branch 'jk/maint-mv'
* jk/maint-mv:
  mv: be quiet about overwriting
  mv: improve overwrite warning
  mv: make non-directory destination error more clear
  mv: honor --verbose flag
  docs: mention "-k" for both forms of "git mv"
2011-12-19 16:05:34 -08:00
Junio C Hamano ab2fadefab Merge branch 'ci/stripspace-docs'
* ci/stripspace-docs:
  Update documentation for stripspace
2011-12-19 16:05:31 -08:00
Junio C Hamano 367d20ec6b Merge branch 'jk/credentials'
* jk/credentials:
  t: add test harness for external credential helpers
  credentials: add "store" helper
  strbuf: add strbuf_add*_urlencode
  Makefile: unix sockets may not available on some platforms
  credentials: add "cache" helper
  docs: end-user documentation for the credential subsystem
  credential: make relevance of http path configurable
  credential: add credential.*.username
  credential: apply helper config
  http: use credential API to get passwords
  credential: add function for parsing url components
  introduce credentials API
  t5550: fix typo
  test-lib: add test_config_global variant

Conflicts:
	strbuf.c
2011-12-19 16:05:16 -08:00
Junio C Hamano 26e94af0ba advice: Document that they all default to true
By definition, the default value of "advice.*" variables must be true and
they all control various additional help messages that are designed to aid
new users. Setting one to false is to tell Git that the user understands
the nature of the error and does not need the additional verbose help
message.

Also fix the asciidoc markup for linkgit:git-checkout[1] in the
description of the detachedHead advice by removing an excess colon.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-18 21:38:55 -08:00
Junio C Hamano ee22802493 Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-16 22:45:03 -08:00
Jeff King 2830308260 docs: brush up obsolete bits of git-fsck manpage
After the description and options, the fsck manpage contains
some discussion about what it does. Over time, this
discussion has become somewhat obsolete, both in content and
formatting. In particular:

  1. There are many options now, so starting the discussion
     with "It tests..." makes it unclear whether we are
     talking about the last option, or about the tool in
     general. Let's start a new "discussion" section and
     make our antecedent more clear.

  2. It gave an example for --unreachable using for-each-ref
     to mention all of the heads, saying that it will do "a
     _lot_ of verification". This is hopelessly out-of-date,
     as giving no arguments will check much more (reflogs,
     the index, non-head refs).

  3. It goes on to mention tests "to be added" (like tree
     object sorting). We now have these tests.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-16 16:24:35 -08:00
Jeff King cd1957f5fc pretty: give placeholders to reflog identity
When doing a reflog walk, you can get some information about
the reflog (such as the subject line), but not the identity
information (i.e., name and email).

Let's make those available, mimicing the options for author
and committer identity.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-16 13:00:15 -08:00
Junio C Hamano 10f4eb652e Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-13 23:09:27 -08:00
Junio C Hamano b3f17ac3d6 Merge branch 'ks/tag-cleanup'
* ks/tag-cleanup:
  git-tag: introduce --cleanup option

Conflicts:
	builtin/tag.c
2011-12-13 23:07:47 -08:00
Junio C Hamano 9e6324c4d7 Merge branch 'maint'
* maint:
  Update draft release notes for 1.7.8.1
  Git 1.7.7.5
  Git 1.7.6.5
  blame: don't overflow time buffer
  fetch: create status table using strbuf

Conflicts:
	RelNotes
2011-12-13 22:18:00 -08:00
Junio C Hamano 7b6c5836cf Update draft release notes for 1.7.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-13 22:08:52 -08:00
Junio C Hamano 8311158c66 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  Git 1.7.7.5
  Git 1.7.6.5
  blame: don't overflow time buffer
  fetch: create status table using strbuf
  checkout,merge: loosen overwriting untracked file check based on info/exclude
  cast variable in call to free() in builtin/diff.c and submodule.c
  apply: get rid of useless x < 0 comparison on a size_t type

Conflicts:
	Documentation/git.txt
	GIT-VERSION-GEN
	RelNotes
	builtin/fetch.c
2011-12-13 21:58:51 -08:00
Junio C Hamano 66c11f02b0 Git 1.7.7.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-13 21:55:31 -08:00
Junio C Hamano 7857e3246f Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  Git 1.7.6.5
  blame: don't overflow time buffer
  fetch: create status table using strbuf

Conflicts:
	Documentation/git.txt
	GIT-VERSION-GEN
	RelNotes
2011-12-13 21:44:56 -08:00
Junio C Hamano 15b7898c5e Git 1.7.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-13 21:32:30 -08:00
Conrad Irwin 497215d881 Update documentation for stripspace
Tell the user what this command is intended for, and expand the
description of what it does.

Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-12 16:48:54 -08:00
Jeff King 71e1b4b6bf credentials: add "store" helper
This is like "cache", except that we actually put the
credentials on disk. This can be terribly insecure, of
course, but we do what we can to protect them by filesystem
permissions, and we warn the user in the documentation.

This is not unlike using .netrc to store entries, but it's a
little more user-friendly. Instead of putting credentials in
place ahead of time, we transparently store them after
prompting the user for them once.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-12 16:09:38 -08:00
Jeff King 07b8738967 mv: honor --verbose flag
The code for a verbose flag has been here since "git mv" was
converted to C many years ago, but actually getting the "-v"
flag from the command line was accidentally lost in the
transition.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-12 11:52:31 -08:00
Jeff King cfe21f05bb docs: mention "-k" for both forms of "git mv"
The "git mv" synopsis shows two forms: renaming a file, and
moving files into a directory. They can both make use of the
"-k" flag to ignore errors, so mention it in both places.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-12 11:49:49 -08:00
Jeff King e2770979fe credentials: add "cache" helper
If you access repositories over smart-http using http
authentication, then it can be annoying to have git ask you
for your password repeatedly. We cache credentials in
memory, of course, but git is composed of many small
programs. Having to input your password for each one can be
frustrating.

This patch introduces a credential helper that will cache
passwords in memory for a short period of time.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-11 23:16:25 -08:00
Jeff King a6fc9fd3f4 docs: end-user documentation for the credential subsystem
The credential API and helper format is already defined in
technical/api-credentials.txt.  This presents the end-user
view.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-11 23:16:25 -08:00
Jeff King d3e847c107 credential: add function for parsing url components
All of the components of a credential struct can be found in
a URL.  For example, the URL:

  http://foo:bar@example.com/repo.git

contains:

  protocol=http
  host=example.com
  path=repo.git
  username=foo
  password=bar

We want to be able to turn URLs into broken-down credential
structs so that we know two things:

  1. Which parts of the username/password we still need

  2. What the context of the request is (for prompting or
     as a key for storing credentials).

This code is based on http_auth_init in http.c, but needed a
few modifications in order to get all of the components that
the credential object is interested in.

Once the http code is switched over to the credential API,
then http_auth_init can just go away.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-11 23:16:24 -08:00
Jeff King abca927dbe introduce credentials API
There are a few places in git that need to get a username
and password credential from the user; the most notable one
is HTTP authentication for smart-http pushing.

Right now the only choices for providing credentials are to
put them plaintext into your ~/.netrc, or to have git prompt
you (either on the terminal or via an askpass program). The
former is not very secure, and the latter is not very
convenient.

Unfortunately, there is no "always best" solution for
password management. The details will depend on the tradeoff
you want between security and convenience, as well as how
git can integrate with other security systems (e.g., many
operating systems provide a keychain or password wallet for
single sign-on).

This patch provides an abstract notion of credentials as a
data item, and provides three basic operations:

  - fill (i.e., acquire from external storage or from the
    user)

  - approve (mark a credential as "working" for further
    storage)

  - reject (mark a credential as "not working", so it can
    be removed from storage)

These operations can be backed by external helper processes
that interact with system- or user-specific secure storage.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-11 23:16:24 -08:00
Junio C Hamano 9859a023fe Update draft release notes for 1.7.9
The first two of more important topics slated for 1.7.9 have been merged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-09 13:52:39 -08:00
Junio C Hamano eb8aa3d2c2 Merge branch 'jc/pull-signed-tag'
* jc/pull-signed-tag:
  commit-tree: teach -m/-F options to read logs from elsewhere
  commit-tree: update the command line parsing
  commit: teach --amend to carry forward extra headers
  merge: force edit and no-ff mode when merging a tag object
  commit: copy merged signed tags to headers of merge commit
  merge: record tag objects without peeling in MERGE_HEAD
  merge: make usage of commit->util more extensible
  fmt-merge-msg: Add contents of merged tag in the merge message
  fmt-merge-msg: package options into a structure
  fmt-merge-msg: avoid early returns
  refs DWIMmery: use the same rule for both "git fetch" and others
  fetch: allow "git fetch $there v1.0" to fetch a tag
  merge: notice local merging of tags and keep it unwrapped
  fetch: do not store peeled tag object names in FETCH_HEAD
  Split GPG interface into its own helper library

Conflicts:
	builtin/fmt-merge-msg.c
	builtin/merge.c
2011-12-09 13:37:09 -08:00
Junio C Hamano a4043aeafe Merge branch 'jc/request-pull-show-head-4'
* jc/request-pull-show-head-4:
  request-pull: use the annotated tag contents
  fmt-merge-msg.c: Fix an "dubious one-bit signed bitfield" sparse error
  environment.c: Fix an sparse "symbol not declared" warning
  builtin/log.c: Fix an "Using plain integer as NULL pointer" warning
  fmt-merge-msg: use branch.$name.description
  request-pull: use the branch description
  request-pull: state what commit to expect
  request-pull: modernize style
  branch: teach --edit-description option
  format-patch: use branch description in cover letter
  branch: add read_branch_desc() helper function

Conflicts:
	builtin/branch.c
2011-12-09 13:37:05 -08:00
Junio C Hamano 1ee740e669 Merge branch 'ab/pull-rebase-config'
* ab/pull-rebase-config:
  pull: introduce a pull.rebase option to enable --rebase
2011-12-09 13:37:01 -08:00
Junio C Hamano 51f737e350 Merge branch 'maint'
* maint:
  am: don't persist keepcr flag
  mingw: give waitpid the correct signature
  git symbolic-ref: documentation fix
2011-12-09 13:34:18 -08:00
Junio C Hamano 10dd3b2bf1 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  am: don't persist keepcr flag
  mingw: give waitpid the correct signature
  git symbolic-ref: documentation fix
2011-12-09 13:33:39 -08:00
Kirill A. Shutemov d3e0598330 git-tag: introduce --cleanup option
Normally git tag strips tag message lines starting with '#', trailing
spaces from every line and empty lines from the beginning and end.

--cleanup allows to select different cleanup modes for tag message.
It provides the same interface as --cleanup option in git-commit.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-09 09:39:30 -08:00
Michael Haggerty a8d05d72b9 git symbolic-ref: documentation fix
The old "git symbolic-ref" manpage seemed to imply in one place that
symlinks are still the default way to represent symbolic references
and in another that symlinks are deprecated.  Fix the text and shorten
the justification for the change of implementation.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-08 11:10:12 -08:00
Ævar Arnfjörð Bjarmason 5e9637c629 i18n: add infrastructure for translating Git with gettext
Change the skeleton implementation of i18n in Git to one that can show
localized strings to users for our C, Shell and Perl programs using
either GNU libintl or the Solaris gettext implementation.

This new internationalization support is enabled by default. If
gettext isn't available, or if Git is compiled with
NO_GETTEXT=YesPlease, Git falls back on its current behavior of
showing interface messages in English. When using the autoconf script
we'll auto-detect if the gettext libraries are installed and act
appropriately.

This change is somewhat large because as well as adding a C, Shell and
Perl i18n interface we're adding a lot of tests for them, and for
those tests to work we need a skeleton PO file to actually test
translations. A minimal Icelandic translation is included for this
purpose. Icelandic includes multi-byte characters which makes it easy
to test various edge cases, and it's a language I happen to
understand.

The rest of the commit message goes into detail about various
sub-parts of this commit.

= Installation

Gettext .mo files will be installed and looked for in the standard
$(prefix)/share/locale path. GIT_TEXTDOMAINDIR can also be set to
override that, but that's only intended to be used to test Git itself.

= Perl

Perl code that's to be localized should use the new Git::I18n
module. It imports a __ function into the caller's package by default.

Instead of using the high level Locale::TextDomain interface I've
opted to use the low-level (equivalent to the C interface)
Locale::Messages module, which Locale::TextDomain itself uses.

Locale::TextDomain does a lot of redundant work we don't need, and
some of it would potentially introduce bugs. It tries to set the
$TEXTDOMAIN based on package of the caller, and has its own
hardcoded paths where it'll search for messages.

I found it easier just to completely avoid it rather than try to
circumvent its behavior. In any case, this is an issue wholly
internal Git::I18N. Its guts can be changed later if that's deemed
necessary.

See <AANLkTilYD_NyIZMyj9dHtVk-ylVBfvyxpCC7982LWnVd@mail.gmail.com> for
a further elaboration on this topic.

= Shell

Shell code that's to be localized should use the git-sh-i18n
library. It's basically just a wrapper for the system's gettext.sh.

If gettext.sh isn't available we'll fall back on gettext(1) if it's
available. The latter is available without the former on Solaris,
which has its own non-GNU gettext implementation. We also need to
emulate eval_gettext() there.

If neither are present we'll use a dumb printf(1) fall-through
wrapper.

= About libcharset.h and langinfo.h

We use libcharset to query the character set of the current locale if
it's available. I.e. we'll use it instead of nl_langinfo if
HAVE_LIBCHARSET_H is set.

The GNU gettext manual recommends using langinfo.h's
nl_langinfo(CODESET) to acquire the current character set, but on
systems that have libcharset.h's locale_charset() using the latter is
either saner, or the only option on those systems.

GNU and Solaris have a nl_langinfo(CODESET), FreeBSD can use either,
but MinGW and some others need to use libcharset.h's locale_charset()
instead.

=Credits

This patch is based on work by Jeff Epler <jepler@unpythonic.net> who
did the initial Makefile / C work, and a lot of comments from the Git
mailing list, including Jonathan Nieder, Jakub Narebski, Johannes
Sixt, Erik Faye-Lund, Peter Krefting, Junio C Hamano, Thomas Rast and
others.

[jc: squashed a small Makefile fix from Ramsay]

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-05 20:46:55 -08:00
Junio C Hamano 7e02a6c63a Kick-off the 1.7.9 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-05 15:49:34 -08:00
Junio C Hamano 77230236e3 Merge branch 'gh/userdiff-matlab'
* gh/userdiff-matlab:
  Add built-in diff patterns for MATLAB code
2011-12-05 15:26:21 -08:00
Junio C Hamano d7194d318b Merge branch 'nd/fsck-progress'
* nd/fsck-progress:
  fsck: print progress
  fsck: avoid reading every object twice
  verify_packfile(): check as many object as possible in a pack
  fsck: return error code when verify_pack() goes wrong
2011-12-05 15:11:07 -08:00
Junio C Hamano eb3b8d7658 Merge branch 'js/merge-edit-option'
* js/merge-edit-option:
  Documentation: fix formatting error in merge-options.txt
2011-12-05 11:15:52 -08:00
Jack Nagel aad2a07cfc Documentation: fix formatting error in merge-options.txt
The first paragraph inside of a list item does not need a preceding line
consisting of a single '+', and in fact this causes the text to be
misrendered. Fix it.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-05 11:15:45 -08:00
Junio C Hamano 406da78032 Git 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-02 10:02:52 -08:00
Junio C Hamano 0c5e70f041 gpg-interface: allow use of a custom GPG binary
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-29 12:30:02 -08:00
Junio C Hamano fc14b89a7e Git 1.7.8-rc4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-28 14:07:22 -08:00
Vincent van Ravesteijn d69bafcb36 builtin-reset: Documentation update
The second mode of 'git reset' is defined by the --patch
option, while the third mode is defined by the <mode> option.
Hence, these options are mandatory in the description of the
individual modes.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-23 13:24:54 -08:00
Junio C Hamano 017d1e1345 Update 1.7.8 draft release notes in preparation for rc4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 18:23:36 -08:00
Junio C Hamano 9fd389b650 Merge branch 'jn/revert-quit'
* jn/revert-quit:
  revert: remove --reset compatibility option
  revert: introduce --abort to cancel a failed cherry-pick
  revert: write REVERT_HEAD pseudoref during conflicted revert
  revert: improve error message for cherry-pick during cherry-pick
  revert: rearrange pick_revisions() for clarity
  revert: rename --reset option to --quit
2011-11-22 18:22:08 -08:00
Jonathan Nieder 539047c19e revert: introduce --abort to cancel a failed cherry-pick
After running some ill-advised command like "git cherry-pick
HEAD..linux-next", the bewildered novice may want to return to more
familiar territory.  Introduce a "git cherry-pick --abort" command
that rolls back the entire cherry-pick sequence and places the
repository back on solid ground.

Just like "git merge --abort", this internally uses "git reset
--merge", so local changes not involved in the conflict resolution are
preserved.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 18:16:59 -08:00
Jonathan Nieder f80a87262a revert: rename --reset option to --quit
The option to "git cherry-pick" and "git revert" to discard the
sequencer state introduced by v1.7.8-rc0~141^2~6 (revert: Introduce
--reset to remove sequencer state, 2011-08-04) has a confusing name.
Change it now, while we still have the time.

The new name for "cherry-pick, please get out of my way, since I've
long forgotten about the sequence of commits I was cherry-picking when
you wrote that old .git/sequencer directory" is --quit.  Mnemonic:
this is analagous to quiting a program the user is no longer using ---
we just want to get out of the multiple-command cherry-pick procedure
and not to reset HEAD or rewind any other old state.

The "--reset" option is kept as a synonym to minimize the impact.  We
might consider dropping it for simplicity in a separate patch, though.

Adjust documentation and tests to use the newly preferred name (--quit)
instead of --reset.  While at it, let's clarify the short descriptions
of these operations in "-h" output.

Before:

	--reset		forget the current operation
	--continue	continue the current operation

After:

	--quit		end revert or cherry-pick sequence
	--continue	resume revert or cherry-pick sequence

Noticed-by: Phil Hord <phil.hord@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 13:30:35 -08:00
Junio C Hamano e14d631988 Merge branch 'maint'
* maint:
  documentation fix: git difftool uses diff tools, not merge tools.
2011-11-21 14:30:45 -08:00
Thomas Hochstein 1e501a7c47 documentation fix: git difftool uses diff tools, not merge tools.
Let the documentation for -t list valid *diff* tools,
not valid *merge* tools.

Signed-off-by: Thomas Hochstein <thh@inter.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-21 09:14:34 -08:00
Junio C Hamano f56ef114ee Hopefully final update of release notes before 1.7.8 final
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-18 14:19:45 -08:00
Junio C Hamano 4c00c852b3 Sync with 1.7.7.4 2011-11-18 11:30:02 -08:00
Junio C Hamano bd5bce7cbc Git 1.7.7.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-18 11:28:05 -08:00
Junio C Hamano 4d2440fe0d Git 1.7.8-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-17 11:06:15 -08:00
Gustaf Hendeby 53b10a1405 Add built-in diff patterns for MATLAB code
MATLAB is often used in industry and academia for scientific
computations motivating it being included as a built-in pattern.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15 16:11:52 -08:00
Junio C Hamano 96b8d93a53 commit-tree: teach -m/-F options to read logs from elsewhere
Just like "git commit" does.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-12 22:25:07 -08:00
Junio C Hamano bc1bbe0c19 Git 1.7.8-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-12 22:14:53 -08:00
Junio C Hamano 8a04247896 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08 16:42:33 -08:00
Junio C Hamano 14ba45a2e6 Sync with 1.7.7.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08 16:38:14 -08:00
Junio C Hamano d4d5ab4727 Git 1.7.7.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08 16:37:00 -08:00
Junio C Hamano fcbebfdd33 docs: Update install-doc-quick
The preformatted documentation pages live in their own repositories
these days. Adjust the installation procedure to the updated layout.

Tested-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08 13:37:10 -08:00
Jeff King 939ca96b0e docs: don't mention --quiet or --exit-code in git-log(1)
These are diff-options, but they don't actually make sense
in the context of log.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08 13:37:02 -08:00
Junio C Hamano 4cb6764227 Git 1.7.8-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-07 16:48:34 -08:00
Ævar Arnfjörð Bjarmason 6b37dff17f pull: introduce a pull.rebase option to enable --rebase
Currently we either need to set branch.<name>.rebase for existing
branches if we'd like "git pull" to mean "git pull --rebase", or have
the forethought of setting "branch.autosetuprebase" before we create
the branch.

Introduce a "pull.rebase" option to globally configure "git pull" to
mean "git pull --rebase" for any branch.

This option will be considered at a lower priority than
branch.<name>.rebase, i.e. we could set pull.rebase=true and
branch.<name>.rebase=false and the latter configuration option would
win.

Reviewed-by: Sverre Rabbelier <srabbelier@gmail.com>
Reviewed-by: Fernando Vezzosi <buccia@repnz.net>
Reviewed-by: Eric Herman <eric@freesa.org>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Liked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-07 08:43:11 -08:00
Nguyễn Thái Ngọc Duy 1e49f22f07 fsck: print progress
fsck is usually a long process and it would be nice if it prints
progress from time to time.

Progress meter is not printed when --verbose is given because
--verbose prints a lot, there's no need for "alive" indicator.
Progress meter may provide "% complete" information but it would
be lost anyway in the flood of text.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-06 20:31:28 -08:00
Junio C Hamano 87bf9a7048 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-01 16:44:57 -07:00
Junio C Hamano 79eec363d2 Sync with 1.7.7.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-01 16:43:50 -07:00
Junio C Hamano 8d19b44b31 Git 1.7.7.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-01 16:41:57 -07:00
Junio C Hamano be3fa9125e Git 1.7.8-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-30 19:14:24 -07:00
Junio C Hamano e8e1c29021 Update draft release notes to 1.7.8
Getting very close to -rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 12:06:44 -07:00
Junio C Hamano 425c771534 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-26 16:23:26 -07:00
Junio C Hamano 208a1cc3d3 Merge branch 'lh/gitweb-site-html-head'
* lh/gitweb-site-html-head:
  gitweb: provide a way to customize html headers
2011-10-26 16:16:31 -07:00
Junio C Hamano 60f60b4962 Merge branch 'jk/argv-array' into maint
* jk/argv-array:
  run_hook: use argv_array API
  checkout: use argv_array API
  bisect: use argv_array API
  quote: provide sq_dequote_to_argv_array
  refactor argv_array into generic code
  quote.h: fix bogus comment
  add sha1_array API docs
2011-10-26 16:13:31 -07:00
Junio C Hamano a5ad8d1bdd Merge branch 'cn/eradicate-working-copy' into maint
* cn/eradicate-working-copy:
  Remove 'working copy' from the documentation and C code
2011-10-26 16:13:31 -07:00
Junio C Hamano f0911b996c Merge branch 'maint-1.7.6' into maint
* maint-1.7.6:
  notes_merge_commit(): do not pass temporary buffer to other function
  gitweb: Fix links to lines in blobs when javascript-actions are enabled
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files
  t9159-*.sh: skip for mergeinfo test for svn <= 1.4
  date.c: Support iso8601 timezone formats
  remote: only update remote-tracking branch if updating refspec
  remote rename: warn when refspec was not updated
  remote: "rename o foo" should not rename ref "origin/bar"
  remote: write correct fetch spec when renaming remote 'remote'
2011-10-26 16:13:27 -07:00
Junio C Hamano 87d99c64df Merge branch 'jm/mergetool-pathspec' into maint-1.7.6
* jm/mergetool-pathspec:
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files
2011-10-26 16:12:25 -07:00
Junio C Hamano 411e6cf197 Merge branch 'maint-1.7.6' into maint
* maint-1.7.6:
  make the sample pre-commit hook script reject names with newlines, too
  git-read-tree.txt: update sparse checkout examples
  git-read-tree.txt: correct sparse-checkout and skip-worktree description
  git-read-tree.txt: language and typography fixes
  unpack-trees: print "Aborting" to stderr
  Documentation/git-update-index: refer to 'ls-files'
  Documentation: basic configuration of notes.rewriteRef
2011-10-26 16:09:28 -07:00
Junio C Hamano 588150b023 Merge branch 'tr/doc-note-rewrite' into maint-1.7.6
* tr/doc-note-rewrite:
  Documentation: basic configuration of notes.rewriteRef
2011-10-26 16:09:04 -07:00
Junio C Hamano 139088b78b Merge branch 'nd/sparse-doc' into maint-1.7.6
* nd/sparse-doc:
  git-read-tree.txt: update sparse checkout examples
2011-10-26 16:09:04 -07:00
Junio C Hamano df9701e28c Merge branch 'mg/maint-doc-sparse-checkout' into maint-1.7.6
* mg/maint-doc-sparse-checkout:
  git-read-tree.txt: correct sparse-checkout and skip-worktree description
  git-read-tree.txt: language and typography fixes
  unpack-trees: print "Aborting" to stderr
2011-10-26 16:09:03 -07:00
Junio C Hamano a574c04fbf Merge branch 'maint-1.7.5' into maint-1.7.6
* maint-1.7.5:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:19 -07:00
Junio C Hamano 69d61daec7 Merge branch 'maint-1.7.4' into maint-1.7.5
* maint-1.7.4:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:14 -07:00
Junio C Hamano ed36a48e6d Merge branch 'maint-1.7.3' into maint-1.7.4
* maint-1.7.3:
  make the sample pre-commit hook script reject names with newlines, too
  Reindent closing bracket using tab instead of spaces
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:08 -07:00
Junio C Hamano eb4e67288b Merge branch 'sn/doc-update-index-assume-unchanged' into maint-1.7.3
* sn/doc-update-index-assume-unchanged:
  Documentation/git-update-index: refer to 'ls-files'
2011-10-26 16:08:00 -07:00
Junio C Hamano 10b2a48113 Merge branch 'maint'
* maint:
  Git 1.7.7.1
  RelNotes/1.7.7.1: setgid bit patch is about fixing "git init" via Makefile setting

Conflicts:
	GIT-VERSION-GEN
2011-10-23 21:49:14 -07:00
Junio C Hamano f7d958dff5 Git 1.7.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-23 21:48:06 -07:00
Jonathan Nieder 7fe74f52f9 RelNotes/1.7.7.1: setgid bit patch is about fixing "git init" via Makefile setting
The change was actually about "git init -s" which sets the setgid bit on
SysV-style systems to allow shared access to a repository, and can provoke
errors on BSD-style systems, depending on how permissive the filesystem in
use wants to be.

More to the point, the patch was just taking a fix that arrived for
FreeBSD in v1.5.5 days and making it also apply to machines using an
(obscure) GNU userland/FreeBSD kernel mixture.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-23 21:16:31 -07:00
Junio C Hamano e454a83fa2 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-21 16:05:42 -07:00
Junio C Hamano 9ee3d37743 Merge branch 'po/insn-editor'
* po/insn-editor:
  "rebase -i": support special-purpose editor to edit insn sheet
2011-10-21 16:04:37 -07:00
Junio C Hamano abe2773019 Merge branch 'cn/doc-config-bare-subsection'
* cn/doc-config-bare-subsection:
  Documentation: update [section.subsection] to reflect what git does
2011-10-21 16:04:33 -07:00
Junio C Hamano e75a59adfc Merge branch 'jk/daemon-msgs'
* jk/daemon-msgs:
  daemon: give friendlier error messages to clients

Conflicts:
	daemon.c
2011-10-21 16:04:32 -07:00
Junio C Hamano 8963314c77 Sync with maint 2011-10-21 11:24:34 -07:00
Junio C Hamano 8742218f21 Almost ready for 1.7.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-21 11:01:07 -07:00
Junio C Hamano 713b85c758 Merge branch 'rs/diff-cleanup-records-fix' into maint
* rs/diff-cleanup-records-fix:
  diff: resurrect XDF_NEED_MINIMAL with --minimal
  Revert removal of multi-match discard heuristic in 27af01
2011-10-21 10:49:25 -07:00
Lénaïc Huard c1355b7ffb gitweb: provide a way to customize html headers
This allows web sites to add some specific html headers to the pages
generated by gitweb.

The new variable $site_html_head_string can be set to an html snippet that
will be inserted at the end of the <head> section of each page generated
by gitweb.

Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr.eu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-21 10:18:37 -07:00
Junio C Hamano 87009edcbd Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-19 11:02:13 -07:00
Junio C Hamano 3dfbe68fc2 Merge branch 'js/merge-edit-option'
* js/merge-edit-option:
  Teach merge the '[-e|--edit]' option

Conflicts:
	builtin/merge.c
2011-10-19 10:49:27 -07:00
Junio C Hamano 9b55aa03da Merge branch 'rs/diff-whole-function'
* rs/diff-whole-function:
  diff: add option to show whole functions as context
  xdiff: factor out get_func_line()
2011-10-19 10:49:13 -07:00
Junio C Hamano 380f26c29b Merge branch 'jn/gitweb-manpages'
* jn/gitweb-manpages:
  gitweb: Add gitweb manpages to 'gitweb' package in git.spec
  Documentation: Add gitweb config variables to git-config(1)
  Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages
  gitweb: Add gitweb(1) manpage for gitweb itself
  gitweb: Add gitweb.conf(5) manpage for gitweb configuration files
2011-10-18 21:59:11 -07:00
Junio C Hamano 08cfdbb88c Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17 22:08:25 -07:00
Peter Oberndorfer 821881d88d "rebase -i": support special-purpose editor to edit insn sheet
The insn sheet used by "rebase -i" is designed to be easily editable by
any text editor, but an editor that is specifically meant for it (but
is otherwise unsuitable for editing regular text files) could be useful
by allowing drag & drop reordering in a GUI environment, for example.

The GIT_SEQUENCE_EDITOR environment variable and/or the sequence.editor
configuration variable can be used to specify such an editor, while
allowing the usual editor to be used to edit commit log messages. As
usual, the environment variable takes precedence over the configuration
variable.

It is envisioned that other "sequencer" based tools will use the same
mechanism.

Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17 14:40:07 -07:00
Jakub Narebski cd82323fbc Documentation: Add gitweb config variables to git-config(1)
Add a list of gitweb config variables to git-config(1) manpage, just
linking to gitweb(1) or gitweb.conf(5).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16 11:09:35 -07:00
Jakub Narebski 86ce2d5482 Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages
Add link to gitweb(1) in "SEE ALSO" section of git-instaweb(1) manpage,
and "Ancillary Commands" section of git(1) manpage (the latter by the
way of command-list.txt file).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16 11:09:35 -07:00
Jakub Narebski 07ea4df278 gitweb: Add gitweb(1) manpage for gitweb itself
Most of what is in gitweb.txt it has been pulled directly from the
README and INSTALL files of gitweb.

Current version is somewhat based on structure of SVN::Web manpage
(one of web interfaces for Subversion).

gitweb.conf(5) i.e. gitweb configuration manpage now refers to
appropriate sections in gitweb(1).  gitweb/README now refers to
gitweb/INSTALL and gitweb(1) manpage.  gitweb/INSTALL now refers to
gitweb.conf(5) and gitweb(1).

Inspired-by: Drew Northup <drew.northup@maine.edu>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16 11:09:34 -07:00
Drew Northup 6d3902b0d0 gitweb: Add gitweb.conf(5) manpage for gitweb configuration files
Much of what is in gitweb.conf.txt has been pulled directly from the
README file of gitweb.  The manpage was supplemented with description
of missing gitweb config variables, and with description of gitweb's
%features.

There remains a bit of redundancy, which should be reduced if
possible... but I think some of duplication of information is
inevitable.

[jn: Improved, extended, removed duplicate info from README]

Signed-off-by: Drew Northup <drew.northup@maine.edu>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16 11:09:34 -07:00
Junio C Hamano 05f6edcd2a Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16 10:58:35 -07:00
Frédéric Heitzmann afd7f1eb0f git svn dcommit: new option --interactive.
Allow the user to check the patch set before it is commited to SVN. It is
then possible to accept/discard one patch, accept all, or quit.

This interactive mode is similar with 'git send email' behaviour. However,
'git svn dcommit' returns as soon as one patch is discarded.
Part of the code was taken from git-send-email.perl (see 'ask' function)

Tests several combinations of potential answers to
'git svn dcommit --interactive'. For each of them, test whether patches
were commited to SVN or not.

Thanks-to Eric Wong <normalperson@yhbt.net> for the initial idea.

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Frédéric Heitzmann <frederic.heitzmann@gmail.com>
2011-10-16 08:12:26 +00:00
Carlos Martín Nieto f737632938 Documentation: update [section.subsection] to reflect what git does
Using the [section.subsection] syntax, the subsection is transformed
to lower-case and is matched case sensitively. Say so in the
documentation and mention that you shouldn't be using it anyway.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16 00:22:31 -07:00
Jeff King d5570f4d2c daemon: give friendlier error messages to clients
When the git-daemon is asked about an inaccessible repository, it simply
hangs up the connection without saying anything further. This makes it
hard to distinguish between a repository we cannot access (e.g., due to
typo), and a service or network outage.

Instead, let's print an "ERR" line, which git clients understand since
v1.6.1 (2008-12-24).

Because there is a risk of leaking information about non-exported
repositories, by default all errors simply say "access denied or
repository not exported". Sites which don't have hidden repositories, or
don't care, can pass a flag to turn on more specific messages.

Signed-off-by: Jeff King <peff@peff.net>
Helped-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15 21:15:06 -07:00
Junio C Hamano 288396994f Sync with maint
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15 20:59:50 -07:00
Junio C Hamano 16b3b2d969 Prepare for 1.7.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15 20:55:12 -07:00
Junio C Hamano c9e7aa4f68 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-13 22:18:04 -07:00
Junio C Hamano 3022386fee Merge branch 'jn/ident-from-etc-mailname'
* jn/ident-from-etc-mailname:
  ident: do not retrieve default ident when unnecessary
  ident: check /etc/mailname if email is unknown
2011-10-13 19:03:24 -07:00
Junio C Hamano ab1e76b88c Merge branch 'jc/grep-untracked-exclude'
* jc/grep-untracked-exclude:
  grep: teach --untracked and --exclude-standard options
2011-10-13 19:03:23 -07:00
Junio C Hamano 7a63a920fd Merge branch 'rs/diff-cleanup-records-fix'
* rs/diff-cleanup-records-fix:
  diff: resurrect XDF_NEED_MINIMAL with --minimal
  Revert removal of multi-match discard heuristic in 27af01
2011-10-13 19:03:22 -07:00
Jay Soffian 66f4b98ad9 Teach merge the '[-e|--edit]' option
Implemented internally instead of as "git merge --no-commit && git commit"
so that "merge --edit" is otherwise consistent (hooks, etc) with "merge".

Note: the edit message does not include the status information that one
gets with "commit --status" and it is cleaned up after editing like one
gets with "commit --cleanup=default". A later patch could add the status
information if desired.

Note: previously we were not calling stripspace() after running the
prepare-commit-msg hook. Now we are, stripping comments and
leading/trailing whitespace lines if --edit is given, otherwise only
stripping leading/trailing whitespace lines if not given --edit.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-12 13:17:18 -07:00
Junio C Hamano 34c4461ae3 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-12 12:42:44 -07:00
Junio C Hamano 5366afaede Merge branch 'cb/do-not-pretend-to-hijack-long-help'
* cb/do-not-pretend-to-hijack-long-help:
  use -h for synopsis and --help for manpage consistently
2011-10-12 12:34:30 -07:00
Junio C Hamano a99c247c53 Merge branch 'nd/document-err-packet'
* nd/document-err-packet:
  pack-protocol: document "ERR" line
2011-10-12 12:34:18 -07:00
Junio C Hamano af543833d4 Merge branch 'jc/parse-options-boolean'
* jc/parse-options-boolean:
  apply: use OPT_NOOP_NOARG
  revert: use OPT_NOOP_NOARG
  parseopt: add OPT_NOOP_NOARG
  archive.c: use OPT_BOOL()
  parse-options: deprecate OPT_BOOLEAN

Conflicts:
	builtin/revert.c
2011-10-12 12:34:15 -07:00
Junio C Hamano 8b0e15fa95 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-10 16:14:59 -07:00
Junio C Hamano bf604e64fb Merge branch 'nd/sparse-doc'
* nd/sparse-doc:
  git-read-tree.txt: update sparse checkout examples
2011-10-10 15:56:20 -07:00
Junio C Hamano 9bd500048d Merge branch 'mh/check-ref-format-3'
* mh/check-ref-format-3: (23 commits)
  add_ref(): verify that the refname is formatted correctly
  resolve_ref(): expand documentation
  resolve_ref(): also treat a too-long SHA1 as invalid
  resolve_ref(): emit warnings for improperly-formatted references
  resolve_ref(): verify that the input refname has the right format
  remote: avoid passing NULL to read_ref()
  remote: use xstrdup() instead of strdup()
  resolve_ref(): do not follow incorrectly-formatted symbolic refs
  resolve_ref(): extract a function get_packed_ref()
  resolve_ref(): turn buffer into a proper string as soon as possible
  resolve_ref(): only follow a symlink that contains a valid, normalized refname
  resolve_ref(): use prefixcmp()
  resolve_ref(): explicitly fail if a symlink is not readable
  Change check_refname_format() to reject unnormalized refnames
  Inline function refname_format_print()
  Make collapse_slashes() allocate memory for its result
  Do not allow ".lock" at the end of any refname component
  Refactor check_refname_format()
  Change check_ref_format() to take a flags argument
  Change bad_ref_char() to return a boolean value
  ...
2011-10-10 15:56:18 -07:00
Junio C Hamano 5fbdb9c2e8 Merge branch 'jm/mergetool-pathspec'
* jm/mergetool-pathspec:
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files
2011-10-10 15:56:18 -07:00
Junio C Hamano 61f9db7a50 Merge branch 'hv/submodule-update-none'
* hv/submodule-update-none:
  add update 'none' flag to disable update of submodule by default
  submodule: move update configuration variable further up
2011-10-10 15:56:17 -07:00
Junio C Hamano efc5fb6a77 Merge branch 'fg/submodule-git-file-git-dir'
* fg/submodule-git-file-git-dir:
  Move git-dir for submodules
  rev-parse: add option --resolve-git-dir <path>

Conflicts:
	cache.h
	git-submodule.sh
2011-10-10 15:56:17 -07:00
René Scharfe 14937c2c06 diff: add option to show whole functions as context
Add the option -W/--function-context to git diff.  It is similar to
the same option of git grep and expands the context of change hunks
so that the whole surrounding function is shown.  This "natural"
context can allow changes to be understood better.

Note: GNU patch doesn't like diffs generated with the new option;
it seems to expect context lines to be the same before and after
changes.  git apply doesn't complain.

This implementation has the same shortcoming as the one in grep,
namely that there is no way to explicitly find the end of a
function.  That means that a few lines of extra context are shown,
right up to the next recognized function begins.  It's already
useful in its current form, though.

The function get_func_line() in xdiff/xemit.c is extended to work
forward as well as backward to find post-context as well as
pre-context.  It returns the position of the first found matching
line.  The func_line parameter is made optional, as we don't need
it for -W.

The enhanced function is then used in xdl_emit_diff() to extend
the context as needed.  If the added context overlaps with the
next change, it is merged into the current hunk.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-10 12:05:07 -07:00
Junio C Hamano b7200e8397 branch: teach --edit-description option
Using branch.$name.description as the configuration key, give users a
place to write about what the purpose of the branch is and things like
that, so that various subsystems, e.g. "push -s", "request-pull", and
"format-patch --cover-letter", can later be taught to use this
information.

The "-m" option similar to "commit/tag" is deliberately omitted, as the
whole point of branch description is about giving descriptive information
(the name of the branch itself is a better place for information that fits
on a single-line).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:51:26 -07:00
Michael Haggerty a40e6fb67a Change check_refname_format() to reject unnormalized refnames
Since much of the infrastructure does not work correctly with
unnormalized refnames, change check_refname_format() to reject them.

Similarly, change "git check-ref-format" to reject unnormalized
refnames by default.  But add an option --normalize, which causes "git
check-ref-format" to normalize the refname before checking its format,
and print the normalized refname.  This is exactly the behavior of the
old --print option, which is retained but deprecated.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:30 -07:00
Michael Haggerty 7e9d2fe960 Do not allow ".lock" at the end of any refname component
Allowing any refname component to end with ".lock" is looking for
trouble; for example,

    $ git br foo.lock/bar
    $ git br foo
    fatal: Unable to create '[...]/.git/refs/heads/foo.lock': File exists.

Therefore, do not allow any refname component to end with ".lock".

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:30 -07:00
Michael Haggerty e4ed6105ec git check-ref-format: add options --allow-onelevel and --refspec-pattern
Also add tests of the new options.  (Actually, one big reason to add
the new options is to make it easy to test check_ref_format(), though
the options should also be useful to other scripts.)

Interpret the result of check_ref_format() based on which types of
refnames are allowed.  However, because check_ref_format() can only
return a single value, one test case is still broken.  Specifically,
the case "git check-ref-format --onelevel '*'" incorrectly succeeds
because check_ref_format() returns CHECK_REF_FORMAT_ONELEVEL for this
refname even though the refname is also CHECK_REF_FORMAT_WILDCARD.
The type of check that leads to this failure is used elsewhere in
"real" code and could lead to bugs; it will be fixed over the next few
commits.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:29 -07:00
Junio C Hamano 7f41b6bbe3 Post 1.7.7 first wave
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 12:54:35 -07:00
Junio C Hamano 83d6b33db6 Merge branch 'js/check-attr-cached'
* js/check-attr-cached:
  t0003: remove extra whitespaces
  Teach '--cached' option to check-attr
2011-10-05 12:36:27 -07:00
Junio C Hamano 9a33b691aa Merge branch 'cn/eradicate-working-copy'
* cn/eradicate-working-copy:
  Remove 'working copy' from the documentation and C code
2011-10-05 12:36:26 -07:00
Junio C Hamano f6be8fbcba Merge branch 'sn/doc-update-index-assume-unchanged'
* sn/doc-update-index-assume-unchanged:
  Documentation/git-update-index: refer to 'ls-files'
2011-10-05 12:36:25 -07:00
Junio C Hamano 5fbef463a1 Merge branch 'mg/maint-doc-sparse-checkout'
* mg/maint-doc-sparse-checkout:
  git-read-tree.txt: correct sparse-checkout and skip-worktree description
  git-read-tree.txt: language and typography fixes
  unpack-trees: print "Aborting" to stderr
2011-10-05 12:36:25 -07:00
Junio C Hamano 7a95d1be03 Merge branch 'jk/argv-array'
* jk/argv-array:
  run_hook: use argv_array API
  checkout: use argv_array API
  bisect: use argv_array API
  quote: provide sq_dequote_to_argv_array
  refactor argv_array into generic code
  quote.h: fix bogus comment
  add sha1_array API docs
2011-10-05 12:36:24 -07:00
Junio C Hamano b5b6521645 Merge branch 'tr/doc-note-rewrite'
* tr/doc-note-rewrite:
  Documentation: basic configuration of notes.rewriteRef
2011-10-05 12:36:24 -07:00
Junio C Hamano 1077bf1ff6 Merge branch 'mg/branch-list'
* mg/branch-list:
  t3200: clean up checks for file existence
  branch: -v does not automatically imply --list
  branch: allow pattern arguments
  branch: introduce --list option
  git-branch: introduce missing long forms for the options
  git-tag: introduce long forms for the options
  t6040: test branch -vv

Conflicts:
	Documentation/git-tag.txt
	t/t3200-branch.sh
2011-10-05 12:36:23 -07:00
Junio C Hamano 4e20e36799 Merge branch 'jk/for-each-ref'
* jk/for-each-ref:
  for-each-ref: add split message parts to %(contents:*).
  for-each-ref: handle multiline subjects like --pretty
  for-each-ref: refactor subject and body placeholder parsing
  t6300: add more body-parsing tests
  t7004: factor out gpg setup
2011-10-05 12:36:22 -07:00
Junio C Hamano ca0c9764bf Merge branch 'jc/fetch-pack-fsck-objects'
* jc/fetch-pack-fsck-objects:
  test: fetch/receive with fsckobjects
  transfer.fsckobjects: unify fetch/receive.fsckobjects
  fetch.fsckobjects: verify downloaded objects

Conflicts:
	Documentation/config.txt
	builtin/fetch-pack.c
2011-10-05 12:36:20 -07:00
Junio C Hamano cd4093b603 Merge branch 'rr/revert-cherry-pick-continue'
* rr/revert-cherry-pick-continue:
  builtin/revert.c: make commit_list_append() static
  revert: Propagate errors upwards from do_pick_commit
  revert: Introduce --continue to continue the operation
  revert: Don't implicitly stomp pending sequencer operation
  revert: Remove sequencer state when no commits are pending
  reset: Make reset remove the sequencer state
  revert: Introduce --reset to remove sequencer state
  revert: Make pick_commits functionally act on a commit list
  revert: Save command-line options for continuing operation
  revert: Save data for continuing after conflict resolution
  revert: Don't create invalid replay_opts in parse_args
  revert: Separate cmdline parsing from functional code
  revert: Introduce struct to keep command-line options
  revert: Eliminate global "commit" variable
  revert: Rename no_replay to record_origin
  revert: Don't check lone argument in get_encoding
  revert: Simplify and inline add_message_to_msg
  config: Introduce functions to write non-standard file
  advice: Introduce error_resolve_conflict
2011-10-05 12:36:19 -07:00
Clemens Buchacher 87182b17ed use -h for synopsis and --help for manpage consistently
A few scripted Porcelain implementations pretend as if the routine to show
their own help messages are triggered upon "git cmd --help", but a command
line parser of "git" will hijack such a request and shows the manpage for
the cmd subcommand.

Leaving the code to handle such input is simply misleading.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 10:47:10 -07:00
Junio C Hamano dbfae86a7b Merge branch 'jc/maint-grep-untracked-exclude' into jc/grep-untracked-exclude
* jc/maint-grep-untracked-exclude:
  grep: teach --untracked and --exclude-standard options
  grep --no-index: don't use git standard exclusions
  grep: do not use --index in the short usage output

Conflicts:
	Documentation/git-grep.txt
	builtin/grep.c
2011-10-04 18:40:41 -07:00
Junio C Hamano 0a93fb8a9c grep: teach --untracked and --exclude-standard options
In a working tree of a git managed repository, "grep --untracked" would
find the specified patterns from files in untracked files in addition to
its usual behaviour of finding them in the tracked files.

By default, when working with "--no-index" option, "grep" does not pay
attention to .gitignore mechanism. "grep --no-index --exclude-standard"
can be used to tell the command to use .gitignore and stop reporting hits
from files that would be ignored. Also, when working without "--no-index",
"grep" honors .gitignore mechanism, and "grep --no-exclude-standard" can
be used to tell the command to include hits from files that are ignored.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-04 18:33:45 -07:00
Nguyen Thai Ngoc Duy d78e5aecf9 pack-protocol: document "ERR" line
Since a807328 (connect.c: add a way for git-daemon to pass an error
back to client), git client recognizes "ERR" line and prints a
friendly message to user if an error happens at server side.

Document this.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03 14:57:36 -07:00
Jonathan Nieder 8a55caa8a3 ident: check /etc/mailname if email is unknown
Before falling back to gethostname(), check /etc/mailname if
GIT_AUTHOR_EMAIL is not set in the environment or through config
files.  Only fall back if /etc/mailname cannot be opened or read.

The /etc/mailname convention comes from Debian policy section 11.6
("mail transport, delivery and user agents"), though maybe it could be
useful sometimes on other machines, too.  The lack of this support was
noticed by various people in different ways:

 - Ian observed that git was choosing the address
   'ian@anarres.relativity.greenend.org.uk' rather than
   'ian@davenant.greenend.org.uk' as it should have done.

 - Jonathan noticed that operations like "git commit" were needlessly
   slow when using a resolver that was slow to handle reverse DNS
   lookups.

Alas, after this patch, if /etc/mailname is set up and the [user] name
and email configuration aren't, the committer email will not provide a
charming reminder of which machine commits were made on any more.  But
I think it's worth it.

Mechanics: the functionality of reading mailname goes in its own
function, so people who care about other distros can easily add an
implementation to a similar location without making copy_email() too
long and losing clarity.  While at it, we split out the fallback
default logic that does gethostname(), too (rearranging it a little
and adding a check for errors from gethostname while at it).

Based on a patch by Gerrit Pape <pape@smarden.org>.

Requested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03 12:00:44 -07:00
Junio C Hamano 81b568c839 diff: resurrect XDF_NEED_MINIMAL with --minimal
Earlier, 582aa00 (git diff too slow for a file, 2010-05-02)
unconditionally dropped XDF_NEED_MINIMAL option from the internal xdiff
invocation to help performance on pathological cases, while hinting that a
follow-up patch could reintroduce it with "--minimal" option from the
command line.

Make it so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03 11:58:18 -07:00
Junio C Hamano 703f05ad58 Git 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-30 14:20:57 -07:00
René Scharfe 6acec0380b parseopt: add OPT_NOOP_NOARG
Add OPT_NOOP_NOARG, a helper macro to define deprecated options in a
standard way.  The help text is taken from the no-op option -r of
git revert.

The callback could be made to emit a (conditional?) warning later.  And
we could also add OPT_NOOP (requiring an argument) etc. as needed.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-28 12:46:21 -07:00
Junio C Hamano b04ba2bb42 parse-options: deprecate OPT_BOOLEAN
It is natural to expect that an option defined with OPT_BOOLEAN() could be
used in this way:

	int option = -1; /* unspecified */

	struct option options[] = {
		OPT_BOOLEAN(0, "option", &option, "set option"),
                OPT_END()
	};
	parse_options(ac, av, prefix, options, usage, 0);

        if (option < 0)
        	... do the default thing ...
	else if (!option)
		... --no-option was given ...
	else
		... --option was given ...

to easily tell three cases apart:

 - There is no mention of the `--option` on the command line;
 - The variable is positively set with `--option`; or
 - The variable is explicitly negated with `--no-option`.

Unfortunately, this is not the case. OPT_BOOLEAN() increments the variable
every time `--option` is given, and resets it to zero when `--no-option`
is given.

As a first step to remedy this, introduce a true boolean OPT_BOOL(), and
rename OPT_BOOLEAN() to OPT_COUNTUP(). To help transitioning, OPT_BOOLEAN
and OPTION_BOOLEAN are defined as deprecated synonyms to OPT_COUNTUP and
OPTION_COUNTUP respectively.

This is what db7244b (parse-options new features., 2007-11-07) from four
years ago started by marking OPTION_BOOLEAN as "INCR would have been a
better name".

Some existing users do depend on the count-up semantics; for example,
users of OPT__VERBOSE() could use it to raise the verbosity level with
repeated use of `-v` on the command line, but they probably should be
rewritten to use OPT__VERBOSITY() instead these days.  I suspect that some
users of OPT__FORCE() may also use it to implement different level of
forcibleness but I didn't check.

On top of this patch, here are the remaining clean-up tasks that other
people can help:

 - Look at each hit in "git grep -e OPT_BOOLEAN"; trace all uses of the
   value that is set to the underlying variable, and if it can proven that
   the variable is only used as a boolean, replace it with OPT_BOOL(). If
   the caller does depend on the count-up semantics, replace it with
   OPT_COUNTUP() instead.

 - Same for OPTION_BOOLEAN; replace it with OPTION_SET_INT and arrange to
   set 1 to the variable for a true boolean, and otherwise replace it with
   OPTION_COUNTUP.

 - Look at each hit in "git grep -e OPT__VERBOSE -e OPT__QUIET" and see if
   they can be replaced with OPT__VERBOSITY().

I'll follow this message up with a separate patch as an example.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-27 17:00:04 -07:00
Junio C Hamano 614583fa23 Merge branch 'jc/namespace-doc-with-old-asciidoc'
* jc/namespace-doc-with-old-asciidoc:
  Documentation/gitnamespaces.txt: cater to older asciidoc
2011-09-26 10:50:08 -07:00
Nguyễn Thái Ngọc Duy 5e82123197 git-read-tree.txt: update sparse checkout examples
The negation example uses '*' to match everything. This used to work
before 9037026 (unpack-trees: fix sparse checkout's "unable to match
directories") because back then, the list of paths is used to match
sparse patterns, so with the patterns

    *
    !subdir/

subdir/ always matches any path that start with subdir/ and "*" has no
chance to get tested. The result is subdir is excluded.

After the said commit, a tree structure is dynamically created and
sparse pattern matching now follows closely how read_directory()
applies .gitignore. This solves one problem, but reveals another one.

With this new strategy, "!subdir/" rule will be only tested once when
"subdir" directory is examined. Entries inside subdir, when examined,
will match "*" and are (correctly) re-added again because any rules
without a slash will match at every directory level. In the end, "*"
can revert every negation rules.

In order to correctly exclude subdir, we must use

    /*
    !subdir

to limit "match all" rule at top level only.

"*" rule has no actual use in sparse checkout and can be confusing to
users. While we can automatically turn "*" to "/*", this violates
.gitignore definition. Instead, discourage "*" in favor of "/*" (in
the second example).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-26 10:00:44 -07:00
Jonathon Mah 3e8e691abe mergetool: Use args as pathspec to unmerged files
Mergetool now treats its path arguments as a pathspec (like other git
subcommands), restricting action to the given files and directories.
Files matching the pathspec are filtered so mergetool only acts on
unmerged paths; previously it would assume each path argument was in an
unresolved state, and get confused when it couldn't check out their
other stages.

Running "git mergetool subdir" will prompt to resolve all conflicted
blobs under subdir.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-26 09:39:36 -07:00
Junio C Hamano 85e9c7e1d4 Git 1.7.7-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 15:35:57 -07:00
Junio C Hamano b7619006eb Merge 1.7.6.4 in
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 15:31:08 -07:00
Junio C Hamano 6320526415 Git 1.7.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 14:43:05 -07:00
Jay Soffian b2b3e9c2d6 Teach '--cached' option to check-attr
This option causes check-attr to consider .gitattributes only from
the index, ignoring .gitattributes from the working tree. This allows
the command to be used in situations where a working tree does not exist.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-22 16:38:22 -07:00
Michael J Gruber 1f1f575ebe git-read-tree.txt: correct sparse-checkout and skip-worktree description
The description of .git/info/sparse-checkout and
skip-worktree is exactly the opposite of what is true, which is:

If a file matches a pattern in sparse-checkout, then (it is to be
checked out and therefore) skip-worktree is unset for that file;
otherwise, it is set (so that it is not checked out).

Currently, the opposite is documented, and (consistently) read-tree's
behavior with respect to bit flips is descibed incorrectly.

Fix it.

In hindsight, it would have been much better to have a "sparse-ignore"
or "sparse-skip" file so that an empty file would mean a full checkout,
and the file logic would be analogous to that of .gitignore, excludes
and skip-worktree.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 15:05:53 -07:00
Michael J Gruber cc1a2b66e9 git-read-tree.txt: language and typography fixes
Fix a few missing articles and such, and mark-up 'commands' and `files`
appropriately.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 15:05:53 -07:00
Carlos Martín Nieto f7d650c06e Remove 'working copy' from the documentation and C code
The git term is 'working tree', so replace the most public references
to 'working copy'.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 14:26:38 -07:00
Stefan Naewe acd6d7e70a Documentation/git-update-index: refer to 'ls-files'
'ls-files' refers to 'update-index' to show how the 'assume unchanged'
bit can be seen. This makes the connection 'bi-directional'.

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21 05:00:20 -07:00
Junio C Hamano 167a5800cb Git 1.7.7-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-18 15:41:34 -07:00
Junio C Hamano 4c1be38b4a Documentation/gitnamespaces.txt: cater to older asciidoc
Older asciidoc (e.g. 8.2.5 on Centos 5.5) is unhappy if a manpage does not
have a SYNOPSIS section. Show a sample (and a possibly bogus) command line
of running two commands that pay attention to this environment variable
with a customized value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-09-16 09:20:23 -07:00
Jeff King c1189caeaf refactor argv_array into generic code
The submodule code recently grew generic code to build a
dynamic argv array. Many other parts of the code can reuse
this, too, so let's make it generically available.

There are two enhancements not found in the original code:

  1. We now handle the NULL-termination invariant properly,
     even when no strings have been pushed (before, you
     could have an empty, NULL argv). This was not a problem
     for the submodule code, which always pushed at least
     one argument, but was not sufficiently safe for
     generic code.

  2. There is a formatted variant of the "push" function.
     This is a convenience function which was not needed by
     the submodule code, but will make it easier to port
     other users to the new code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-14 11:56:36 -07:00
Jeff King 163ed566db add sha1_array API docs
This API was introduced in 902bb36, but never documented.
Let's be nice to future users of the code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-14 11:44:05 -07:00
Thomas Rast 2b4aa89c27 Documentation: basic configuration of notes.rewriteRef
Users had problems finding a working setting for notes.rewriteRef.
Document how to enable rewriting for notes/commits, which should be a
safe setting.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-13 08:35:38 -07:00
Bryan Jacobs 1e5814f3de git-svn: teach git-svn to populate svn:mergeinfo
Allow git-svn to populate the svn:mergeinfo property automatically in
a narrow range of circumstances. Specifically, when dcommitting a
revision with multiple parents, all but (potentially) the first of
which have been committed to SVN in the same repository as the target
of the dcommit.

In this case, the merge info is the union of that given by each of the
parents, plus all changes introduced to the first parent by the other
parents.

In all other cases where a revision to be committed has multiple
parents, cause "git svn dcommit" to raise an error rather than
completing the commit and potentially losing history information in
the upstream SVN repository.

This behavior is disabled by default, and can be enabled by setting
the svn.pushmergeinfo config option.

[ew: minor style changes and manpage merge fix]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Bryan Jacobs <bjacobs@woti.com>
2011-09-13 08:12:13 +00:00
Junio C Hamano 81a5bdd9c5 Sync with 1.7.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-12 10:43:17 -07:00
Junio C Hamano e49450327e Merge branch 'jn/remote-helpers-doc'
* jn/remote-helpers-doc:
  (short) documentation for the testgit remote helper
  Documentation/git-remote-helpers: explain how import works with multiple refs
  Documentation/remote-helpers: explain capabilities first
2011-09-12 10:38:11 -07:00
Junio C Hamano 740a8fc224 Git 1.7.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-12 10:33:40 -07:00
Junio C Hamano 2f9e2e7587 Merge branch 'maint'
* maint:
  Prepare for 1.7.6.3 maintenance release
  SubmittingPathces: remove Cogito reference

Conflicts:
	RelNotes
2011-09-11 22:35:11 -07:00
Junio C Hamano c2d53586dd Prepare for 1.7.6.3 maintenance release
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 22:33:27 -07:00
Junio C Hamano 7baf32a829 Merge branch 'jn/doc-dashdash' into maint
* jn/doc-dashdash:
  Documentation/i18n: quote double-dash for AsciiDoc
  Documentation: quote double-dash for AsciiDoc

Conflicts:
	Documentation/git-mergetool--lib.txt
2011-09-11 21:52:18 -07:00
Junio C Hamano 3fc44a10f6 Merge branch 'jk/maint-1.7.2-status-ignored' into maint
* jk/maint-1.7.2-status-ignored:
  git status --ignored: tests and docs
  status: fix bug with missing --ignore files

Conflicts:
	Documentation/git-status.txt
	t/t7508-status.sh
2011-09-11 21:51:10 -07:00
Sverre Rabbelier 30962fb7fb SubmittingPathces: remove Cogito reference
Removing Cogito leaves just git and StGit, which is a rather
incomplete list of git diff tools available. Sidestep the problem
of deciding what tools to mention by not mentioning any.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 20:53:00 -07:00
Michael J Gruber 7b787599e4 branch: -v does not automatically imply --list
"branch -v" without other options or parameters still works in the list
mode, but that is not because there is "-v" but because there is no
parameter nor option.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-08 14:11:35 -07:00
Michał Górny e2b239722a for-each-ref: add split message parts to %(contents:*).
The %(body) placeholder returns the whole body of a tag or
commit, including the signature. However, callers may want
to get just the body without signature, or just the
signature.

Rather than change the meaning of %(body), which might break
some scripts, this patch introduces a new set of
placeholders which break down the %(contents) placeholder
into its constituent parts.

[jk: initial patch by mg, rebased on top of my refactoring
and with tests by me]

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-08 13:56:19 -07:00
Michael J Gruber 3793ac56b4 RelNotes/1.7.7: minor fixes
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-07 16:29:18 -07:00
Junio C Hamano d4e58965ff Minor update to how-to maintain git
A few more parts of this document is stale that needs updating
to reflect the reality, but I do not regularly rebase topics that
are only in "pu" anymore, which may be noteworthy for a commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-07 11:18:18 -07:00
Junio C Hamano 50963badbc Update draft release notes to 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-06 11:48:21 -07:00
Junio C Hamano 48f36dcd73 Sync with 1.7.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-06 11:42:12 -07:00
Junio C Hamano 509d59705e Git 1.7.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-06 11:41:02 -07:00
Junio C Hamano 5a277f3ff7 Revert "Merge branch 'cb/maint-quiet-push' into maint"
This reverts commit ffa69e61d3, reversing
changes made to 4a13c4d148.

Adding a new command line option to receive-pack and feed it from
send-pack is not an acceptable way to add features, as there is no
guarantee that your updated send-pack will be talking to updated
receive-pack. New features need to be added via the capability mechanism
negotiated over the protocol.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-06 11:10:41 -07:00
Junio C Hamano dab76d3aa6 transfer.fsckobjects: unify fetch/receive.fsckobjects
This single variable can be used to set instead of setting fsckobjects
variable for fetch & receive independently.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-04 12:39:32 -07:00
Junio C Hamano 5e838ea7aa fetch.fsckobjects: verify downloaded objects
This corresponds to receive.fsckobjects configuration variable added (a
lot) earlier in 20dc001 (receive-pack: allow using --strict mode for
unpacking objects, 2008-02-25).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-04 12:27:17 -07:00
Junio C Hamano b32128793d Update draft release notes to 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-02 13:26:02 -07:00
Junio C Hamano c14bd20931 Merge branch 'tr/maint-format-patch-empty-output'
* tr/maint-format-patch-empty-output:
  Document negated forms of format-patch --to --cc --add-headers
  t4014: "no-add-headers" is actually called "no-add-header"
  t4014: invoke format-patch with --stdout where intended
  t4014: check for empty files from git format-patch --stdout
2011-09-02 13:18:22 -07:00
Junio C Hamano e7734c6c9b Merge branch 'gb/maint-am-patch-format-error-message'
* gb/maint-am-patch-format-error-message:
  am: format is in $patch_format, not parse_patch

Conflicts:
	git-am.sh
2011-09-02 13:18:07 -07:00
Junio C Hamano c33e30675b Merge branch 'ms/daemon-timeout-is-in-seconds'
* ms/daemon-timeout-is-in-seconds:
  git-daemon.txt: specify --timeout in seconds
2011-09-02 13:17:58 -07:00
Junio C Hamano b9a77eeda1 Merge branch 'jc/clean-exclude-doc'
* jc/clean-exclude-doc:
  Documentation: clarify "git clean -e <pattern>"
2011-09-02 13:17:46 -07:00
Junio C Hamano 78c5be231b Merge branch 'mg/maint-notes-C-doc'
* mg/maint-notes-C-doc:
  git-notes.txt: clarify -C vs. copy and -F
2011-09-02 13:17:40 -07:00
Junio C Hamano c63750abc3 Merge branch 'fg/submodule-ff-check-before-push'
* fg/submodule-ff-check-before-push:
  push: Don't push a repository with unpushed submodules
2011-09-02 13:07:58 -07:00
Junio C Hamano 96b7c4deb8 Merge branch 'en/merge-recursive-2'
* en/merge-recursive-2: (57 commits)
  merge-recursive: Don't re-sort a list whose order we depend upon
  merge-recursive: Fix virtual merge base for rename/rename(1to2)/add-dest
  t6036: criss-cross + rename/rename(1to2)/add-dest + simple modify
  merge-recursive: Avoid unnecessary file rewrites
  t6022: Additional tests checking for unnecessary updates of files
  merge-recursive: Fix spurious 'refusing to lose untracked file...' messages
  t6022: Add testcase for spurious "refusing to lose untracked" messages
  t3030: fix accidental success in symlink rename
  merge-recursive: Fix working copy handling for rename/rename/add/add
  merge-recursive: add handling for rename/rename/add-dest/add-dest
  merge-recursive: Have conflict_rename_delete reuse modify/delete code
  merge-recursive: Make modify/delete handling code reusable
  merge-recursive: Consider modifications in rename/rename(2to1) conflicts
  merge-recursive: Create function for merging with branchname:file markers
  merge-recursive: Record more data needed for merging with dual renames
  merge-recursive: Defer rename/rename(2to1) handling until process_entry
  merge-recursive: Small cleanups for conflict_rename_rename_1to2
  merge-recursive: Fix rename/rename(1to2) resolution for virtual merge base
  merge-recursive: Introduce a merge_file convenience function
  merge-recursive: Fix modify/delete resolution in the recursive case
  ...
2011-09-02 10:00:18 -07:00
Matthieu Moy 9609dc9ddc (short) documentation for the testgit remote helper
While it's not a command meant to be used by actual users (hence, not
mentionned in git(1)), this command is a very precious help for
remote-helpers authors.

The best place for such technical doc is the source code, but users may
not find it without a link in a manpage.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-01 15:52:02 -07:00
Matthieu Moy 960e311496 Documentation/git-remote-helpers: explain how import works with multiple refs
This is important for two reasons:

* when two "import" lines follow each other, only one "done" command
  should be issued in the fast-import stream, not one per "import".

* The blank line terminating an import command should not be confused
  with the one terminating the sequence of commands.

While we're there, illustrate the corresponding explanation for push
batches with an example.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-01 15:51:48 -07:00
Bryan Jacobs 98c4ab32f8 git-svn: Teach dcommit --mergeinfo to handle multiple lines
"svn dcommit --mergeinfo" replaces the svn:mergeinfo property in an
upstream SVN repository with the given text. The svn:mergeinfo
property may contain commits originating on multiple branches,
separated by newlines.

Cause space characters in the mergeinfo to be replaced by newlines,
allowing a user to create history representing multiple branches being
merged into one.

Update the corresponding documentation and add a test for the new
functionality.

Signed-off-by: Bryan Jacobs <bjacobs@woti.com>
Acked-by: Sam Vilain <sam@vilain.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
2011-09-01 19:55:09 +00:00
Ray Chen 40a1530c07 git-svn: New flag to emulate empty directories
Adds a --preserve-empty-dirs flag to the clone operation that will detect
empty directories in the remote Subversion repository and create placeholder
files in the corresponding local Git directories.  This allows "empty"
directories to exist in the history of a Git repository.

Also adds the --placeholder-file flag to control the name of any placeholder
files created.  Default value is ".gitignore".

Signed-off-by: Ray Chen <rchen@cs.umd.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
2011-09-01 07:10:22 +00:00
Junio C Hamano 4b5eac7f03 Merge branch 'maint'
* maint:
  Documentation: clarify effects of -- <path> arguments
2011-08-30 12:35:51 -07:00
Thomas Rast b15b5b10a7 Documentation: clarify effects of -- <path> arguments
'git log -- <path>' does not "show commits that affect the specified
paths" in a literal sense unless --full-history is given (for example,
a file that only existed on a side branch will turn up no commits at
all!).

Reword it to specify the actual intent of the filtering, and point to
the "History Simplification" section.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-30 10:05:21 -07:00
Jonathan Nieder b4fc8d6ac6 Documentation/remote-helpers: explain capabilities first
The current remote helper documentation is from the perspective of
git, so to speak: it presents a full menu of commands for a person
invoking a remote helper to choose from.  In practice, that's less
useful than it could be, since the daunted novice remote-helper author
probably just wanted a list of commands needs to implement to get
started.  So preface the command list with an overview of each
capability, its purpose, and what commands it requires.

As a side effect, this makes it a little clearer that git doesn't
choose arbitrary commands to run, even if the remote helper advertises
all capabilities --- instead, there are well defined command sequences
for various tasks.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-29 21:25:57 -07:00
Thomas Rast b2cd17b925 Document negated forms of format-patch --to --cc --add-headers
The negated forms introduced in c426003 (format-patch: add --no-cc,
--no-to, and --no-add-headers, 2010-03-07) were not documented
anywhere.  Add them to the descriptions of the positive forms.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-29 15:27:07 -07:00
Junio C Hamano b6194678b0 Documentation: clarify "git clean -e <pattern>"
The current explanation of -e can be misread as allowing the user to say

    I know 'git clean -XYZ' (substitute -XYZ with any option and/or
    parameter) will remove paths A, B, and C, and I want them all removed
    except for paths matching this pattern by adding '-e C' to the same
    command line, i.e. 'git clean -e C -XYZ'.

But that is not what this option does. It augments the set of ignore rules
from the command line, just like the same "-e <pattern>" argument does
with the "ls-files" command (the user could probably pass "-e \!C" to tell
the command to clean everything the command would normally remove, except
for C). Also error out when both -x and -e are given with an explanation of
what -e means---it is a symptom of misunderstanding what -e does.

It also fixes small style nit in the parameter to add_exclude() call. The
current code only works because EXC_CMDL happens to be defined as 0.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 23:47:55 -07:00
Michael J Gruber d8d33736b5 branch: allow pattern arguments
Allow pattern arguments for the list mode just like for git tag -l.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 22:58:00 -07:00
Michael J Gruber cddd127b9a branch: introduce --list option
Currently, there is no way to invoke the list mode explicitly, without
giving -v to force verbose output.

Introduce a --list option which invokes the list mode. This will be
beneficial for invoking list mode with pattern matching, which otherwise
would be interpreted as branch creation.

Along with --list, test also combinations of existing options.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 22:56:05 -07:00
Michael J Gruber 171edcbb49 git-branch: introduce missing long forms for the options
Long forms are better to memorize and more reliably uniform across
commands.

Names follow precedents, e.g. "git log --remotes".

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 22:48:14 -07:00
Michael J Gruber c97eff5a95 git-tag: introduce long forms for the options
Long forms are better to memorize and more reliably uniform across
commands.

Design notes:

-u,--local-user is named following the analogous gnupg option.

-l,--list is not an argument taking option but a mode switch.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 22:47:41 -07:00
Junio C Hamano 826603d118 Update draft release notes to 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 21:49:35 -07:00
Junio C Hamano 0b98954975 Merge branch 'di/fast-import-ident'
* di/fast-import-ident:
  fsck: improve committer/author check
  fsck: add a few committer name tests
  fast-import: check committer name more strictly
  fast-import: don't fail on omitted committer name
  fast-import: add input format tests
2011-08-28 21:18:47 -07:00
Junio C Hamano d39753c238 Merge branch 'bw/doc-repo-layout'
* bw/doc-repo-layout:
  Mark http-fetch without -a as deprecated
  Documentation: Grammar correction, wording fixes and cleanup
2011-08-28 21:15:34 -07:00
Junio C Hamano 1b76df16d1 Merge branch 'nk/branch-v-abbrev'
* nk/branch-v-abbrev:
  branch -v: honor core.abbrev
2011-08-28 21:15:33 -07:00
Michael Stapelberg b8843efc06 git-daemon.txt: specify --timeout in seconds
Signed-off-by: Michael Stapelberg <michael@stapelberg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-28 13:44:10 -07:00
Junio C Hamano a452d148d1 Git 1.7.7-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-25 21:00:46 -07:00
Junio C Hamano 1d21112a94 Merge branch 'di/fast-import-doc'
* di/fast-import-doc:
  doc/fast-import: document feature import-marks-if-exists
2011-08-25 16:00:32 -07:00
Michael J Gruber 11432bb467 git-notes.txt: clarify -C vs. copy and -F
The current description of '-C' together with the analogy to 'git commit
-C' can lead to the wrong conclusion that '-C' copies notes between
objects. Make this clearer by rewording and pointing to 'copy'.

The example for attaching binary notes with 'git hash-object' followed
by 'git notes add -C' immediately raises the question: "Why not use 'git
notes add -F'?". Answer it (the latter is not binary-safe).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-25 13:16:46 -07:00
Junio C Hamano b7fcd00715 Sync with 1.7.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-24 12:18:02 -07:00
Junio C Hamano ccef6048cd Git 1.7.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-24 12:16:58 -07:00
Ben Walton a6c786fce8 Mark http-fetch without -a as deprecated
As the use of http-fetch without -a can create an object store that is
invalid to the point where it cannot even be fsck'd, mark it as
deprecated.  A future release should change the default and then
remove the option entirely.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-23 21:36:20 -07:00
Ben Walton 3d3d282146 Documentation: Grammar correction, wording fixes and cleanup
Correct a few grammar issues in gitrepository-layout.txt and also
rewords a few sections for clarity.

Remove references to using http-fetch without -a to create a broken
repository.

Mark a few areas of the repository structure as legacy.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-23 21:35:47 -07:00
Junio C Hamano 8d9185bc12 Update draft release notes to 1.7.7 2011-08-23 15:44:50 -07:00
Junio C Hamano d0b46502de Merge branch 'maint'
* maint:
  Update draft release notes for 1.7.6.1
2011-08-23 15:29:08 -07:00
Junio C Hamano b0b35a6ac3 Update draft release notes for 1.7.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-23 15:28:18 -07:00
Junio C Hamano ffa69e61d3 Merge branch 'cb/maint-quiet-push' into maint
* cb/maint-quiet-push:
  receive-pack: do not overstep command line argument array
  propagate --quiet to send-pack/receive-pack

Conflicts:
	Documentation/git-receive-pack.txt
	Documentation/git-send-pack.txt
2011-08-23 15:19:45 -07:00
Junio C Hamano c4440374b1 Merge branch 'maint'
* maint:
  add technical documentation about ref iteration
  Do not use C++-style comments
2011-08-22 21:02:41 -07:00
Heiko Voigt 1be9d84b2e add technical documentation about ref iteration
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22 15:01:14 -07:00
Fredrik Gustafsson d2b17b3220 push: Don't push a repository with unpushed submodules
When working with submodules it is easy to forget to push a
submodule to the server but pushing a super-project that
contains a commit for that submodule. The result is that the
superproject points at a submodule commit that is not available
on the server.

This adds the option --recurse-submodules=check to push. When
using this option git will check that all submodule commits that
are about to be pushed are present on a remote of the submodule.

To be able to use a combined diff, disabling a diff callback has
been removed from combined-diff.c.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-20 23:03:52 -07:00
Junio C Hamano cee426811c Update draft release notes to 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-18 22:10:23 -07:00
Junio C Hamano d8308c79fc Merge branch 'ma/am-exclude'
* ma/am-exclude:
  am: Document new --exclude=<path> option
  am: pass exclude down to apply
2011-08-18 22:07:54 -07:00
Junio C Hamano f85a051d13 Update draft release notes to 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-17 17:48:36 -07:00
Junio C Hamano 324b6b1678 Merge branch 'mh/check-attr-relative'
* mh/check-attr-relative: (29 commits)
  test-path-utils: Add subcommand "prefix_path"
  test-path-utils: Add subcommand "absolute_path"
  git-check-attr: Normalize paths
  git-check-attr: Demonstrate problems with relative paths
  git-check-attr: Demonstrate problems with unnormalized paths
  git-check-attr: test that no output is written to stderr
  Rename git_checkattr() to git_check_attr()
  git-check-attr: Fix command-line handling to match docs
  git-check-attr: Drive two tests using the same raw data
  git-check-attr: Add an --all option to show all attributes
  git-check-attr: Error out if no pathnames are specified
  git-check-attr: Process command-line args more systematically
  git-check-attr: Handle each error separately
  git-check-attr: Extract a function error_with_usage()
  git-check-attr: Introduce a new variable
  git-check-attr: Extract a function output_attr()
  Allow querying all attributes on a file
  Remove redundant check
  Remove redundant call to bootstrap_attr_stack()
  Extract a function collect_all_attrs()
  ...
2011-08-17 17:36:22 -07:00
Junio C Hamano da68bf3376 Merge branch 'js/bisect-no-checkout'
* js/bisect-no-checkout:
  bisect: add support for bisecting bare repositories
  bisect: further style nitpicks
  bisect: replace "; then" with "\n<tab>*then"
  bisect: cleanup whitespace errors in git-bisect.sh.
  bisect: add documentation for --no-checkout option.
  bisect: add tests for the --no-checkout option.
  bisect: introduce --no-checkout support into porcelain.
  bisect: introduce support for --no-checkout option.
  bisect: add tests to document expected behaviour in presence of broken trees.
  bisect: use && to connect statements that are deferred with eval.
  bisect: move argument parsing before state modification.
2011-08-17 17:36:09 -07:00
Junio C Hamano 6ed547b53b Merge branch 'js/ref-namespaces'
* js/ref-namespaces:
  ref namespaces: tests
  ref namespaces: documentation
  ref namespaces: Support remote repositories via upload-pack and receive-pack
  ref namespaces: infrastructure
  Fix prefix handling in ref iteration functions
2011-08-17 17:35:38 -07:00
Junio C Hamano 6dd5622f68 Merge branch 'cb/maint-quiet-push'
* cb/maint-quiet-push:
  receive-pack: do not overstep command line argument array
  propagate --quiet to send-pack/receive-pack

Conflicts:
	Documentation/git-receive-pack.txt
	Documentation/git-send-pack.txt
2011-08-17 17:26:05 -07:00
Dmitry Ivankov 3beb4fc461 doc/fast-import: document feature import-marks-if-exists
fast-import command-line option --import-marks-if-exists was introduced
in commit dded4f1 (fast-import: Introduce --import-marks-if-exists, 2011-01-15)

--import-marks option can be set via a "feature" command in a fast-import
stream and --import-marks-if-exists had support for such specification
from the very beginning too due to some shared codebase. Though the
documentation for this feature wasn't written in dded4f1.

Add the documentation for "feature import-marks-if-exists=<file>". Also add
a minimalistic test for it.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-17 16:51:49 -07:00
Junio C Hamano 4bfe7cb666 Sync with "maint"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-16 14:23:43 -07:00
Junio C Hamano 50b68aeb39 Merge branch 'maint'
* maint:
  Prepare for 1.7.6.1
  am: refresh the index at start and --resolved

Conflicts:
	GIT-VERSION-GEN
	RelNotes
2011-08-16 14:22:26 -07:00
Junio C Hamano 8499644ea7 Prepare for 1.7.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-16 12:42:17 -07:00
Junio C Hamano 1f2705e20f Merge branch 'jk/tag-list-multiple-patterns' into maint
* jk/tag-list-multiple-patterns:
  tag: accept multiple patterns for --list
2011-08-16 12:41:14 -07:00
Junio C Hamano f4af7f1963 Merge branch 'jl/submodule-add-relurl-wo-upstream' into maint
* jl/submodule-add-relurl-wo-upstream:
  submodule add: clean up duplicated code
  submodule add: allow relative repository path even when no url is set
  submodule add: test failure when url is not configured in superproject

Conflicts:
	git-submodule.sh
2011-08-16 12:41:13 -07:00
Junio C Hamano b5e104a0e6 Merge branch 'mz/doc-rebase-abort' into maint
* mz/doc-rebase-abort:
  rebase: clarify "restore the original branch"
2011-08-16 11:41:28 -07:00
Junio C Hamano 22d9b79370 Merge branch 'bw/log-all-ref-updates-doc' into maint
* bw/log-all-ref-updates-doc:
  Documentation: clearly specify what refs are honored by core.logAllRefUpdates
2011-08-16 11:41:28 -07:00
Junio C Hamano 412403eb45 Merge branch 'mz/doc-synopsis-verse' into maint
* mz/doc-synopsis-verse:
  Documentation: use [verse] for SYNOPSIS sections
2011-08-16 11:41:26 -07:00
Junio C Hamano 4a5a8008fd Merge branch 'jc/submodule-sync-no-auto-vivify' into maint
* jc/submodule-sync-no-auto-vivify:
  submodule add: always initialize .git/config entry
  submodule sync: do not auto-vivify uninteresting submodule
2011-08-16 11:41:26 -07:00
Fredrik Gustafsson abc06822af rev-parse: add option --resolve-git-dir <path>
Check if <path> is a valid git-dir or a valid git-file that points
to a valid git-dir.

We want tests to be independent from the fact that a git-dir may
be a git-file. Thus we changed tests to use this feature.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-16 11:04:31 -07:00
Johannes Sixt 86d4b528d8 string-list: Add API to remove an item from an unsorted list
Teach the string-list API how to remove an entry in O(1) runtime by
moving the last entry to the vacated spot. As such, the routine works
only for unsorted lists.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14 14:19:35 -07:00
Heiko Voigt 322bb6e12f add update 'none' flag to disable update of submodule by default
This is useful to mark a submodule as unneeded by default. When this
option is set and the user wants to work with such a submodule he
needs to configure 'submodule.<name>.update=checkout' or pass the
--checkout option. Then the submodule can be handled like a normal
submodule.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-11 12:27:30 -07:00
Dmitry Ivankov 4b4963c0e1 fast-import: check committer name more strictly
The documentation declares following identity format:
(<name> SP)? LT <email> GT
where name is any string without LF and LT characters.
But fast-import just accepts any string up to first GT
instead of checking the whole format, and moreover just
writes it as is to the commit object.

git-fsck checks for [^<\n]* <[^<>\n]*> format. Note that the
space is mandatory. And the space quirk is already handled via
extending the string to the left when needed.

Modify fast-import input identity format to a slightly stricter
one - deny LF, LT and GT in both <name> and <email>. And check
for it.

This is stricter then git-fsck as fsck accepts "Name> <email>"
currently, but soon fsck check will be adjusted likewise.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-11 12:21:03 -07:00
Junio C Hamano b91766295f Update draft release notes to 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-11 12:12:22 -07:00
Junio C Hamano 5fb249aec7 Merge branch 'rs/grep-function-context'
* rs/grep-function-context:
  grep: long context options
  grep: add option to show whole function as context
2011-08-11 11:03:09 -07:00
maximilian attems 2ae7345ab2 am: Document new --exclude=<path> option
The --exclude=<path> option is passed down to apply; document it as such.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-09 12:05:24 -07:00
Jon Seymour 24c512803d bisect: add support for bisecting bare repositories
This enhances the support for bisecting history in bare repositories.

The "git bisect" command no longer needs to be run inside a repository
with a working tree; it defaults to --no-checkout when run in a bare
repository.

Two tests are included to demonstrate this behaviour.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-09 10:26:18 -07:00
Junio C Hamano 460940f997 Merge branch 'jl/submodule-status-summary-doc'
* jl/submodule-status-summary-doc:
  Documentation/submodule: add command references and update options
2011-08-08 12:33:35 -07:00
Junio C Hamano fca64c80fb Merge branch 'maint'
* maint:
  filter-branch: Export variable `workdir' for --commit-filter
  Documentation/Makefile: add *.pdf to `clean' target
  Documentation: ignore *.pdf files
2011-08-08 12:24:16 -07:00
Emilio G. Cota ae8044a2f5 Documentation/Makefile: add *.pdf to `clean' target
user-manual.pdf is not removed by `make clean'; fix it.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08 09:30:14 -07:00
Emilio G. Cota 070648e9b7 Documentation: ignore *.pdf files
user-manual.pdf is generated by the build and therefore
should be ignored by git.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08 09:30:12 -07:00
Ramkumar Ramachandra 5a5d80f4ca revert: Introduce --continue to continue the operation
Introduce a new "git cherry-pick --continue" command which uses the
information in ".git/sequencer" to continue a cherry-pick that stopped
because of a conflict or other error.  It works by dropping the first
instruction from .git/sequencer/todo and performing the remaining
cherry-picks listed there, with options (think "-s" and "-X") from the
initial command listed in ".git/sequencer/opts".

So now you can do:

  $ git cherry-pick -Xpatience foo..bar
  ... description conflict in commit moo ...
  $ git cherry-pick --continue
  error: 'cherry-pick' is not possible because you have unmerged files.
  fatal: failed to resume cherry-pick
  $ echo resolved >conflictingfile
  $ git add conflictingfile && git commit
  $ git cherry-pick --continue; # resumes with the commit after "moo"

During the "git commit" stage, CHERRY_PICK_HEAD will aid by providing
the commit message from the conflicting "moo" commit.  Note that the
cherry-pick mechanism has no control at this stage, so the user is
free to violate anything that was specified during the first
cherry-pick invocation.  For example, if "-x" was specified during the
first cherry-pick invocation, the user is free to edit out the message
during commit time.  Note that the "--signoff" option specified at
cherry-pick invocation time is not reflected in the commit message
provided by CHERRY_PICK_HEAD; the user must take care to add
"--signoff" during the "git commit" invocation.

Helped-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08 09:28:24 -07:00
Michael Haggerty d932f4eb9f Rename git_checkattr() to git_check_attr()
Suggested by: Junio Hamano <gitster@pobox.com>

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:21 -07:00
Michael Haggerty ca64d061e0 git-check-attr: Fix command-line handling to match docs
According to the git-check-attr synopsis, if the '--stdin' option is
used then no pathnames are expected on the command line.  Change the
behavior to match this description; namely, if '--stdin' is used but
not '--', then treat all command-line arguments as attribute names.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:20 -07:00
Michael Haggerty 4ca0f188f6 git-check-attr: Add an --all option to show all attributes
Add new usage patterns

    git check-attr [-a | --all] [--] pathname...
    git check-attr --stdin [-a | --all] < <list-of-paths>

which display all attributes associated with the specified file(s).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:19 -07:00
Michael Haggerty ee548df300 Allow querying all attributes on a file
Add a function, git_all_attrs(), that reports on all attributes that
are set on a path.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:18 -07:00
Michael Haggerty 352404ac4c Provide access to the name attribute of git_attr
It will be present in any likely future reimplementation, and its
availability simplifies other code.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:16 -07:00
Michael Haggerty 650cfc512e doc: Correct git_attr() calls in example code
Commit 7fb0eaa2 (2010-01-17) changed git_attr() to take a string
instead of a string and a length.  Update the documentation
accordingly.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:15 -07:00
Michael Haggerty cde151815e doc: Add a link from gitattributes(5) to git-check-attr(1)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:53:15 -07:00
Jeff King 5d2fc9135a docs: put listed example commands in backticks
Many examples of git command invocation are given in asciidoc listing
blocks, which makes them monospaced and avoids further interpretation of
special characters.  Some manpages make a list of examples, like:

  git foo::
    Run git foo.

  git foo -q::
    Use the "-q" option.

to quickly show many variants. However, they can sometimes be hard to
read, because they are shown in a proportional-width font (so, for
example, seeing the difference between "-- foo" and "--foo" can be
difficult).

This patch puts all such examples into backticks, which gives the
equivalent formatting to a listing block (i.e., monospaced and without
character interpretation).

As a bonus, this also fixes an example in the git-push manpage, in which
"git push origin :::" was accidentally considered a newly-indented list,
and not a list item with "git push origin :" in it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:49:13 -07:00
Ramkumar Ramachandra 26ae337be1 revert: Introduce --reset to remove sequencer state
To explicitly remove the sequencer state for a fresh cherry-pick or
revert invocation, introduce a new subcommand called "--reset" to
remove the sequencer state.

Take the opportunity to publicly expose the sequencer paths, and a
generic function called "remove_sequencer_state" that various git
programs can use to remove the sequencer state in a uniform manner;
"git reset" uses it later in this series.  Introducing this public API
is also in line with our long-term goal of eventually factoring out
functions from revert.c into a generic commit sequencer.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:41:21 -07:00
Jon Seymour 88d78911ac bisect: add documentation for --no-checkout option.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04 15:37:38 -07:00
Junio C Hamano 6a319e393b Merge branch 'maint'
* maint:
  add gitignore entry to description about how to write a builtin
  gitattributes: Reword "attribute macro" to "macro attribute"
  gitattributes: Clarify discussion of attribute macros
2011-08-03 14:16:17 -07:00
Heiko Voigt e9e0643fe6 add gitignore entry to description about how to write a builtin
If the author forgets the gitignore entry the built result will show up
as new file in the git working directory.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03 11:44:23 -07:00
Michael Haggerty 0922570c76 gitattributes: Reword "attribute macro" to "macro attribute"
The new wording makes it clearer that such a beast is an attribute in
addition to being a macro (as opposed to being only a macro that is
used for attributes).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03 10:32:54 -07:00
Michael Haggerty 98e8406632 gitattributes: Clarify discussion of attribute macros
In particular, make it clear that attribute macros are themselves
recorded as attributes in addition to setting other attributes.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03 10:32:02 -07:00
René Scharfe 317f63c21c grep: long context options
Take long option names for -A (--after-context), -B (--before-context)
and -C (--context) from GNU grep and add a similar long option name
for -W (--function-context).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01 16:11:50 -07:00
René Scharfe ba8ea7496f grep: add option to show whole function as context
Add a new option, -W, to show the whole surrounding function of a match.

It uses the same regular expressions as -p and diff to find the beginning
of sections.

Currently it will not display comments in front of a function, but those
that are following one.  Despite this shortcoming it is already useful,
e.g. to simply see a more complete applicable context or to extract whole
functions.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01 16:09:15 -07:00
Jens Lehmann 402e8a6d9a Documentation/submodule: add command references and update options
Reference the "git diff" and "git status" commands where they learned
functionality that in earlier git versions was only available through the
'summary' and 'status' subcommands of "git submodule".

The short option '-n' for '--summary-limit' was missing from the synopsis
and the --init option was missing from the "options" section, add those
there. And while at it, quote all options in backticks so they are
decorated properly in the output formats which support that.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01 15:34:22 -07:00
Junio C Hamano 59d9ba869e Merge branch 'sr/transport-helper-fix'
* sr/transport-helper-fix: (21 commits)
  transport-helper: die early on encountering deleted refs
  transport-helper: implement marks location as capability
  transport-helper: Use capname for refspec capability too
  transport-helper: change import semantics
  transport-helper: update ref status after push with export
  transport-helper: use the new done feature where possible
  transport-helper: check status code of finish_command
  transport-helper: factor out push_update_refs_status
  fast-export: support done feature
  fast-import: introduce 'done' command
  git-remote-testgit: fix error handling
  git-remote-testgit: only push for non-local repositories
  remote-curl: accept empty line as terminator
  remote-helpers: export GIT_DIR variable to helpers
  git_remote_helpers: push all refs during a non-local export
  transport-helper: don't feed bogus refs to export push
  git-remote-testgit: import non-HEAD refs
  t5800: document some non-functional parts of remote helpers
  t5800: use skip_all instead of prereq
  t5800: factor out some ref tests
  ...
2011-08-01 15:00:14 -07:00
Junio C Hamano 3503b8d0da Merge branch 'nk/ref-doc' into maint
* nk/ref-doc:
  glossary: clarify description of HEAD
  glossary: update description of head and ref
  glossary: update description of "tag"
  git.txt: de-emphasize the implementation detail of a ref
  check-ref-format doc: de-emphasize the implementation detail of a ref
  git-remote.txt: avoid sounding as if loose refs are the only ones in the world
  git-remote.txt: fix wrong remote refspec
2011-08-01 14:44:24 -07:00
Junio C Hamano 3e8cd966e0 Merge branch 'an/shallow-doc' into maint
* an/shallow-doc:
  Document the underlying protocol used by shallow repositories and --depth commands.
  Fix documentation of fetch-pack that implies that the client can disconnect after sending wants.
2011-08-01 14:43:53 -07:00
Junio C Hamano b35acb5345 Merge branch 'maint'
* maint:
  Break down no-lstat() condition checks in verify_uptodate()
  t7400: fix bogus test failure with symlinked trash
  Documentation: clarify the invalidated tree entry format
2011-07-31 18:57:32 -07:00
Clemens Buchacher 90a6c7d443 propagate --quiet to send-pack/receive-pack
Currently, git push --quiet produces some non-error output, e.g.:

 $ git push --quiet
 Unpacking objects: 100% (3/3), done.

Add the --quiet option to send-pack/receive-pack and pass it to
unpack-objects in the receive-pack codepath and to receive-pack in
the push codepath.

This fixes a bug reported for the fedora git package:

 https://bugzilla.redhat.com/show_bug.cgi?id=725593

Reported-by: Jesse Keating <jkeating@redhat.com>
Cc: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-31 18:45:41 -07:00
Carlos Martín Nieto e44b6df90c Documentation: clarify the invalidated tree entry format
When the entry_count is -1, the tree is invalidated and therefore has
not associated hash (or object name). Explicitly state that the next
entry starts after the newline.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-31 18:23:49 -07:00
Junio C Hamano 5c2f84599c Update draft release notes to 1.7.7
The third batch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-22 15:32:03 -07:00
Junio C Hamano 22f41286be Merge branch 'dc/stash-con-untracked'
* dc/stash-con-untracked:
  stash: Add --include-untracked option to stash and remove all untracked files

Conflicts:
	git-stash.sh
2011-07-22 14:46:28 -07:00
Junio C Hamano f424d7e0b9 Merge branch 'mz/doc-rebase-abort'
* mz/doc-rebase-abort:
  rebase: clarify "restore the original branch"
2011-07-22 14:44:08 -07:00
Junio C Hamano ef6663b3db Merge branch 'bw/log-all-ref-updates-doc'
* bw/log-all-ref-updates-doc:
  Documentation: clearly specify what refs are honored by core.logAllRefUpdates
2011-07-22 14:43:51 -07:00
Junio C Hamano b3743df73f Merge branch 'mz/doc-synopsis-verse'
* mz/doc-synopsis-verse:
  Documentation: use [verse] for SYNOPSIS sections

Conflicts:
	Documentation/git-mergetool--lib.txt
2011-07-22 14:43:13 -07:00
Junio C Hamano c56dce3b81 Merge branch 'jl/submodule-add-relurl-wo-upstream'
* jl/submodule-add-relurl-wo-upstream:
  submodule add: clean up duplicated code
  submodule add: allow relative repository path even when no url is set
  submodule add: test failure when url is not configured in superproject

Conflicts:
	git-submodule.sh
2011-07-22 14:24:35 -07:00