Commit graph

234 commits

Author SHA1 Message Date
Marius Storm-Olsen b7f685a754 Clearify the documentation for core.ignoreStat
The previous documentation didn't make it clear that the
"assume unchanged" was on per file basis, and not a global
flag.

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-31 13:09:39 -07:00
Junio C Hamano 58dd4915ba Merge branch 'mo/cvsserver'
* mo/cvsserver:
  Documentation: Fix skipped section level
  git-cvsserver: add ability to guess -kb from contents
  implement gitcvs.usecrlfattr
  git-cvsserver: add mechanism for managing working tree and current directory
2008-05-25 13:37:04 -07:00
Heikki Orsila dd0ffd5b31 Add log.date config variable
log.date config variable sets the default date-time mode for the log
command. Setting log.date value is similar to using git log's --date
option.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23 16:05:42 -07:00
Chris Parsons 950ce2e22d Updated status to show 'Not currently on any branch' in red
This provides additional warning to users when attempting to
commit to a detached HEAD. It is configurable in color.status.nobranch.

Signed-off-by: Chris Parsons <chris@edendevelopment.co.uk>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:51:22 -07:00
Matthew Ogilvie 90948a4289 git-cvsserver: add ability to guess -kb from contents
If "gitcvs.allbinary" is set to "guess", then any file that has
not been explicitly marked as binary or text using the "crlf" attribute
and the "gitcvs.usecrlfattr" config will guess binary based on the contents
of the file.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 12:05:35 -07:00
Matthew Ogilvie 8a06a63297 implement gitcvs.usecrlfattr
If gitcvs.usecrlfattr is set to true, git-cvsserver will consult
the "crlf" for each file to determine if it should mark the file
as binary (-kb).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 12:00:31 -07:00
Dustin Sallings c998ae9baa Allow tracking branches to set up rebase by default.
Change cd67e4d4 introduced a new configuration parameter that told
pull to automatically perform a rebase instead of a merge.  This
change provides a configuration option to enable this feature
automatically when creating a new branch.

If the variable branch.autosetuprebase applies for a branch that's
being created, that branch will have branch.<name>.rebase set to true.

Signed-off-by: Dustin Sallings <dustin@spy.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11 09:28:52 -07:00
Junio C Hamano 1f8115b113 Merge branch 'maint'
* maint:
  Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
  doc: clarify definition of "update" for git-add -u
2008-05-08 20:50:03 -07:00
Junio C Hamano 32a27b5666 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
  doc: clarify definition of "update" for git-add -u
2008-05-08 20:12:44 -07:00
Junio C Hamano ca1c9913f8 Merge branch 'sg/merge-options' (early part)
* 'sg/merge-options' (early part):
  merge, pull: add '--(no-)log' command line option
  fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
  add 'merge.stat' config variable
  merge, pull: introduce '--(no-)stat' option
  doc: moved merge.* config variables into separate merge-config.txt
2008-05-08 20:06:36 -07:00
Junio C Hamano d576c45aae Merge branch 'cc/help'
* cc/help:
  documentation: web--browse: add a note about konqueror
  documentation: help: add info about "man.<tool>.cmd" config var
  help: use "man.<tool>.cmd" as custom man viewer command
  documentation: help: add "man.<tool>.path" config variable
  help: use man viewer path from "man.<tool>.path" config var
2008-05-08 20:06:11 -07:00
Dustin Sallings 15ddb6fab2 Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
Signed-off-by: Dustin Sallings <dustin@spy.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-08 12:15:30 -07:00
Gustaf Hendeby d84ae0dbd5 Documentation/config.txt: Add git-gui options
The 'git gui' has a number of options that can be specified using the
options dialog. Sometimes it is convenient to be able to specify these
from the command line, therefor document these options.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Shawn O. Pearce <speace@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-08 11:37:34 -07:00
Junio C Hamano dc484f2213 Merge branch 'pb/remote-mirror-config'
* pb/remote-mirror-config:
  Add a remote.*.mirror configuration option
