Commit Graph

22893 Commits

Author SHA1 Message Date
Junio C Hamano
ffe84bbc1f Merge branch 'jl/submodule-ignore-diff' into next
* jl/submodule-ignore-diff:
  Add tests for the diff.ignoreSubmodules config option
  Add the 'diff.ignoreSubmodules' config setting
  Submodules: Use "ignore" settings from .gitmodules too for diff and status
  Submodules: Add the new "ignore" config option for diff and status

Conflicts:
	diff.c
	submodule.c
2010-08-12 18:55:31 -07:00
Junio C Hamano
377e3f0672 Merge branch 'mm/rebase-i-exec' into next
* mm/rebase-i-exec:
  test-lib: user-friendly alternatives to test [-d|-f|-e]
  rebase -i: add exec command to launch a shell command

Conflicts:
	git-rebase--interactive.sh
2010-08-12 18:44:56 -07:00
Junio C Hamano
86cc5c4522 Merge branch 'so/http-user-agent' into next
* so/http-user-agent:
  Allow HTTP user agent string to be modified.
2010-08-12 18:39:00 -07:00
Junio C Hamano
431f7af2a3 Merge branch 'sr/local-config' into next
* sr/local-config:
  config: add --local option
2010-08-12 18:38:44 -07:00
Junio C Hamano
ce38436199 Merge branch 'cc/find-commit-subject' into next
* cc/find-commit-subject:
  blame: use find_commit_subject() instead of custom code
  merge-recursive: use find_commit_subject() instead of custom code
  bisect: use find_commit_subject() instead of custom code
  revert: rename variables related to subject in get_message()
  revert: refactor code to find commit subject in find_commit_subject()
  revert: fix off by one read when searching the end of a commit subject
2010-08-12 18:38:21 -07:00
Junio C Hamano
9a63fd4359 Merge branch 'jh/clean-exclude' into next
* jh/clean-exclude:
  Add test for git clean -e.
  Add -e/--exclude to git-clean.
2010-08-12 18:37:37 -07:00
Junio C Hamano
16d4e11d52 Merge branch 'jh/use-test-must-fail' into next
* jh/use-test-must-fail:
  Convert "! git" to "test_must_fail git"
2010-08-12 18:37:20 -07:00
Junio C Hamano
2cf70dfb2e Merge branch 'jn/fix-abbrev' into next
* jn/fix-abbrev:
  examples/commit: use --abbrev for commit summary
  checkout, commit: remove confusing assignments to rev.abbrev
  archive: abbreviate substituted commit ids again
2010-08-12 18:36:52 -07:00
Junio C Hamano
a6d25c490e Merge branch 'jn/rebase-rename-am' into next
* jn/rebase-rename-am:
  rebase: protect against diff.renames configuration
  t3400 (rebase): whitespace cleanup
  Teach "apply --index-info" to handle rename patches
  t4150 (am): futureproof against failing tests
  t4150 (am): style fix
2010-08-12 18:36:39 -07:00
Junio C Hamano
0aa2fdbf7f Merge branch 'ml/rebase-x-strategy' into next
* ml/rebase-x-strategy:
  rebase: support -X to pass through strategy options
2010-08-12 18:36:28 -07:00
Junio C Hamano
35ceb9826e Merge branch 'mm/shortopt-detached' into next
* mm/shortopt-detached:
  log: parse separate option for --glob
  log: parse separate options like git log --grep foo
  diff: parse separate options --stat-width n, --stat-name-width n
  diff: split off a function for --stat-* option parsing
  diff: parse separate options like -S foo

Conflicts:
	revision.c
2010-08-12 18:36:21 -07:00
Junio C Hamano
4f7a3b9117 Merge branch 'nd/fix-sparse-checkout' into next
* nd/fix-sparse-checkout:
  unpack-trees: mark new entries skip-worktree appropriately
  unpack-trees: do not check for conflict entries too early
  unpack-trees: let read-tree -u remove index entries outside sparse area
  unpack-trees: only clear CE_UPDATE|CE_REMOVE when skip-worktree is always set
  t1011 (sparse checkout): style nitpicks
