Commit Graph

4956 Commits

Author SHA1 Message Date
Junio C Hamano
a91df69cbb Merge branch 'mm/maint-log-n-with-diff-filtering'
* mm/maint-log-n-with-diff-filtering:
  log: fix --max-count when used together with -S or -G
2011-03-19 23:25:38 -07:00
Junio C Hamano
1e239079f7 Merge branch 'ab/i18n-basic'
* ab/i18n-basic:
  i18n: "make distclean" should clean up after "make pot"
  i18n: Makefile: "pot" target to extract messages marked for translation
  i18n: add stub Q_() wrapper for ngettext
  i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set
  i18n: add GETTEXT_POISON to simulate unfriendly translator
  i18n: add no-op _() and N_() wrappers
  commit, status: use status_printf{,_ln,_more} helpers
  commit: refer to commit template as s->fp
  wt-status: add helpers for printing wt-status lines

Conflicts:
	builtin/commit.c
2011-03-19 23:24:42 -07:00
Junio C Hamano
0d7f242110 Merge branch 'jk/trace-sifter'
* jk/trace-sifter:
  trace: give repo_setup trace its own key
  add packet tracing debug code
  trace: add trace_strbuf
  trace: factor out "do we want to trace" logic
  trace: refactor to support multiple env variables
  trace: add trace_vprintf
2011-03-19 23:24:12 -07:00
Junio C Hamano
dc7f96f1f4 Merge branch 'jk/format-patch-multiline-header'
* jk/format-patch-multiline-header:
  format-patch: rfc2047-encode newlines in headers
  format-patch: wrap long header lines
  strbuf: add fixed-length version of add_wrapped_text
2011-03-19 23:24:08 -07:00
René Scharfe
c41dd2fd7d grep: read patterns from stdin with -f -
Support the well-know convention of reading standard input instead of a
named file if "-" (dash) is specified.  GNU grep does the same.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-19 21:46:52 -07:00
Carlos Martín Nieto
e2a57aac8a Name make_*_path functions more accurately
Rename the make_*_path functions so it's clearer what they do, in
particlar make clear what the differnce between make_absolute_path and
make_nonrelative_path is by renaming them real_path and absolute_path
respectively. make_relative_path has an understandable name and is
renamed to relative_path to maintain the name convention.

The function calls have been replaced 1-to-1 in their usage.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-17 16:08:30 -07:00
Junio C Hamano
b2f6eab402 Merge branch 'maint'
* maint:
  Prepare draft release notes to 1.7.4.2
  gitweb: highlight: replace tabs with spaces
  make_absolute_path: return the input path if it points to our buffer
  valgrind: ignore SSE-based strlen invalid reads
  diff --submodule: split into bite-sized pieces
  cherry: split off function to print output lines
  branch: split off function that writes tracking info and commit subject
  standardize brace placement in struct definitions
  compat: make gcc bswap an inline function
  enums: omit trailing comma for portability

Conflicts:
	RelNotes
2011-03-16 16:59:30 -07:00
Junio C Hamano
afb497d472 Merge branch 'jn/maint-commit-missing-template' into maint
* jn/maint-commit-missing-template:
  commit: error out for missing commit message template
2011-03-16 16:47:26 -07:00
Junio C Hamano
43c1b6efb8 Merge branch 'lt/rename-no-extra-copy-detection' into maint
* lt/rename-no-extra-copy-detection:
  diffcore-rename: improve estimate_similarity() heuristics
  diffcore-rename: properly honor the difference between -M and -C
  for_each_hash: allow passing a 'void *data' pointer to callback
2011-03-16 16:47:26 -07:00
Junio C Hamano
4e530c5049 Merge branch 'jk/diffstat-binary' into maint
* jk/diffstat-binary:
  diff: don't retrieve binary blobs for diffstat
  diff: handle diffstat of rewritten binary files
2011-03-16 16:47:26 -07:00
Junio C Hamano
c9b7cc0473 Merge branch 'jn/test-terminal-punt-on-osx-breakage' into maint
* jn/test-terminal-punt-on-osx-breakage:
  tests: skip terminal output tests on OS X
