1
0
mirror of https://github.com/git/git.git synced 2024-10-19 15:18:24 +02:00
Commit Graph

5861 Commits

Author SHA1 Message Date
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
Junio C Hamano
ed16d0dbf1 Merge branch 'maint'
* maint:
  doc/fast-import: clarify notemodify command
  Documentation: minor grammatical fix in rev-list-options.txt
  Documentation: git-filter-branch honors replacement refs
  remote-curl: Add a format check to parsing of info/refs
  git-config: Remove extra whitespaces
2011-07-22 13:58:46 -07:00
Dmitry Ivankov
b421812b48 doc/fast-import: clarify notemodify command
The "notemodify" fast-import command was introduced in commit a8dd2e7
(fast-import: Add support for importing commit notes, 2009-10-09)
The commit log has slightly different description than the added
documentation. The latter is somewhat confusing. "notemodify" is a
subcommand of "commit" command used to add a note for some commit.
Does this note annotate the commit produced by the "commit" command
or a commit given by it's committish parameter? Which notes tree
does it write notes to?

The exact meaning could be deduced with old description and some
notes machinery knowledge. But let's make it more obvious. This
command is used in a context like "commit refs/notes/test" to
add or rewrite an annotation for a committish parameter. So the
advised way to add notes in a fast-import stream is:
1) import some commits (optional)
2) prepare a "commit" to the notes tree:
2.1) choose notes ref, committer, log message, etc.
2.2) create annotations with "notemodify", where each can refer to
a commit being annotated via a branch name, import mark reference,
sha1 and other expressions specified in the Documentation.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-22 13:58:35 -07:00
Jack Nagel
df6b0cad5f Documentation: minor grammatical fix in rev-list-options.txt
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-22 10:38:59 -07:00
Peter Collingbourne
0dc310e860 Documentation: git-filter-branch honors replacement refs
Make it clear that git-filter-branch will honor and make permanent
replacement refs as well as grafts.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-21 12:54:55 -07:00
Sverre Rabbelier
82670a5cb5 fast-export: support done feature
If fast-export is being used to generate a fast-import stream that
will be used afterwards it is desirable to indicate the end of the
stream with the new 'done' command.

Add a flag that causes fast-export to end with 'done'.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19 11:17:47 -07:00
Sverre Rabbelier
be56862f19 fast-import: introduce 'done' command
Add a 'done' command that causes fast-import to stop reading from the
stream and exit.

If the new --done command line flag was passed on the command line
(or a "feature done" declaration included at the start of the stream),
make the 'done' command mandatory.  So "git fast-import --done"'s
input format will be prefix-free, making errors easier to detect when
they show up as early termination at some convenient time of the
upstream of a pipe writing to fast-import.

Another possible application of the 'done' command would to be allow a
fast-import stream that is only a small part of a larger encapsulating
stream to be easily parsed, leaving the file offset after the "done\n"
so the other application can pick up from there.  This patch does not
teach fast-import to do that --- fast-import still uses buffered input
(stdio).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19 11:17:47 -07:00
Dmitry Ivankov
e173587252 remote-helpers: export GIT_DIR variable to helpers
The gitdir capability is recognized by git and can be used to tell
the helper where the .git directory is. But it is not mentioned in
the documentation and considered worse than if gitdir was passed
via GIT_DIR environment variable.

Remove support for the gitdir capability and export GIT_DIR instead.
Teach testgit to use env instead of the now-removed gitdir command.

[sr: fixed up documentation]

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19 11:17:47 -07:00
Junio C Hamano
d79bcd6805 Update draft release notes to 1.7.7
The second batch of topics for this cycle are now in.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19 10:44:51 -07:00
Junio C Hamano
0591c0a5be Merge branch 'jc/submodule-sync-no-auto-vivify'
* jc/submodule-sync-no-auto-vivify:
  submodule add: always initialize .git/config entry
  submodule sync: do not auto-vivify uninteresting submodule

Conflicts:
	git-submodule.sh
2011-07-19 09:45:37 -07:00
Junio C Hamano
765c7e4f31 Merge branch 'jk/archive-tar-filter'
* jk/archive-tar-filter:
  upload-archive: allow user to turn off filters
  archive: provide builtin .tar.gz filter
  archive: implement configurable tar filters
  archive: refactor file extension format-guessing
  archive: move file extension format-guessing lower
  archive: pass archiver struct to write_archive callback
  archive: refactor list of archive formats
  archive-tar: don't reload default config options
  archive: reorder option parsing and config reading