2010-08-12 18:35:19 -07:00
Junio C Hamano
3fbd06c0f4 Merge branch 'vs/doc-spell' into next
* vs/doc-spell:
  Documentation: spelling fixes
2010-08-12 18:34:24 -07:00
Junio C Hamano
8a9e1d0971 Merge branch 'ab/report-corrupt-object-with-type' into next
* ab/report-corrupt-object-with-type:
  sha1_file: Show the the type and path to corrupt objects
2010-08-12 18:34:18 -07:00
Junio C Hamano
9b7e3c9056 Merge branch 'kf/post-receive-sample-hook' into next
* kf/post-receive-sample-hook:
  post-receive-email: optional message line count limit
2010-08-12 18:34:05 -07:00
Junio C Hamano
3b33c33b33 Merge branch 'master' into next
* master:
  push: mention "git pull" in error message for non-fast forwards
  Standardize do { ... } while (0) style
  t/t7003: replace \t with literal tab in sed expression
  index-pack: Don't follow replace refs.
2010-08-12 18:33:37 -07:00
Junio C Hamano
3d04589758 Merge branch 'jc/sha1-name-find-fix'
* jc/sha1-name-find-fix:
  sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
	sha1_name.c
2010-08-12 18:32:49 -07:00
Junio C Hamano
ba6ca757bb Merge branch 'jn/doc-pull'
* jn/doc-pull:
  Documentation: flesh out “git pull” description
2010-08-12 18:32:37 -07:00
Junio C Hamano
2dc3b199af Merge branch 'jn/maint-gitweb-dynconf'
* jn/maint-gitweb-dynconf:
  gitweb: allow configurations that change with each request
2010-08-12 18:32:31 -07:00
Junio C Hamano
14661fe59f Merge branch 'bc/use-more-hardlinks-in-install'
* bc/use-more-hardlinks-in-install:
  Makefile: make hard/symbolic links for non-builtins too
  Makefile: link builtins residing in bin directory to main git binary too
2010-08-12 18:32:20 -07:00
Junio C Hamano
a9c6305a7c Merge branch 'tr/rfc-reset-doc'
* tr/rfc-reset-doc:
  Documentation/reset: move "undo permanently" example behind "make topic"
  Documentation/reset: reorder examples to match description
  Documentation/reset: promote 'examples' one section up
  Documentation/reset: separate options by mode
  Documentation/git-reset: reorder modes for soft-mixed-hard progression
2010-08-12 18:31:43 -07:00
Junio C Hamano
aa8b8f40df Merge branch 'jn/parse-date-basic'
* jn/parse-date-basic:
  Export parse_date_basic() to convert a date string to timestamp
2010-08-12 18:31:03 -07:00
Junio C Hamano
1c80c9b2cb Merge branch 'sp/fix-smart-http-deadlock-on-error'
* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure
2010-08-12 18:27:01 -07:00
Junio C Hamano
642f7108f6 Merge branch 'maint'
* maint:
  push: mention "git pull" in error message for non-fast forwards
  Standardize do { ... } while (0) style
  t/t7003: replace \t with literal tab in sed expression
  index-pack: Don't follow replace refs.
2010-08-12 18:07:09 -07:00
Matthieu Moy
452c6d506b push: mention "git pull" in error message for non-fast forwards
The message remains fuzzy to include "git pull", "git pull --rebase" and
others, but directs the user to the simplest solution in the vast
majority of cases.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12 18:06:07 -07:00
Jonathan Nieder
987460611a Standardize do { ... } while (0) style
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12 15:44:51 -07:00
Brandon Casey
0d1d6e50cf t/t7003: replace \t with literal tab in sed expression
The sed utilities on IRIX and Solaris do not interpret the sequence '\t'
to mean a tab character;  they read a literal character 't'.  So, use a
literal tab instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12 15:35:04 -07:00
Nelson Elhage
6e2a09d24b index-pack: Don't follow replace refs.
Without this, attempting to index a pack containing objects that have been
replaced results in a fatal error that looks like:

fatal: SHA1 COLLISION FOUND WITH <replaced-object> !

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12 13:26:05 -07:00
Junio C Hamano
ca9fef0665 Merge branch 'jn/parse-date-basic' into next
* jn/parse-date-basic:
  Export parse_date_basic() to convert a date string to timestamp
2010-08-11 14:22:33 -07:00
Junio C Hamano
8e7c8d1464 Merge branch 'tr/rfc-reset-doc' into next
* tr/rfc-reset-doc:
  Documentation/reset: move "undo permanently" example behind "make topic"
  Documentation/reset: reorder examples to match description
  Documentation/reset: promote 'examples' one section up
  Documentation/reset: separate options by mode
  Documentation/git-reset: reorder modes for soft-mixed-hard progression
2010-08-11 14:22:32 -07:00
Junio C Hamano
333f9df0b2 Merge branch 'jh/graph-next-line' into next
* jh/graph-next-line:
  Enable custom schemes for column colors in the graph API
  Make graph_next_line() available in the graph.h API
2010-08-11 14:22:32 -07:00
Junio C Hamano
993dc02077 Merge branch 'ar/string-list-foreach' into next
* ar/string-list-foreach:
  Convert the users of for_each_string_list to for_each_string_list_item macro
  Add a for_each_string_list_item macro
2010-08-11 14:22:31 -07:00
Junio C Hamano
6900d2c76b Merge branch 'hv/submodule-find-ff-merge' into next
* hv/submodule-find-ff-merge:
  Implement automatic fast-forward merge for submodules
  setup_revisions(): Allow walking history in a submodule
  Teach ref iteration module about submodules
2010-08-11 14:22:31 -07:00
Junio C Hamano
5e19de0564 Merge branch 'jn/fast-import-subtree' into next
* jn/fast-import-subtree:
  Teach fast-import to import subtrees named by tree id
2010-08-11 14:22:31 -07:00
Junio C Hamano
5433b51a05 Merge branch 'tc/checkout-B' into next
* tc/checkout-B:
  builtin/checkout: handle -B from detached HEAD correctly
  builtin/checkout: learn -B
  builtin/checkout: reword hint for -b
  add tests for checkout -b
2010-08-11 14:22:31 -07:00
Junio C Hamano
bcc027147d Merge branch 'tr/xsize-bits' into next
* tr/xsize-bits:
  xsize_t: check whether we lose bits
2010-08-11 14:22:29 -07:00
Junio C Hamano
0a6369e0c9 Merge branch 'sp/fix-smart-http-deadlock-on-error' into next
* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure
2010-08-11 14:22:29 -07:00
Junio C Hamano
59dd30ee43 Merge branch 'bc/use-more-hardlinks-in-install' into next
* bc/use-more-hardlinks-in-install:
  Makefile: make hard/symbolic links for non-builtins too
  Makefile: link builtins residing in bin directory to main git binary too
2010-08-11 14:22:28 -07:00
Junio C Hamano
a94ce85b97 Merge branch 'jn/maint-gitweb-dynconf' into next
* jn/maint-gitweb-dynconf:
  gitweb: allow configurations that change with each request
2010-08-11 14:22:28 -07:00
Junio C Hamano
a223479fdf Merge branch 'jn/doc-pull' into next
* jn/doc-pull:
  Documentation: flesh out “git pull” description
2010-08-11 14:22:28 -07:00
Junio C Hamano
51106a5709 Merge branch 'jc/sha1-name-find-fix' into next
* jc/sha1-name-find-fix:
  sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
	sha1_name.c
2010-08-11 14:22:28 -07:00
Junio C Hamano
44bcd1fd44 Merge branch 'master' into next
* master:
  post-receive-email: remove spurious commas in email subject
  fast-import: export correctly marks larger than 2^20-1
  t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
  diff: strip extra "/" when stripping prefix