2011-03-16 16:47:26 -07:00
Junio C Hamano
8209b7fb9b Merge branch 'jk/fail-null-clone' into maint
* jk/fail-null-clone:
  clone: die when trying to clone missing local path
2011-03-16 16:47:26 -07:00
Junio C Hamano
7633a5ab9a Merge branch 'mg/placeholders-are-lowercase' into maint
* mg/placeholders-are-lowercase:
  Make <identifier> lowercase in Documentation
  Make <identifier> lowercase as per CodingGuidelines
  Make <identifier> lowercase as per CodingGuidelines
  Make <identifier> lowercase as per CodingGuidelines
  CodingGuidelines: downcase placeholders in usage messages
2011-03-16 16:47:25 -07:00
Junio C Hamano
bd2700dbdf Merge branch 'mg/patch-id' into maint
* mg/patch-id:
  git-patch-id: do not trip over "no newline" markers
  git-patch-id: test for "no newline" markers
2011-03-16 16:47:25 -07:00
Junio C Hamano
5b8aac32fb Merge branch 'js/maint-merge-use-prepare-commit-msg-hook' into maint
* js/maint-merge-use-prepare-commit-msg-hook:
  merge: honor prepare-commit-msg hook
2011-03-16 16:47:25 -07:00
Carlos Martín Nieto
b406a2d3e3 valgrind: ignore SSE-based strlen invalid reads
Some versions of strlen use SSE to speed up the calculation and load 4
bytes at a time, even if it means reading past the end of the
allocated memory. This read is safe and when the strlen function is
inlined, it is not replaced by valgrind, which reports a
false-possitive.

Tell valgrind to ignore this particular error, as the read is, in
fact, safe. Current upstream-released version 3.6.1 is affected. Some
distributions have this fixed in their latest versions.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-16 13:19:56 -07:00
Junio C Hamano
663ee1a4c9 Merge branch 'jh/maint-do-not-track-non-branches'
* jh/maint-do-not-track-non-branches:
  branch/checkout --track: Ensure that upstream branch is indeed a branch
2011-03-15 14:22:13 -07:00
Piotr Krukowiecki
0986de94f9 Documentation: running test with --debug keeps "trash" directory
Signed-off-by: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-15 14:18:34 -07:00
Junio C Hamano
ae4479d494 Merge branch 'pw/p4'
* pw/p4:
  git-p4: test clone @all
  git-p4: fix clone @all regression
2011-03-13 00:10:06 -08:00
Pete Wyckoff
f0c9fe0504 git-p4: test clone @all
Cloning a p4 depot by default generates a single commit.  The use
of the "@all" revision specifier instead tells git-p4 to import
all commits.  Check to make sure both these invocations work as
expected.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-13 00:06:25 -08:00
Junio C Hamano
66ecd2d053 Merge branch 'js/cherry-pick-usability'
* js/cherry-pick-usability:
  Teach commit about CHERRY_PICK_HEAD
  bash: teach __git_ps1 about CHERRY_PICK_HEAD
  Introduce CHERRY_PICK_HEAD
  t3507: introduce pristine-detach helper
2011-03-09 15:56:17 -08:00
Junio C Hamano
75618f1106 Merge branch 'js/checkout-untracked-symlink'
* js/checkout-untracked-symlink:
  do not overwrite untracked symlinks
  Demonstrate breakage: checkout overwrites untracked symlink with directory
2011-03-09 15:54:04 -08:00
Junio C Hamano
3814888a63 Merge branch 'so/submodule-no-update-first-time'
* so/submodule-no-update-first-time:
  t7406: "git submodule update {--merge|--rebase]" with new submodules
  submodule: no [--merge|--rebase] when newly cloned
2011-03-09 15:53:32 -08:00
Matthieu Moy
251df09be3 log: fix --max-count when used together with -S or -G
The --max-count limit is implemented by counting revisions in
get_revision(), but the -S and -G take effect later when running diff.
Hence "--max-count=10 -Sfoo" meant "examine the 10 first revisions, and
out of them, show only those changing the occurences of foo", not "show 10
revisions changing the occurences of foo".