2011-07-19 09:45:32 -07:00
Junio C Hamano
ff94409da9 Merge branch 'jk/clone-cmdline-config'
* jk/clone-cmdline-config:
  clone: accept config options on the command line
  config: make git_config_parse_parameter a public function
  remote: use new OPT_STRING_LIST
  parse-options: add OPT_STRING_LIST helper
2011-07-19 09:45:24 -07:00
Junio C Hamano
20a80d04a4 Merge branch 'jk/tag-list-multiple-patterns'
* jk/tag-list-multiple-patterns:
  tag: accept multiple patterns for --list
2011-07-19 09:45:15 -07:00
Martin von Zweigbergk
5960bc9d63 rebase: clarify "restore the original branch"
The description for 'git rebase --abort' currently says:

    Restore the original branch and abort the rebase operation.

The "restore" can be misinterpreted to imply that the original branch
was somehow in a broken state during the rebase operation. It is also
not completely clear what "the original branch" is --- is it the
branch that was checked out before the rebase operation was called or
is the the branch that is being rebased (it is the latter)? Although
both issues are made clear in the DESCRIPTION section, let us also
make the entry in the OPTIONS secion more clear.

Also remove the term "rebasing process" from the usage text, since the
user already knows that the text is about "git rebase".

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-13 22:03:12 -07:00
Junio C Hamano
af52e6b06a Merge branch 'jn/doc-dashdash'
* jn/doc-dashdash:
  Documentation/i18n: quote double-dash for AsciiDoc
  Documentation: quote double-dash for AsciiDoc
2011-07-13 14:31:37 -07:00
Junio C Hamano
0e8a23bf1f Merge branch 'nk/ref-doc'
* 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-07-13 14:31:37 -07:00
Junio C Hamano
3b1d3664f5 Merge branch 'an/shallow-doc'
* 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-07-13 14:31:34 -07:00
Bert Wesarg
cd8e3711bf Documentation: clearly specify what refs are honored by core.logAllRefUpdates
The documentation for logging updates in git-update-ref, doesn't make it
clear that only a specific subset of refs are honored by this variable.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-12 09:11:14 -07:00
Josh Triplett
d49483f0ca ref namespaces: documentation
Document the namespace mechanism in a new gitnamespaces(7) page.
Reference it from receive-pack and upload-pack.

Document the new --namespace option and GIT_NAMESPACE environment
variable in git(1), and reference gitnamespaces(7).

Add a sample Apache configuration to http-backend(1) to support
namespaced repositories, and reference gitnamespaces(7).

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-11 09:35:46 -07:00
Junio C Hamano
cf13f6ca40 Start 1.7.7 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-06 17:00:46 -07:00
Junio C Hamano
395f65d438 Merge branch 'maint'
* maint:
  docs: document --textconv diff option
2011-07-06 16:48:59 -07:00
Martin von Zweigbergk
7791a1d9b9 Documentation: use [verse] for SYNOPSIS sections
The SYNOPSIS sections of most commands that span several lines already
use [verse] to retain line breaks. Most commands that don't span
several lines seem not to use [verse]. In the HTML output, [verse]
does not only preserve line breaks, but also makes the section
indented, which causes a slight inconsistency between commands that
use [verse] and those that don't. Use [verse] in all SYNOPSIS sections
for consistency.

Also remove the blank lines from git-fetch.txt and git-rebase.txt to
align with the other man pages. In the case of git-rebase.txt, which
already uses [verse], the blank line makes the [verse] not apply to
the last line, so removing the blank line also makes the formatting
within the document more consistent.

While at it, add single quotes to 'git cvsimport' for consistency with
other commands.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-06 14:26:26 -07:00
Jeff King
d28790dc31 docs: document --textconv diff option
This has been there since textconv existed, but was never
documented. There is some overlap with what's in
gitattributes(5), but it's important to warn in both places
that textconv diffs probably can't be applied.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-06 11:10:11 -07:00
Namhyung Kim
b792c06787 branch -v: honor core.abbrev
Use the value from 'core.abbrev' configuration variable unless user
specifies the length on command line when showing commit object name
in "branch -v" output.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-01 11:22:09 -07:00
Junio C Hamano
1692d0c64a Merge branch 'rs/grep-color'
* rs/grep-color:
  grep: add --heading
  grep: add --break
  grep: fix coloring of hunk marks between files