2008-05-05 19:15:39 -07:00
Liu Yubao 302cc11a32 Documentation on --git-dir and --work-tree 2008-04-29 23:11:57 -07:00
Christian Couder 0bb6400958 documentation: help: add info about "man.<tool>.cmd" config var
This patch also describes the current behavior for "konqueror" and
how to modify it using "man.<tool>.cmd" if needed.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-26 14:34:49 -07:00
Christian Couder 7e8114c068 documentation: help: add "man.<tool>.path" config variable
This patch documents the "man.<tool>.path" configuration
variable.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-26 14:33:56 -07:00
Paolo Bonzini 84bb2dfd9f Add a remote.*.mirror configuration option
This patch adds a remote.*.mirror configuration option that,
when set, automatically puts git-push in --mirror mode for that
remote.

Furthermore, the option is set automatically by `git remote
add --mirror'.

The code in remote.c to parse remote.*.skipdefaultupdate
had a subtle problem: a comment in the code indicated that
special care was needed for boolean options, but this care was
not used in parsing the option.  Since I was touching related
code, I did this fix too.

[jc: and I further fixed up the "ignore boolean" code.]

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:49:22 -07:00
Heikki Orsila 06cbe85503 Make core.sharedRepository more generic
git init --shared=0xxx, where '0xxx' is an octal number, will create
a repository with file modes set to '0xxx'. Users with a safe umask
value (0077) can use this option to force file modes. For example,
'0640' is a group-readable but not group-writable regardless of
user's umask value. Values compatible with old Git versions are written
as they were before, for compatibility reasons. That is, "1" for
"group" and "2" for "everybody".

"git config core.sharedRepository 0xxx" is also handled.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 18:23:54 -07:00
SZEDER Gábor f5a84c372f doc: moved merge.* config variables into separate merge-config.txt
Include the new file from config.txt and git-merge.txt.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12 19:28:18 -07:00
Junio C Hamano 3c993de9f2 Merge branch 'mk/unpack-careful'
* mk/unpack-careful:
  t5300: add test for "index-pack --strict"
  receive-pack: allow using --strict mode for unpacking objects
  unpack-objects: fix --strict handling
  t5300: add test for "unpack-objects --strict"
  unpack-objects: prevent writing of inconsistent objects
2008-04-09 00:44:17 -07:00
Josh Elsasser 6aeeffd144 Allow git-cvsserver database table name prefix to be specified.
Adds a gitcvs.dbtablenameprefix config variable, the contents of which
are prepended to any database tables names used by git-cvsserver. The
same substutions as gitcvs.dbname and gitcvs.dbuser are supported, and
any non-alphabetic characters are replaced with underscores.

A typo found in contrib/completion/git-completion.bash is also fixed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-30 22:21:35 -07:00
Junio C Hamano 970639740c gc --auto: raise default auto pack limit from 20 to 50
Recent discussion on the list, with the improvement f7c22cc (always start
looking up objects in the last used pack first, 2007-05-30) brought in,
reached the concensus that the current default 20 is too low.

Reference: http://thread.gmane.org/gmane.comp.version-control.git/77586
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-23 00:11:31 -07:00
Junio C Hamano 50c2b54b23 Merge branch 'cc/help'
* cc/help:
  Documentation/git-help: typofix
  help: warn if specified 'man.viewer' is unsupported, instead of erroring out
  Documentation: help: explain 'man.viewer' multiple values
  help: implement multi-valued "man.viewer" config option
  Documentation: help: describe 'man.viewer' config variable
  help: add "man.viewer" config var to use "woman" or "konqueror"
2008-03-15 01:10:32 -07:00
Christian Couder 1658c6149a Documention: web--browse: add info about "browser.<tool>.cmd" config var
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-14 00:31:06 -07:00
Johannes Schindelin 25ee9731c1 gc: call "prune --expire 2.weeks.ago" by default
The only reason we did not call "prune" in git-gc was that it is an
inherently dangerous operation: if there is a commit going on, you will
prune loose objects that were just created, and are, in fact, needed by the
commit object just about to be created.

Since it is dangerous, we told users so.  That led to many users not even
daring to run it when it was actually safe. Besides, they are users, and
should not have to remember such details as when to call git-gc with
--prune, or to call git-prune directly.

Of course, the consequence was that "git gc --auto" gets triggered much
more often than we would like, since unreferenced loose objects (such as
left-overs from a rebase or a reset --hard) were never pruned.

Alas, git-prune recently learnt the option --expire <minimum-age>, which
makes it a much safer operation.  This allows us to call prune from git-gc,
with a grace period of 2 weeks for the unreferenced loose objects (this
value was determined in a discussion on the git list as a safe one).

If you want to override this grace period, just set the config variable
gc.pruneExpire to a different value; an example would be

	[gc]
		pruneExpire = 6.months.ago

or even "never", if you feel really paranoid.

Note that this new behaviour makes "--prune" be a no-op.

While adding a test to t5304-prune.sh (since it really tests the implicit
call to "prune"), also the original test for "prune --expire" was moved
there from t1410-reflog.sh, where it did not belong.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2008-03-12 23:47:01 -07:00
Junio C Hamano dbdbfec441 Documentation/config: typofix
Each heading of enumerated list should end with double-colon, not single.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-12 23:44:42 -07:00
Christian Couder b8322ea83b Documentation: help: explain 'man.viewer' multiple values
Also add titles to paragraphs under "CONFIGURATION VARIABLES".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-12 23:03:35 -07:00
Christian Couder b5578f3335 Documentation: help: describe 'man.viewer' config variable
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Tested-by: Xavier Maillard <xma@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 23:02:01 -07:00
Junio C Hamano 60e3cad92e Merge branch 'maint'
* maint:
  unquote_c_style: fix off-by-one.
  test-lib: fix TERM to dumb for test repeatability
  config.txt: refer to --upload-pack and --receive-pack instead of --exec
  git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-03-07 22:43:46 -08:00
Junio C Hamano 5628a7a309 Merge branch 'dc/format-pretty'
* dc/format-pretty:
  log/show/whatchanged: introduce format.pretty configuration
  specify explicit "--pretty=medium" with `git log/show/whatchanged`
  whatchanged documentation: share description of --pretty with others
2008-03-07 22:33:26 -08:00
Uwe Kleine-König 79f43f3de8 config.txt: refer to --upload-pack and --receive-pack instead of --exec
The options --upload-pack (of git-fetch-pack) and --receive-pack (of
git-push) do the same as --exec (for both commands).  But the former options
have the more descriptive name.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07 13:29:07 -08:00
Charles Bailey 964473a042 Teach git mergetool to use custom commands defined at config time
Currently git mergetool is restricted to a set of commands defined
in the script. You can subvert the mergetool.<tool>.path to force
git mergetool to use a different command, but if you have a command
whose invocation syntax does not match one of the current tools then
you would have to write a wrapper script for it.

This patch adds two git config variable patterns which allow a more
flexible choice of merge tool.

If you run git mergetool with -t/--tool or the merge.tool config
variable set to an unrecognized tool then git mergetool will query the
mergetool.<tool>.cmd config variable. If this variable exists, then git
mergetool will treat the specified tool as a custom command and will use
a shell eval to run the command with the documented shell variables set.

mergetool.<tool>.trustExitCode can be used to indicate that the exit
code of the custom command can be used to determine the success of the
merge.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 12:07:04 -08:00
Charles Bailey 44c36d1ccc Tidy up git mergetool's backup file behaviour
Currently a backup pre-merge file with conflict markers is sometimes
kept with a .orig extenstion and sometimes removed depending on the
particular merge tool used.

This patch makes the handling consistent across all merge tools and
configurable via a new mergetool.keepBackup config variable

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 12:07:03 -08:00
Denis Cheng 94c22a5e7b log/show/whatchanged: introduce format.pretty configuration
When running log/show/whatchanged from the command line, the user may
want to use a preferred format without having to pass --pretty=<fmt>
option every time from the command line.  This teaches these three
commands to honor a new configuration variable, format.pretty.

The --pretty option given from the command line will override the
configured format.

The earlier patch fixed the in-tree callers that run these commands
for purposes other than showing the output directly to the end user
(the only other in-tree caller is "git bisect visualize", whose output
directly goes to the end user and should be affected by this patch).

Similar fixes will be needed for end-user scripts that parse the
output from these commands and expect them to be in the default pretty
format.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 12:06:09 -08:00
Martin Koegler 20dc0016ee receive-pack: allow using --strict mode for unpacking objects
When a configuration variable receive.fsckobjects is set,
receive-pack runs unpack-objects with --strict mode to check all
received objects.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 11:36:30 -08:00
Junio C Hamano 9eb7a50b6d Revert "receive-pack: use strict mode for unpacking objects"
This reverts commit 28f72a0f23.
2008-03-04 03:11:06 -08:00
Junio C Hamano eadbcd498a Merge branch 'mk/maint-parse-careful'
* mk/maint-parse-careful:
  receive-pack: use strict mode for unpacking objects
  index-pack: introduce checking mode
  unpack-objects: prevent writing of inconsistent objects
  unpack-object: cache for non written objects
  add common fsck error printing function
  builtin-fsck: move common object checking code to fsck.c
  builtin-fsck: reports missing parent commits
  Remove unused object-ref code
  builtin-fsck: move away from object-refs to fsck_walk
  add generic, type aware object chain walker

Conflicts:

	Makefile
	builtin-fsck.c
2008-03-02 15:11:07 -08:00
Martin Koegler 28f72a0f23 receive-pack: use strict mode for unpacking objects
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-28 21:56:12 -08:00
Junio C Hamano 60b188a984 Merge branch 'js/branch-track'
* js/branch-track:
  doc: documentation update for the branch track changes
  branch: optionally setup branch.*.merge from upstream local branches

Conflicts:

	Documentation/config.txt
	Documentation/git-branch.txt
	Documentation/git-checkout.txt
	builtin-branch.c
	cache.h
	t/t7201-co.sh
2008-02-27 13:02:57 -08:00
Junio C Hamano 5372715ed2 Merge branch 'db/host-alias'
* db/host-alias:
  url rewriting: take longest and first match
  Add support for url aliases in config files
  Use ALLOC_GROW in remote.{c,h}
2008-02-27 11:54:13 -08:00
Junio C Hamano 3c972e1ec4 Merge branch 'ae/pack-autothread'
* ae/pack-autothread:
  Revert "pack-objects: Print a message describing the number of threads for packing"
  pack-objects: Print a message describing the number of threads for packing
  pack-objects: Add runtime detection of online CPU's
2008-02-27 11:54:03 -08:00
Junio C Hamano 844112cac0 url rewriting: take longest and first match
Earlier we had a cop-out in the documentation to make the
behaviour "undefined" if configuration had more than one
insteadOf that would match the target URL, like this:

    [url "git://git.or.cz/"]
	insteadOf = "git.or.cz:"       ; (1)
	insteadOf = "repo.or.cz:"      ; (2)
    [url "/local/mirror/"]
	insteadOf = "git.or.cz:myrepo" ; (3)
	insteadOf = "repo.or.cz:"      ; (4)

It would be most natural to take the longest and first match, i.e.

 - rewrite "git.or.cz:frotz" to "git://git.or.cz/frotz" by using
   (1),

 - rewrite "git.or.cz:myrepo/xyzzy" to "/local/mirror/xyzzy" by favoring
   (3) over (1), and

 - rewrite "repo.or.cz:frotz" to "git://git.or.cz/frotz" by
   favoring (2) over (4).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-24 22:34:13 -08:00
Daniel Barkalow 55029ae4da Add support for url aliases in config files
This allows users with different preferences for access methods to the
same remote repositories to rewrite each other's URLs by pattern
matching across a large set of similiarly set up repositories to each
get the desired access.

For example, if you don't have a kernel.org account, you might want
settings like:

[url "git://git.kernel.org/pub/"]
      insteadOf = master.kernel.org:/pub

Then, if you give git a URL like:

  master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git

it will act like you gave it:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git

and you can cut-and-paste pull requests in email without fixing them
by hand, for example.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-24 20:05:29 -08:00
Junio C Hamano e38f892d18 Merge branch 'jc/apply-whitespace'
* jc/apply-whitespace:
  ws_fix_copy(): move the whitespace fixing function to ws.c
  apply: do not barf on patch with too large an offset
  core.whitespace: cr-at-eol
  git-apply --whitespace=fix: fix whitespace fuzz introduced by previous run
  builtin-apply.c: pass ws_rule down to match_fragment()
  builtin-apply.c: move copy_wsfix() function a bit higher.
  builtin-apply.c: do not feed copy_wsfix() leading '+'
  builtin-apply.c: simplify calling site to apply_line()
  builtin-apply.c: clean-up apply_one_fragment()
  builtin-apply.c: mark common context lines in lineinfo structure.
  builtin-apply.c: optimize match_beginning/end processing a bit.
  builtin-apply.c: make it more line oriented
  builtin-apply.c: push match-beginning/end logic down
  builtin-apply.c: restructure "offset" matching
  builtin-apply.c: refactor small part that matches context
2008-02-24 17:23:17 -08:00
Andreas Ericsson 833e3df171 pack-objects: Add runtime detection of online CPU's
Packing objects can be done in parallell nowadays, but it's
only done if the config option pack.threads is set to a value
above 1. Because of that, the code-path used is often not the
most optimal one.

This patch adds a routine to detect the number of online CPU's
at runtime (online_cpus()). When pack.threads (or --threads=) is
given a value of 0, the number of threads is set to the number of
online CPU's. This feature is also documented.

As per Nicolas Pitre's recommendations, the default is still to
run pack-objects single-threaded unless explicitly activated,
either by configuration or by command line parameter.

The routine online_cpus() is a rework of "numcpus.c", written by
one Philip Willoughby <pgw99@doc.ic.ac.uk>. numcpus.c is in the
public domain and can presently be downloaded from
http://csgsoft.doc.ic.ac.uk/numcpus/

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-23 12:00:32 -08:00
Jay Soffian 572fc81d21 doc: documentation update for the branch track changes
Documents the branch.autosetupmerge=always setting and usage of --track
when branching from a local branch.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19 21:22:29 -08:00
Matthias Kestenholz 6b2f2d9805 Add color.ui variable which globally enables colorization if set
Signed-off-by: Matthias Kestenholz <mk@spinlock.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18 00:00:38 -08:00
Junio C Hamano 2ac4b4b222 Merge branch 'sp/safecrlf'
* sp/safecrlf:
  safecrlf: Add mechanism to warn about irreversible crlf conversions
2008-02-16 17:59:20 -08:00
Junio C Hamano 04f32cf1b3 Merge branch 'maint'
* maint: (35 commits)
  config.c: guard config parser from value=NULL
  builtin-log.c: guard config parser from value=NULL
  imap-send.c: guard config parser from value=NULL
  wt-status.c: guard config parser from value=NULL
  setup.c: guard config parser from value=NULL
  remote.c: guard config parser from value=NULL
  merge-recursive.c: guard config parser from value=NULL
  http.c: guard config parser from value=NULL
  help.c: guard config parser from value=NULL
  git.c: guard config parser from value=NULL
  diff.c: guard config parser from value=NULL
  convert.c: guard config parser from value=NULL
  connect.c: guard config parser from value=NULL
  builtin-tag.c: guard config parser from value=NULL
  builtin-show-branch.c: guard config parser from value=NULL
  builtin-reflog.c: guard config parser from value=NULL
  builtin-log.c: guard config parser from value=NULL
  builtin-config.c: guard config parser from value=NULL
  builtin-commit.c: guard config parser from value=NULL
  builtin-branch.c: guard config parser from value=NULL
  ...
2008-02-11 13:23:06 -08:00