In case the commit isn't actually shown, cancel the decrement of
max_count.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-09 14:28:24 -08:00
Junio C Hamano
31f4da593b Merge branch 'maint'
* maint:
  Fix typo in t/README
  ls-remote documentation: <refs> argument is optional
  Add Author and Documentation sections to git-for-each-ref.txt
  Documentation: remove redundant colons in git-for-each-ref.txt
2011-03-09 14:20:39 -08:00
Mathias Lafeldt
681186ae3a Fix typo in t/README
Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-09 12:53:13 -08:00
Jeff King
7e2342d098 trace: give repo_setup trace its own key
You no longer get this output with GIT_TRACE=1; instead, you
can do GIT_TRACE_SETUP=1.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-08 12:12:04 -08:00
Jonathan Nieder
309552295a i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set
Tweak the GETTEXT_POISON facility so it is activated at run time
instead of compile time.  If the GIT_GETTEXT_POISON environment
variable is set, _(msg) will result in gibberish as before; but if the
GIT_GETTEXT_POISON variable is not set, it will return the message for
human-readable output.  So the behavior of mistranslated and
untranslated git can be compared without rebuilding git in between.

For simplicity we always set the GIT_GETTEXT_POISON variable in tests.

This does not affect builds without the GETTEXT_POISON compile-time
option set, so non-i18n git will not be slowed down.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-08 12:10:03 -08:00
Ævar Arnfjörð Bjarmason
bb946bba76 i18n: add GETTEXT_POISON to simulate unfriendly translator
Add a new GETTEXT_POISON compile-time parameter to make _(msg) always
return gibberish. So now you can run

	make GETTEXT_POISON=YesPlease

to get a copy of git that functions correctly (one hopes) but produces
output that is in nobody's native language at all.

This is a debugging aid for people who are working on the i18n part of
the system, to make sure that they are not marking plumbing messages
that should never be translated with _().

As new strings get marked for translation, naturally a number of tests
will be broken in this mode. Tests that depend on output from
Porcelain will need to be marked with the new C_LOCALE_OUTPUT test
prerequisite. Newly failing tests that do not depend on output from
Porcelain would be bugs due to messages that should not have been
marked for translation.

Note that the string we're using ("# GETTEXT POISON #") intentionally
starts the pound sign. Some of Git's tests such as
t3404-rebase-interactive.sh rely on interactive editing with a fake
editor, and will needlessly break if the message doesn't start with
something the interactive editor considers a comment.

A future patch will fix fix the underlying cause of that issue by
adding "#" characters to the commit advice automatically.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-08 12:10:03 -08:00
Junio C Hamano
5cb3c9b7df Merge branch 'jn/maint-commit-missing-template'
* jn/maint-commit-missing-template:
  commit: error out for missing commit message template
2011-03-04 15:02:27 -08:00
Junio C Hamano
1538f21bfb Merge branch 'jk/diffstat-binary'
* jk/diffstat-binary:
  diff: don't retrieve binary blobs for diffstat
  diff: handle diffstat of rewritten binary files
2011-03-04 15:02:27 -08:00
Junio C Hamano
24161eb036 Merge branch 'lt/rename-no-extra-copy-detection'
* lt/rename-no-extra-copy-detection:
  diffcore-rename: improve estimate_similarity() heuristics
  diffcore-rename: properly honor the difference between -M and -C
  for_each_hash: allow passing a 'void *data' pointer to callback
2011-03-04 15:02:27 -08:00
Junio C Hamano
53d31d71b7 Merge branch 'jn/test-terminal-punt-on-osx-breakage'
* jn/test-terminal-punt-on-osx-breakage:
  tests: skip terminal output tests on OS X
2011-03-04 15:02:26 -08:00
Junio C Hamano
51aca1665b Merge branch 'jk/fail-null-clone'
* jk/fail-null-clone:
  clone: die when trying to clone missing local path