2011-06-29 17:03:13 -07:00
Junio C Hamano
187e902dd2 Merge branch 'db/http-cookies'
* db/http-cookies:
  http: pass http.cookiefile using CURLOPT_COOKIEFILE
2011-06-29 17:03:12 -07:00
Junio C Hamano
50cebdade1 Merge branch 'jk/maint-1.7.2-status-ignored'
* 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-06-29 17:03:12 -07:00
Junio C Hamano
a852aac48d Merge branch 'mg/diff-stat-count'
* mg/diff-stat-count:
  diff --stat-count: finishing touches
  diff-options.txt: describe --stat-{width,name-width,count}
  diff: introduce --stat-lines to limit the stat lines
  diff.c: omit hidden entries from namelen calculation with --stat
2011-06-29 17:03:10 -07:00
Jonathan Nieder
27269fc5f2 Documentation/i18n: quote double-dash for AsciiDoc
As explained in v1.7.3-rc0~13^2 (Work around em-dash handling in newer
AsciiDoc, 2010-08-23), if double dashes in names of commands are not
escaped, AsciiDoc renders them as em dashes.

While fixing that, spell the command name as "git sh-i18n--envsubst"
(2 words) instead of emphasizing the name of the binary (one
hyphenated name) and format it in italics.

The double-dash in the title should be escaped, too, to avoid spurious
em dashes in the header:

  .TH "GIT\-SH\-I18N\(emENVSUB" "1" "06/26/2011" "Git 1\&.7\&.6" "Git Manual"

AsciiDoc 8.6.4 with DocBook XSL 1.76.0-RC1 copes fine and writes
"GIT\-SH\-I18N\-\-ENVSUB" even without this change, which is why it
was missed before.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-29 14:38:51 -07:00
Junio C Hamano
347231f735 Merge branch 'jn/maint-doc-dashdash' into jn/doc-dashdash
* jn/maint-doc-dashdash:
  Documentation: quote double-dash for AsciiDoc
2011-06-29 09:25:51 -07:00
Jonathan Nieder
565e135a1e Documentation: quote double-dash for AsciiDoc
AsciiDoc versions since 5.0.6 treat a double-dash surrounded by spaces
(outside of verbatim environments) as a request to insert an em dash.
Such versions also treat the three-character sequence "\--", when not
followed by another dash, as a request to insert two literal minus
signs.  Thus from time to time there have been patches to add
backslashes to AsciiDoc markup to escape double-dashes that are meant
to be represent '--' characters used literally on the command line;
see v1.4.0-rc1~174, Fix up docs where "--" isn't displayed correctly,
2006-05-05, for example.

AsciiDoc 6.0.3 (2005-04-20) made life harder by also treating
double-dashes without surrounding whitespace as markup for an em dash,
though only when formatting for backends other than the manpages
(e.g., HTML).  Many pages needed to be changed to use a backslash
before the "--" in names of command-line flags like "--add" (see
v0.99.6~37, Update tutorial, 2005-08-30).

AsciiDoc 8.3.0 (2008-11-29) refined the em-dash rule to avoid that
requirement.  Double-dashes without surrounding spaces are not
rendered as em dashes any more unless bordered on both sides by
alphanumeric characters.  The unescaped markup for option names (e.g.,
"--add") works fine, and many instances of this style have leaked into
Documentation/; git's HTML documentation contains many spurious em
dashes when formatted by an older toolchain.  (This patch will not
change that.)

The upshot: "--" as an isolated word and in phrases like "git
web--browse" must be escaped if it is not to be rendered as an em dash
by current asciidoc.  Use "\--" to avoid such misformatting in
sentences in which "--" represents a literal double-minus command line
argument that separates options and revs from pathspecs, and use
"{litdd}" in cases where the double-dash is embedded in the command
name.  The latter is just for consistency with v1.7.3-rc0~13^2 (Work
around em-dash handling in newer AsciiDoc, 2010-08-23).

List of lines to fix found by grepping manpages for "(em".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-29 09:24:26 -07:00
Jakub Narebski
5ad6d387f1 git-instaweb: Check that correct config file exists for (re)start
Currently start/restart does not generate any configuration files for
spawning a new instance.  This means that

  $ git instaweb --http=<server> --start

might pick up stale 'httpd.conf' file for a different web server
(e.g. for default lighttpd when requesting apache2).

This commit changes that, and makes git-instaweb generate web server
config file and/or gitweb config file if don't exists.