2010-08-11 14:22:07 -07:00
Spencer E. Olson
b1d1058cc3 Allow HTTP user agent string to be modified.
Some firewalls restrict HTTP connections based on the clients user agent.  This
commit provides the user the ability to modify the user agent string via either
a new config option (http.useragent) or by an environment variable
(GIT_HTTP_USER_AGENT).

Relevant documentation is added to Documentation/config.txt.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 14:07:31 -07:00
Junio C Hamano
7980e41746 Merge branch 'maint'
* maint:
  post-receive-email: remove spurious commas in email subject
  fast-import: export correctly marks larger than 2^20-1
  t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
  diff: strip extra "/" when stripping prefix
2010-08-11 11:32:00 -07:00
Matthieu Moy
b5e233ecc4 post-receive-email: remove spurious commas in email subject
The previous form produced subjects like

  [SCM] project.git branch, foo, updated. ...

The new one will produce the lighter

  [SCM] project.git branch foo updated. ...

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 11:23:25 -07:00
Raja R Harinath
7e7db5e452 fast-import: export correctly marks larger than 2^20-1
dump_marks_helper() has a bug when dumping marks larger than 2^20-1,
i.e., when the sparse array has more than two levels.  The bug was
that the 'base' counter was being shifted by 20 bits at level 3, and
then again by 10 bits at level 2, rather than a total shift of 20 bits
in this argument to the recursive call:

  (base + k) << m->shift

There are two ways to fix this correctly, the elegant:

  (base + k) << 10

and the one I chose due to edit distance:

  base + (k << m->shift)

Signed-off-by: Raja R Harinath <harinath@hurrynot.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 10:45:15 -07:00
Ævar Arnfjörð Bjarmason
5536934239 t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
Change the git-svn tests to use $PERL_PATH, not the "perl" in $PATH.

Using perl in $PATH was added by Sam Vilain in v1.6.6-rc0~95^2~3,
Philippe Bruhat introduced $PERL_PATH to the test suite in
v1.6.6-rc0~9^2, but the lib-git-svn.sh tests weren't updated to use
the new convention.

This resulted in the git-svn tests always being skipped on my
system. My /usr/bin/perl has access to SVN::Core and SVN::Repos, but
the perl in my $PATH does not.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 10:41:08 -07:00
Matthieu Moy
2caf20c52b test-lib: user-friendly alternatives to test [-d|-f|-e]
The helper functions are implemented, documented, and used in a few
places to validate them, but not everywhere to avoid useless code churn.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 10:21:36 -07:00
Matthieu Moy
cd035b1cef rebase -i: add exec command to launch a shell command
The typical usage pattern would be to run a test (or simply a compilation
command) at given points in history.

The shell command is ran (from the worktree root), and the rebase is
stopped when the command fails, to give the user an opportunity to fix
the problem before continuing with "git rebase --continue".

This needs a little rework of skip_unnecessary_picks, which wasn't robust
enough to deal with lines like

  exec >"file    name with many spaces"

in the todolist. The new version extracts command, sha1 and rest from
each line, but outputs the line itself verbatim to avoid changing the
whitespace layout.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 10:21:34 -07:00
Jakub Narebski
d8faea9d18 diff: strip extra "/" when stripping prefix
There are two ways a user might want to use "diff --relative":

  1. For a file in a directory, like "subdir/file", the user
     can use "--relative=subdir/" to strip the directory.

  2. To strip part of a filename, like "foo-10", they can
     use "--relative=foo-".

We currently handle both of those situations. However, if the user passes
"--relative=subdir" (without the trailing slash), we produce inconsistent
results. For the unified diff format, we collapse the double-slash of
"a//file" correctly into "a/file". But for other formats (raw, stat,
name-status), we end up with "/file".

We can do what the user means here and strip the extra "/" (and only a
slash).  We are not hurting any existing users of (2) above with this
behavior change because the existing output for this case was nonsensical.

Patch by Jakub, tests and commit message by Jeff King.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11 09:46:47 -07:00