2011-03-04 15:02:26 -08:00
Junio C Hamano
f70f736bcb Merge branch 'svn-fe' of git://repo.or.cz/git/jrn
* 'svn-fe' of git://repo.or.cz/git/jrn: (31 commits)
  fast-import: make code "-Wpointer-arith" clean
  vcs-svn: teach line_buffer about temporary files
  vcs-svn: allow input from file descriptor
  vcs-svn: allow character-oriented input
  vcs-svn: add binary-safe read function
  t0081 (line-buffer): add buffering tests
  vcs-svn: tweak test-line-buffer to not assume line-oriented input
  tests: give vcs-svn/line_buffer its own test script
  vcs-svn: make test-line-buffer input format more flexible
  vcs-svn: teach line_buffer to handle multiple input files
  vcs-svn: collect line_buffer data in a struct
  vcs-svn: replace buffer_read_string memory pool with a strbuf
  vcs-svn: eliminate global byte_buffer
  fast-import: add 'ls' command
  vcs-svn: Allow change nodes for root of tree (/)
  vcs-svn: Implement Prop-delta handling
  vcs-svn: Sharpen parsing of property lines
  vcs-svn: Split off function for handling of individual properties
  vcs-svn: Make source easier to read on small screens
  vcs-svn: More dump format sanity checks
  ...
2011-02-28 16:33:45 -08:00
Junio C Hamano
fbfeeaf294 Merge branch 'lp/config-vername-check'
* lp/config-vername-check:
  Disallow empty section and variable names
  Sanity-check config variable names
2011-02-27 21:58:31 -08:00
Junio C Hamano
ecd75ddb6f Merge branch 'mg/placeholders-are-lowercase'
* mg/placeholders-are-lowercase:
  Make <identifier> lowercase in Documentation
  Make <identifier> lowercase as per CodingGuidelines
  Make <identifier> lowercase as per CodingGuidelines
  Make <identifier> lowercase as per CodingGuidelines
  CodingGuidelines: downcase placeholders in usage messages
2011-02-27 21:58:30 -08:00
Junio C Hamano
c8cdbf2bad Merge branch 'mg/patch-id'
* mg/patch-id:
  git-patch-id: do not trip over "no newline" markers
  git-patch-id: test for "no newline" markers
2011-02-27 21:58:30 -08:00
Junio C Hamano
66a6a31420 Merge branch 'mz/rerere-remaining'
* mz/rerere-remaining:
  mergetool: don't skip modify/remove conflicts
  rerere "remaining"
2011-02-27 21:58:30 -08:00
Junio C Hamano
11e4b4fa49 Merge branch 'js/maint-merge-use-prepare-commit-msg-hook'
* js/maint-merge-use-prepare-commit-msg-hook:
  merge: honor prepare-commit-msg hook
2011-02-27 21:58:30 -08:00
Junio C Hamano
fc7ae9c156 Merge branch 'nd/hash-object-sanity'
* nd/hash-object-sanity:
  Make hash-object more robust against malformed objects

Conflicts:
	cache.h
2011-02-27 21:58:30 -08:00
Junio C Hamano
8d3a362028 Merge branch 'pw/p4'
* pw/p4:
  git-p4: support clone --bare
  git-p4: decode p4 wildcard characters
  git-p4: better message for "git-p4 sync" when not cloned
  git-p4: reinterpret confusing p4 message
  git-p4: accommodate new move/delete type in p4
  git-p4: add missing newline in initial import message
  git-p4: fix key error for p4 problem
  git-p4: test script
2011-02-27 21:58:30 -08:00
Junio C Hamano
c0791f365e Merge branch 'uk/checkout-ambiguous-ref'
* uk/checkout-ambiguous-ref:
  Rename t2019 with typo "amiguous" that meant "ambiguous"
  checkout: rearrange update_refs_for_switch for clarity
  checkout: introduce --detach synonym for "git checkout foo^{commit}"
  checkout: split off a function to peel away branchname arg
  checkout: fix bug with ambiguous refs

Conflicts:
	builtin/checkout.c
2011-02-27 21:58:29 -08:00
Junio C Hamano
8e949a4acc Merge branch 'mo/perl-bidi-pipe-envfix'
* mo/perl-bidi-pipe-envfix:
  perl: command_bidi_pipe() method should set-up git environmens
