Commit graph

13615 commits

Author SHA1 Message Date
Junio C Hamano 25c4f61c51 Merge branch 'maint'
* maint:
  templates/Makefile: don't depend on local umask setting
  Correct name of diff_flush() in API documentation
  Start preparing for 1.5.4.4

Conflicts:

	RelNotes
2008-02-29 00:00:09 -08:00
Gerrit Pape 9907721501 templates/Makefile: don't depend on local umask setting
Don't take the local umask setting into account when installing the
templates/* files and directories, running 'make install' with umask set
to 077 resulted in template/* installed with permissions 700 and 600.

The problem was discovered by Florian Zumbiehl, reported through
 http://bugs.debian.org/467518

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-28 13:36:50 -08:00
Daniel Barkalow a6f13ccf24 Correct name of diff_flush() in API documentation
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-28 13:35:09 -08:00
Junio C Hamano b75bb1d695 Start preparing for 1.5.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 23:37:39 -08:00
Junio C Hamano 42be5cc612 format-patch: remove a leftover debugging message
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 22:08:57 -08:00
Johannes Schindelin be5f5bf027 completion: support format-patch's --cover-letter option
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 18:13:40 -08:00
Junio C Hamano 6d21667206 Merge branch 'maint'
* maint:
  Eliminate confusing "won't bisect on seeked tree" failure
  builtin-reflog.c: don't install new reflog on write failure
  send-email: fix In-Reply-To regression
  Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
  Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
  Prompt to continue when editing during rebase --interactive
  Documentation/git svn log: add a note about timezones.
  Don't use GIT_CONFIG in t5505-remote

Conflicts:

	t/t9001-send-email.sh
	t/t9200-git-cvsexportcommit.sh
2008-02-27 14:07:51 -08:00
Junio C Hamano a0a80f1e8a Merge branch 'git-p4' of git://repo.or.cz/git/git-p4
* 'git-p4' of git://repo.or.cz/git/git-p4:
  git-p4: Support usage of perforce client spec
  git-p4: git-p4 submit cleanups.
  git-p4: Removed git-p4 submit --direct.
  git-p4: Clean up git-p4 submit's log message handling.
  git-p4: Remove --log-substitutions feature.
  git-p4: support exclude paths
2008-02-27 13:56:42 -08:00
Carl Worth 0f497e75f0 Eliminate confusing "won't bisect on seeked tree" failure
This error message is very confusing---it doesn't tell the user
anything about how to fix the situation. And the actual fix
for the situation ("git bisect reset") does a checkout of a
potentially random branch, (compared to what the user wants to
be on for the bisect she is starting).

The simplest way to eliminate the confusion is to just make
"git bisect start" do the cleanup itself. There's no significant
loss of safety here since we already have a general safety in
the form of the reflog.

Note: We preserve the warning for any cogito users. We do this
by switching from .git/head-name to .git/BISECT_START for the
extra state, (which is a more descriptive name anyway).

Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:26:30 -08:00
Brandon Casey 7a0a34ca6f builtin-reflog.c: don't install new reflog on write failure
When expiring reflog entries, a new temporary log is written which contains
only the entries to retain. After it is written, it is renamed to replace
the existing reflog. Currently, we check that writing of the new log is
successful and print a message on failure, but the original reflog is still
replaced with the new reflog even on failure. This patch causes the
original reflog to be retained if we fail when writing the new reflog.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:26:24 -08:00
Jay Soffian 6ecbc851fb send-email: fix In-Reply-To regression
Fix a regression introduced by

1ca3d6e (send-email: squelch warning due to comparing undefined $_ to "")

where if the user was prompted for an initial In-Reply-To and didn't
provide one, messages would be sent out with an invalid In-Reply-To of
"<>"

Also add test cases for the regression and the fix. A small modification
was needed to allow send-email to take its replies from stdin if the
environment variable GIT_SEND_EMAIL_NOTTY is set.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:26:14 -08:00
Sebastian Noack 77266e96d3 git-svn: Don't prompt for client cert password everytime.
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:18:35 -08:00
Alexandre Julliard 21a2d69b2a git.el: Do not display empty directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Tested-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:17:58 -08:00
Junio C Hamano 3d0a936f63 Merge branch 'jm/free'
* jm/free:
  Avoid unnecessary "if-before-free" tests.

Conflicts:

	builtin-branch.c
2008-02-27 13:03:50 -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 5a4d707a6d Merge branch 'db/checkout'
* db/checkout: (21 commits)
  checkout: error out when index is unmerged even with -m
  checkout: show progress when checkout takes long time while switching branches
  Add merge-subtree back
  checkout: updates to tracking report
  builtin-checkout.c: Remove unused prefix arguments in switch_branches path
  checkout: work from a subdirectory
  checkout: tone down the "forked status" diagnostic messages
  Clean up reporting differences on branch switch
  builtin-checkout.c: fix possible usage segfault
  checkout: notice when the switched branch is behind or forked
  Build in checkout
  Move code to clean up after a branch change to branch.c
  Library function to check for unmerged index entries
  Use diff -u instead of diff in t7201
  Move create_branch into a library file
  Build-in merge-recursive
  Add "skip_unmerged" option to unpack_trees.
  Discard "deleted" cache entries after using them to update the working tree
  Send unpack-trees debugging output to stderr
  Add flag to make unpack_trees() not print errors.
  ...

Conflicts:

	Makefile
2008-02-27 12:53:26 -08:00
Junio C Hamano 992221d05e Merge branch 'db/cover-letter'
* db/cover-letter:
  Improve collection of information for format-patch --cover-letter
  Add API access to shortlog
  t4014: Replace sed's non-standard 'Q' by standard 'q'
  Support a --cc=<email> option in format-patch
  Combine To: and Cc: headers
  Fix format.headers not ending with a newline
  Add tests for extra headers in format-patch
  Add a --cover-letter option to format-patch
  Export some email and pretty-printing functions
  Improve message-id generation flow control for format-patch
  Add more tests for format-patch

Conflicts:

	builtin-log.c
	builtin-shortlog.c
	pretty.c
2008-02-27 12:06:41 -08:00
Junio C Hamano cb99be7c7d Merge branch 'js/merge'
* js/merge:
  xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUM
  xdl_merge(): make XDL_MERGE_ZEALOUS output simpler
2008-02-27 11:57:19 -08:00
Junio C Hamano 722f53ca2f Merge branch 'cw/bisect'
* cw/bisect:
  Eliminate confusing "won't bisect on seeked tree" failure
2008-02-27 11:56:08 -08:00
Junio C Hamano d87aa32935 Merge branch 'jk/help-alias'
* jk/help-alias:
  help: respect aliases
  make alias lookup a public, procedural function
  help: use parseopt
2008-02-27 11:55:43 -08:00
Junio C Hamano f79ff5c975 Merge branch 'js/run-command'
* js/run-command:
  start_command(), if .in/.out > 0, closes file descriptors, not the callers
  start_command(), .in/.out/.err = -1: Callers must close the file descriptor
2008-02-27 11:55:32 -08:00
Junio C Hamano 860cc3a4f9 Merge branch 'jc/diff-relative'
* jc/diff-relative:
  diff --relative: help working in a bare repository
  diff --relative: output paths as relative to the current subdirectory
2008-02-27 11:55:28 -08:00
Junio C Hamano b82b096b8c Merge branch 'gp/hash-stdin'
* gp/hash-stdin:
  hash-object: cleanup handling of command line options
2008-02-27 11:55:22 -08:00
Junio C Hamano 2f8e2e3eef Merge branch 'db/push-single-with-HEAD'
* db/push-single-with-HEAD:
  Resolve value supplied for no-colon push refspecs
2008-02-27 11:54:28 -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 42dd2cd3a3 Merge branch 'bc/reflog-fix'
* bc/reflog-fix:
  builtin-reflog.c: don't install new reflog on write failure
2008-02-27 11:53:48 -08:00
Junio C Hamano c6a7c606a6 Merge branch 'sp/describe'
* sp/describe:
  Use git-describe --exact-match in bash prompt on detached HEAD
  Teach git-describe --exact-match to avoid expensive tag searches
  Avoid accessing non-tag refs in git-describe unless --all is requested
  Teach git-describe to use peeled ref information when scanning tags
  Optimize peel_ref for the current ref of a for_each_ref callback
2008-02-27 11:52:20 -08:00
Johan Herland 12f0a5ea7d Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
When using the '-w $cvsdir' option to cvsexportcommit, it will chdir into
$cvsdir before executing several other git commands. If $GIT_DIR is set to
a relative path (e.g. '.'), the git commands executed by cvsexportcommit
will naturally fail.

Therefore, ensure that $GIT_DIR is absolute before the chdir to $cvsdir.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 11:35:09 -08:00
Johan Herland 9057f0a62c Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
The testcase verifies that 'git cvsexportcommit' functions correctly when
the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.').

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 11:35:05 -08:00
Jonathan del Strother 0460fb449b Prompt to continue when editing during rebase --interactive
On hitting an edit point in an interactive rebase, git should prompt
the user to run "git rebase --continue"

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 11:23:22 -08:00
Miklos Vajna a50a5c8fa6 Documentation/git svn log: add a note about timezones.
git svn log mimics the timezone converting behaviour of svn log, but
this was undocumented.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 11:19:55 -08:00
Junio C Hamano 28b01f4b5c Merge branch 'js/maint-http-push' into maint
* js/maint-http-push:
  http-push: avoid a needless goto
  http-push: do not get confused by submodules
  http-push: avoid invalid memory accesses
2008-02-27 11:09:44 -08:00
Tor Arvid Lund 3a70cdfa42 git-p4: Support usage of perforce client spec
When syncing, git-p4 will only download files that are included in the active
perforce client spec. This does not change the default behaviour - it requires
that the user either supplies the command line argument --use-client-spec, or
sets the git config option p4.useclientspec to "true".

Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27 16:27:13 +01:00
Simon Hausmann 4c750c0d8b git-p4: git-p4 submit cleanups.
Removed storing the list of commits in a configuration file. We only need the list
of commits at run-time.

Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27 16:27:10 +01:00
Simon Hausmann 0e36f2d726 git-p4: Removed git-p4 submit --direct.
This feature was originally meant to allow for quicker direct submits into perforce, but
it turns out that it is not actually quicker than doing a git commit and then running
git-p4 submit.

Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27 16:27:07 +01:00
Simon Hausmann edae1e2f40 git-p4: Clean up git-p4 submit's log message handling.
Instead of trying to substitute fields in the p4 submit template we now simply
replace the description of the submit with the log message of the git commit.

Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27 16:27:03 +01:00
Simon Hausmann 4b61b5c963 git-p4: Remove --log-substitutions feature.
This turns out to be rarely useful and is already covered by git's commit.template configuration variable.

Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27 16:26:57 +01:00
Tommy Thorn 354081d5a0 git-p4: support exclude paths
Teach git-p4 about the -/ option which adds depot paths to the exclude
list, used when cloning. The option is chosen such that the natural
Perforce syntax works, eg:

  git p4 clone //branch/path/... -//branch/path/{large,old}/...

Trailing ... on exclude paths are optional.

This is a generalization of a change by Dmitry Kakurin (thanks).

Signed-off-by: Tommy Thorn <tommy-git@thorn.ws>
Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27 15:17:05 +01:00
Daniel Barkalow 2ac8af1619 Don't use GIT_CONFIG in t5505-remote
For some reason, t5505-remote was setting GIT_CONFIG to .git/config
and exporting it. This should have been no-op, as test framework did
the same for a long time anyway.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 00:22:39 -08:00
Jakub Narebski dc1c0fffd3 Add '--fixed-strings' option to "git log --grep" and friends
Add support for -F | --fixed-strings option to "git log --grep"
and friends: "git log --author", "git log --committer=<pattern>".
Code is based on implementation of this option in "git grep".

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-26 23:59:49 -08:00
Junio C Hamano 392b78ca42 Revert "pack-objects: Print a message describing the number of threads for packing"
This reverts commit 6c723f5e6b.
The additional message may be interesting for git developers,
but not useful for the end users, and clutters the output.
2008-02-26 23:27:31 -08:00
Junio C Hamano c6fabfafbc git-apply --whitespace=fix: fix off by one thinko
When a patch adds a whitespace followed by end-of-line, the
trailing whitespace error was detected correctly but was not
fixed, due to misconversion in 42ab241 (builtin-apply.c: do not
feed copy_wsfix() leading '+').

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-26 12:24:40 -08:00
Junio C Hamano 2db511fdbd Merge branch 'maint'
* maint:
  Documentation/git-am.txt: Pass -r in the example invocation of rm -f .dotest
  timezone_names[]: fixed the tz offset for New Zealand.
  filter-branch documentation: non-zero exit status in command abort the filter
  rev-parse: fix potential bus error with --parseopt option spec handling
  Use a single implementation and API for copy_file()
  Documentation/git-filter-branch: add a new msg-filter example
  Correct fast-export file mode strings to match fast-import standard
2008-02-26 00:14:22 -08:00
Jakub Narebski b8d97d07fd gitweb: Better cutting matched string and its context
Improve look of commit search output ('search' view) by better cutting
of matched string and its context in match info, as suggested by Junio.
For example, if you are looking for "very long search string" in the
following line:

    Could somebody test this with very long search string, and see how

you would now see:

    ...this with <<very long ... string>>, and see...

instead of:

    Could som... <<very long search...>>, and see...

(where <<something>> denotes emphasized / colored fragment; matched
fragment to be more exact).

For this feature, support for fourth [optional] parameter to chop_str
subroutine was added.  This fourth parameter is used to denote where
to cut string to make it shorter.  chop_str can now cut at the
beginning (from the _left_ side of the string), in the middle
(_center_ of the string), or at the end (from the _right_ side of
the string); cutting from right is the default:

  chop_str(somestring, len, slop, 'left')    ->  ' ...string'
  chop_str(somestring, len, slop, 'center')  ->  'som ... ing'
  chop_str(somestring, len, slop, 'right')   ->  'somestr... '

If you want to use default slop (default additional length), use undef
as value for third parameter to chop_str.

While at it, return from chop_str early if given string is so short
that chop_str couldn't shorten it.  Simplify also regexp used by
chop_str.  Make ellipsis (dots) stick to shortened fragment for
cutting at ends, to better see which part got shortened.

Simplify passing all arguments to chop_str in chop_and_escape_str
subroutine. This was needed to pass additional options to chop_str.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 22:20:18 -08:00
Bryan Donlan 81fa145917 Documentation/git-am.txt: Pass -r in the example invocation of rm -f .dotest
Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 22:20:08 -08:00
Steven Drake 695ed47228 timezone_names[]: fixed the tz offset for New Zealand.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 21:56:10 -08:00
Caio Marcelo de Oliveira Filho 41e86a3774 filter-branch documentation: non-zero exit status in command abort the filter
Since commit 8c1ce0f46b filter-branch fails
when a <command> has a non-zero exit status. This commit makes it clear
in the documentation and also fixes the parent-filter example, that was
incorrectly returning non-zero when the commit being tested wasn't the
one to be rewritten.

Signed-off-by: Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 21:43:37 -08:00
Jay Soffian e103343644 rev-parse: fix potential bus error with --parseopt option spec handling
A non-empty line containing no spaces should be treated by --parseopt as
an option group header, but was causing a bus error. Also added a test
script for rev-parse --parseopt.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 21:40:12 -08:00
Daniel Barkalow 2bda2cf4f9 Improve collection of information for format-patch --cover-letter
Use the "boundary" feature to find the origin (or find that there are
multiple origins), and use the actual list of commits to pass to
shortlog.

This makes all cover letter include shortlogs, and all cover letters
for series with a single boundary commit include diffstats (if there
are multiple boundary commits it's unclear what would be meaningful as
a diffstat). Note that the single boundary test is empirical, not
theoretical; even a -2 limiting condition will give a diffstat if there's
only one boundary commit in this particular case.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
2008-02-25 21:28:32 -08:00