This required naming config files after the name of web server
(alternate solution would be to somehow mark for which web server was
config file generated).

Note that web servers that embed configuration in server script file,
namely webrick and plackup, and which delete "$conf" in their *_conf
function, would have their config (server script) always regenerated.

Note: this commit introduces a bit of code repetition (but only a few
lines).

Reported-by: Gurjeet Singh <singh.gurjeet@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2011-06-27 09:11:41 +00:00
Junio C Hamano
ccee60862b submodule sync: do not auto-vivify uninteresting submodule
Earlier 33f072f (submodule sync: Update "submodule.<name>.url" for empty
directories, 2010-10-08) attempted to fix a bug where "git submodule sync"
command does not update the URL if the current superproject does not have
a checkout of the submodule.

However, it did so by unconditionally registering submodule.$name.url to
every submodule in the project, even the ones that the user has never
showed interest in at all by running 'git submodule init' command. This
caused subsequent 'git submodule update' to start cloning/updating submodules
that are not interesting to the user at all.

Update the code so that the URL is updated from the .gitmodules file only
for submodules that already have submodule.$name.url entries, i.e. the
ones the user has showed interested in having a checkout.

Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-26 13:06:08 -07:00
David Caldwell
787513027a stash: Add --include-untracked option to stash and remove all untracked files
The --include-untracked option acts like the normal "git stash save" but
also adds all untracked files in the working directory to the stash and then
calls "git clean --force --quiet" to restore the working directory to a
pristine state.

This is useful for projects that need to run release scripts. With this
option, the release scripts can be from the main working directory so one
does not have to maintain a "clean" directory in parallel just for
releasing. Basically the work-flow becomes:

   $ git tag release-1.0
   $ git stash --include-untracked
   $ make release
   $ git clean -f
   $ git stash pop