2011-02-27 21:58:28 -08:00
Junio C Hamano
42e3086bf6 Merge branch 'en/object-list-with-pathspec'
* en/object-list-with-pathspec:
  Add testcases showing how pathspecs are handled with rev-list --objects
  Make rev-list --objects work together with pathspecs
2011-02-27 21:17:36 -08:00
Junio C Hamano
d5c87a802d Merge branch 'nd/struct-pathspec'
* nd/struct-pathspec: (22 commits)
  t6004: add pathspec globbing test for log family
  t7810: overlapping pathspecs and depth limit
  grep: drop pathspec_matches() in favor of tree_entry_interesting()
  grep: use writable strbuf from caller for grep_tree()
  grep: use match_pathspec_depth() for cache/worktree grepping
  grep: convert to use struct pathspec
  Convert ce_path_match() to use match_pathspec_depth()
  Convert ce_path_match() to use struct pathspec
  struct rev_info: convert prune_data to struct pathspec
  pathspec: add match_pathspec_depth()
  tree_entry_interesting(): optimize wildcard matching when base is matched
  tree_entry_interesting(): support wildcard matching
  tree_entry_interesting(): fix depth limit with overlapping pathspecs
  tree_entry_interesting(): support depth limit
  tree_entry_interesting(): refactor into separate smaller functions
  diff-tree: convert base+baselen to writable strbuf
  glossary: define pathspec
  Move tree_entry_interesting() to tree-walk.c and export it
  tree_entry_interesting(): remove dependency on struct diff_options
  Convert struct diff_options to use struct pathspec
  ...
2011-02-27 21:17:36 -08:00
Jakub Narebski
e5ea66f9e5 gitweb: Make i18n (encoding) tests in t9500 leave clean state
The most important issue is that after unsetting `i18n.commitencoding'
config variable t9500 no longer will use author and comitter name
containing ISO-8859-1 characters, which are invalid UTF-8 characters.

Besides it is good practice in general to clean up the state in tests.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-27 15:36:33 -08:00
Jonathan Nieder
a62bbf8f01 Merge commit 'jn/svn-fe' of git://github.com/gitster/git into svn-fe
* git://github.com/gitster/git:
  vcs-svn: Allow change nodes for root of tree (/)
  vcs-svn: Implement Prop-delta handling
  vcs-svn: Sharpen parsing of property lines
  vcs-svn: Split off function for handling of individual properties
  vcs-svn: Make source easier to read on small screens
  vcs-svn: More dump format sanity checks
  vcs-svn: Reject path nodes without Node-action
  vcs-svn: Delay read of per-path properties
  vcs-svn: Combine repo_replace and repo_modify functions
  vcs-svn: Replace = Delete + Add
  vcs-svn: handle_node: Handle deletion case early
  vcs-svn: Use mark to indicate nodes with included text
  vcs-svn: Unclutter handle_node by introducing have_props var
  vcs-svn: Eliminate node_ctx.mark global
  vcs-svn: Eliminate node_ctx.srcRev global
  vcs-svn: Check for errors from open()
  vcs-svn: Allow simple v3 dumps (no deltas yet)

Conflicts:
	t/t9010-svn-fe.sh
	vcs-svn/svndump.c
2011-02-26 05:21:29 -06:00
Jonathan Nieder
cb3f87cf1b vcs-svn: allow input from file descriptor
Based-on-patch-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26 04:59:37 -06:00
Jonathan Nieder
e832f43c1d vcs-svn: add binary-safe read function
buffer_read_string works well for non line-oriented input except for
one problem: it does not tell the caller how many bytes were actually
written.  This means that unless one is very careful about checking
for errors (and eof) the calling program cannot tell the difference
between the string "foo" followed by an early end of file and the
string "foo\0bar\0baz".

So introduce a variant that reports the length, too, a thinner wrapper
around strbuf_fread.  Its result is written to a strbuf so the caller
does not need to keep track of the number of bytes read.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26 04:59:37 -06:00