"git stash" alone is not enough in this case--it leaves untracked files
lying around that might mess up a release process that expects everything to
be very clean or might let a release succeed that should actually fail (due
to a new source file being created that hasn't been committed yet).

Signed-off-by: David Caldwell <david@porkrind.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-26 12:50:46 -07:00
Junio C Hamano
f696543dad Git 1.7.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-26 12:41:16 -07:00
Junio C Hamano
67393c5dc9 glossary: clarify description of HEAD
HEAD on a branch does reference a commit via the branch ref it refers to.
The main difference of a detached HEAD is that it _directly_ refers to
a commit.  Clarify this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 15:39:28 -07:00
Junio C Hamano
deaef1e947 glossary: update description of head and ref
Reword them to avoid sounding as if loose refs are the only ones in the world.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 15:39:28 -07:00
Junio C Hamano
487b04411d glossary: update description of "tag"
It is an unimportant implementation detail that ref namespaces are
implemented as subdirectories of $GIT_DIR/refs. What is more important
is that tags are in refs/tags hierarchy in the ref namespace.

Also note that a tag can point at an object of arbitrary type, not limited
to commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 15:39:24 -07:00
Junio C Hamano
0abcfbff4d git.txt: de-emphasize the implementation detail of a ref
It is an unimportant implementation detail that branches and tags are
stored somewhere under $GIT_DIR/refs directory, or the name of the commit
that will become the parent of the next commit is stored in $GIT_DIR/HEAD.

What is more important is that branches live in refs/heads and tags live
in refs/tags hierarchy in the ref namespace, and HEAD means the tip of the
current branch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 15:38:18 -07:00
Junio C Hamano
a0a7e9e511 check-ref-format doc: de-emphasize the implementation detail of a ref
It is an unimportant implementation detail that branches and tags are
stored somewhere under $GIT_DIR/refs directory. What is more important
is that branches live in refs/heads and tags live in refs/tags hierarchy
in the ref namespace.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 15:38:14 -07:00
Junio C Hamano
0aceb22097 git-remote.txt: avoid sounding as if loose refs are the only ones in the world
It was correct to say "The file $GIT_DIR/refs/heads/master stores the
commit object name at the tip of the master branch" in the older days,
but not anymore, as refs can be packed into $GIT_DIR/packed-refs file.

Update the document to talk in terms of a more abstract concept "ref" and
"symbolic ref" where we are not describing the underlying implementation
detail.

This on purpose leaves two instances of $GIT_DIR/ in the git-remote
documentation; they do talk about $GIT_DIR/remotes/ and $GIT_DIR/branches/
file hierarchy that used to be the place to store configuration around
remotes before the configuration mechanism took them over.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 09:15:28 -07:00
Namhyung Kim
eb637e1382 git-remote.txt: fix wrong remote refspec
$GIT_DIR/remotes/<name>/<branch> should be
$GIT_DIR/refs/remotes/<name>/<branch>.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-23 07:58:20 -07:00
Junio C Hamano
def98035d0 Merge branch 'maint'
* maint:
  Documentation: git diff --check respects core.whitespace
2011-06-22 14:01:18 -07:00
Christof Krüger
4f8303905e Documentation: git diff --check respects core.whitespace
Fix documentation on "git diff --check" by adopting the description from
"git apply --whitespace".

Signed-off-by: Christof Krüger <git@christof-krueger.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22 11:40:32 -07:00
Jeff King
84054f79de clone: accept config options on the command line
Clone does all of init, "remote add", fetch, and checkout
without giving the user a chance to intervene and set any
configuration. This patch allows you to set config options
in the newly created repository after the clone, but before
we do any other operations.

In many cases, this is a minor convenience over something
like:

  git clone git://...
  git config core.whatever true

But in some cases, it can bring extra efficiency by changing
how the fetch or checkout work. For example, setting
line-ending config before the checkout avoids having to
re-checkout all of the contents with the correct line
endings.

It also provides a mechanism for passing information to remote
helpers during a clone; the helpers may read the git config
to influence how they operate.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22 11:25:21 -07:00
Jeff King
7b97730b76 upload-archive: allow user to turn off filters
Some tar filters may be very expensive to run, so sites do
not want to expose them via upload-archive. This patch lets
users configure tar.<filter>.remote to turn them off.

By default, gzip filters are left on, as they are about as
expensive as creating zip archives.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22 11:12:35 -07:00
Jeff King
0e804e0993 archive: provide builtin .tar.gz filter
This works exactly as if the user had configured it via:

  [tar "tgz"]
	command = gzip -cn
  [tar "tar.gz"]
	command = gzip -cn

but since it is so common, it's convenient to have it
builtin without the user needing to do anything.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22 11:12:35 -07:00
Jeff King
767cf4579f archive: implement configurable tar filters
It's common to pipe the tar output produce by "git archive"
through gzip or some other compressor. Locally, this can
easily be done by using a shell pipe. When requesting a
remote archive, though, it cannot be done through the
upload-archive interface.

This patch allows configurable tar filters, so that one
could define a "tar.gz" format that automatically pipes tar
output through gzip.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22 11:12:35 -07:00
Jeff King
588d0e834b tag: accept multiple patterns for --list
Until now, "git tag -l foo* bar*" would silently ignore the
second argument, showing only refs starting with "foo". It's
not just unfriendly not to take a second pattern; we
actually generated subtly wrong results (from the user's
perspective) because some of the requested tags were
omitted.

This patch allows an arbitrary number of patterns on the
command line; if any of them matches, the ref is shown.

While we're tweaking the documentation, let's also make it
clear that the pattern is fnmatch.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20 13:00:54 -07:00
Junio C Hamano
302bd999fd Git 1.7.6-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-16 09:21:36 -07:00
Junio C Hamano
2cbd969bcf Git 1.7.6-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-08 18:29:48 -07:00
Alex Neronskiy
4a1c269516 Document the underlying protocol used by shallow repositories and --depth commands.
Explain the exchange that occurs between a client and server when
the client is requesting shallow history and/or is already using
a shallow repository.

Signed-off-by: Alex Neronskiy <zakmagnus@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-08 18:08:21 -07:00
Alex Neronskiy
a1e90b2352 Fix documentation of fetch-pack that implies that the client can disconnect after sending wants.
Specify conditions under which the client can terminate the connection
early. Previously, an unintended behavior was possible which could
confuse servers.

Based-on-patch-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Alex Neronskiy <zakmagnus@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-08 18:08:20 -07:00
Jens Lehmann
4d68932004 submodule add: allow relative repository path even when no url is set
Adding a submodule with a relative repository path did only succeed when
the superproject's default remote was set. But when that is unset, the
superproject is its own authoritative upstream, so lets use its working
directory as upstream instead.

This allows users to set up a new superpoject where the submodules urls
are configured relative to the superproject's upstream while its default
remote can be configured later.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-06 13:46:36 -07:00
René Scharfe
1d84f72ef1 grep: add --heading
With --heading, the filename is printed once before matches from that
file instead of at the start of each line, giving more screen space to
the actual search results.

This option is taken from ack (http://betterthangrep.com/).  And now
git grep can dress up like it:

	$ git config alias.ack "grep --break --heading --line-number"

	$ git ack -e --heading
	Documentation/git-grep.txt
	154:--heading::

	t/t7810-grep.sh
	785:test_expect_success 'grep --heading' '
	786:    git grep --heading -e char -e lo_w hello.c hello_world >actual &&
	808:    git grep --break --heading -n --color \

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-05 18:15:27 -07:00
René Scharfe
a8f0e7649e grep: add --break
With --break, an empty line is printed between matches from different
files, increasing readability.  This option is taken from ack
(http://betterthangrep.com/).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-05 18:15:26 -07:00
Duncan Brown
bcfb95dde4 http: pass http.cookiefile using CURLOPT_COOKIEFILE
If the config option http.cookiefile is set, pass this file to libCURL using
the CURLOPT_COOKIEFILE option. This is similar to calling curl with the -b
option.  This allows git http authorization with authentication mechanisms
that use cookies, such as SAML Enhanced Client or Proxy (ECP) used by
Shibboleth.

To use SAML/ECP, the user needs to request a session cookie with their own ECP
code. See for example:

<https://wiki.shibboleth.net/confluence/display/SHIB2/ECP>

Once the cookie file has been created, it can be passed to git with, e.g.

git config --global http.cookiefile "/home/dbrown/.curlcookies"

libCURL will then pass the appropriate session cookies to the git http server.

Signed-off-by: Duncan Brown <duncan.brown@ligo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-03 09:29:19 -07:00
Junio C Hamano
150b493ad4 git status --ignored: tests and docs
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02 11:59:19 -07:00
Junio C Hamano
a6605d76cd Sync with 1.7.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-01 14:11:17 -07:00
Junio C Hamano
e5af0de202 Git 1.7.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-01 14:08:26 -07:00
Junio C Hamano
2dd798469e Merge branch 'jk/maint-docs' into maint
* jk/maint-docs:
  docs: fix some antique example output
  docs: make sure literal "->" isn't converted to arrow
  docs: update status --porcelain format
  docs: minor grammar fixes to git-status
2011-06-01 14:02:52 -07:00
Junio C Hamano
24263cfb54 Merge branch 'jn/doc-remote-helpers' into maint
* jn/doc-remote-helpers:
  Documentation: do not misinterpret refspecs as bold text
2011-06-01 14:02:45 -07:00
Junio C Hamano
090a1a5d95 Update draft release notes to 1.7.6
I think we are almost there for the feature freeze.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 12:22:50 -07:00
Junio C Hamano
1c9d71944a Merge branch 'jn/doc-remote-helpers'
* jn/doc-remote-helpers:
  Documentation: do not misinterpret refspecs as bold text
2011-05-31 12:09:35 -07:00
Junio C Hamano
15af7075fc Merge branch 'ab/i18n-envsubst-doc-fix'
* ab/i18n-envsubst-doc-fix:
  git-sh-i18n--envsubst: add SYNOPSIS section to the documentation
2011-05-31 12:09:21 -07:00
Junio C Hamano
7953156939 Merge branch 'jk/maint-docs'
* jk/maint-docs:
  docs: fix some antique example output
  docs: make sure literal "->" isn't converted to arrow
  docs: update status --porcelain format
  docs: minor grammar fixes to git-status
2011-05-31 12:09:00 -07:00
Junio C Hamano
efd02e92c9 Merge branch 'jl/read-tree-m-dry-run'
* jl/read-tree-m-dry-run:
  Teach read-tree the -n|--dry-run option
  unpack-trees: add the dry_run flag to unpack_trees_options
2011-05-31 12:08:48 -07:00
Junio C Hamano
2951df7a9a Sync with maint 2011-05-31 12:07:14 -07:00
Junio C Hamano
2b0b64ee85 Start 1.7.5.4 draft release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-31 12:06:40 -07:00
Junio C Hamano
398dbe536d Merge branch 'vh/config-interactive-singlekey-doc' into maint
* vh/config-interactive-singlekey-doc:
  git-reset.txt: better docs for '--patch'
  git-checkout.txt: better docs for '--patch'
  git-stash.txt: better docs for '--patch'
  git-add.txt: document 'interactive.singlekey'
  config.txt: 'interactive.singlekey; is used by...
2011-05-31 12:01:06 -07:00