git
15 years agoMerge branch 'ac/cvsimport-revision-mapping' into next
Junio C Hamano [Wed, 17 Feb 2010 19:42:03 +0000 (11:42 -0800)] 
Merge branch 'ac/cvsimport-revision-mapping' into next

* ac/cvsimport-revision-mapping:
  cvsimport: new -R option: generate .git/cvs-revisions mapping

15 years agoMerge branch 'pb/log-first-parent-p-m' into next
Junio C Hamano [Wed, 17 Feb 2010 19:41:38 +0000 (11:41 -0800)] 
Merge branch 'pb/log-first-parent-p-m' into next

* pb/log-first-parent-p-m:
  git log -p -m: document -m and honor --first-parent

15 years agoMerge branch 'hm/maint-imap-send-crlf' into next
Junio C Hamano [Wed, 17 Feb 2010 19:40:40 +0000 (11:40 -0800)] 
Merge branch 'hm/maint-imap-send-crlf' into next

* hm/maint-imap-send-crlf:
  git-imap-send: Convert LF to CRLF before storing patch to draft box

15 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 17 Feb 2010 19:22:15 +0000 (11:22 -0800)] 
Merge branch 'master' into next

* master:
  gitweb: Protect escaping functions against calling on undef
  gitweb: esc_html (short) error message in die_error

15 years agogitweb: Protect escaping functions against calling on undef
Jakub Narebski [Sun, 7 Feb 2010 20:52:25 +0000 (21:52 +0100)] 
gitweb: Protect escaping functions against calling on undef

This is a bit of future-proofing esc_html and friends: when called
with undefined value they would now would return undef... which would
probably mean that error would still occur, but closer to the source
of problem.

This means that we can safely use
  esc_html(shift) || "Internal Server Error"
in die_error() instead of
  esc_html(shift || "Internal Server Error")

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogitweb: esc_html (short) error message in die_error
Jakub Narebski [Sun, 7 Feb 2010 20:51:18 +0000 (21:51 +0100)] 
gitweb: esc_html (short) error message in die_error

The error message (second argument to die_error) is meant to be short,
one-line text description of given error.  A few callers call
die_error with error message containing unescaped user supplied data
($hash, $file_name).  Instead of forcing callers to escape data,
simply call esc_html on the parameter.

Note that optional third parameter, which contains detailed error
description, is meant to be HTML formatted, and therefore should be
not escaped.

While at it update esc_html synopsis/usage, and bring default error
description to read 'Internal Server Error' (titlecased).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'mv/request-pull-modernize' into jch
Junio C Hamano [Wed, 17 Feb 2010 07:03:40 +0000 (23:03 -0800)] 
Merge branch 'mv/request-pull-modernize' into jch

* mv/request-pull-modernize:
  request-pull: avoid mentioning that the start point is a single commit

15 years agoMerge branch 'jn/makefile-script-lib' into jch
Junio C Hamano [Wed, 17 Feb 2010 07:03:20 +0000 (23:03 -0800)] 
Merge branch 'jn/makefile-script-lib' into jch

* jn/makefile-script-lib:
  Do not install shell libraries executable

15 years agoMerge branch 'sp/push-sideband' into jch
Junio C Hamano [Wed, 17 Feb 2010 07:02:43 +0000 (23:02 -0800)] 
Merge branch 'sp/push-sideband' into jch

* sp/push-sideband:
  receive-pack: Send internal errors over side-band #2
  t5401: Use a bare repository for the remote peer
  receive-pack: Send hook output over side band #2
  receive-pack: Wrap status reports inside side-band-64k
  receive-pack: Refactor how capabilities are shown to the client
  send-pack: demultiplex a sideband stream with status data
  run-command: support custom fd-set in async
  run-command: Allow stderr to be a caller supplied pipe

15 years agoMerge branch 'tc/maint-transport-ls-remote-with-void' into jch
Junio C Hamano [Wed, 17 Feb 2010 07:02:21 +0000 (23:02 -0800)] 
Merge branch 'tc/maint-transport-ls-remote-with-void' into jch

* tc/maint-transport-ls-remote-with-void:
  transport: add got_remote_refs flag

15 years agoMerge branch 'ml/maint-grep-doc' into jch
Junio C Hamano [Wed, 17 Feb 2010 07:01:28 +0000 (23:01 -0800)] 
Merge branch 'ml/maint-grep-doc' into jch

* ml/maint-grep-doc:
  grep documentation: clarify what files match

15 years agogrep documentation: clarify what files match
Mark Lodato [Tue, 16 Feb 2010 00:25:40 +0000 (19:25 -0500)] 
grep documentation: clarify what files match

Clarify that git-grep(1) searches only tracked files, and that each
<pathspec> is a pathspec, as in any other ordinary git commands.

Add an example to show a simple use case for searching all .c and .h
files in the current directory and below.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/maint-fix-test-perm' into jch
Junio C Hamano [Wed, 17 Feb 2010 06:50:22 +0000 (22:50 -0800)] 
Merge branch 'jc/maint-fix-test-perm' into jch

* jc/maint-fix-test-perm:
  lib-patch-mode.sh: Fix permission
  t6000lib: Fix permission

15 years agoMerge branch 'jc/typo'
Junio C Hamano [Wed, 17 Feb 2010 06:45:14 +0000 (22:45 -0800)] 
Merge branch 'jc/typo'

* jc/typo:
  Typofixes outside documentation area

15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 17 Feb 2010 06:40:45 +0000 (22:40 -0800)] 
Merge branch 'maint'

* maint:
  Prepare 1.7.0.1 release notes
  Fix use of mutex in threaded grep
  dwim_ref: fix dangling symref warning
  stash pop: remove 'apply' options during 'drop' invocation
  diff: make sure --output=/bad/path is caught
  Remove hyphen from "git-command" in two error messages

15 years agoPrepare 1.7.0.1 release notes
Junio C Hamano [Wed, 17 Feb 2010 06:25:03 +0000 (22:25 -0800)] 
Prepare 1.7.0.1 release notes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/maint-grep-one-thread-mutex-fix' into maint
Junio C Hamano [Wed, 17 Feb 2010 06:23:25 +0000 (22:23 -0800)] 
Merge branch 'jc/maint-grep-one-thread-mutex-fix' into maint

* jc/maint-grep-one-thread-mutex-fix:
  Fix use of mutex in threaded grep

15 years agoFix use of mutex in threaded grep
Junio C Hamano [Tue, 16 Feb 2010 02:34:28 +0000 (18:34 -0800)] 
Fix use of mutex in threaded grep

The program can decide at runtime not to use threading even if the support
is compiled in.  In such a case, mutexes are not necessary and left
uninitialized.  But the code incorrectly tried to take and release the
read_sha1_mutex unconditionally.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Fredrik Kuivinen <frekui@gmail.com>
15 years agoMerge branch 'maint-1.6.6' into maint
Junio C Hamano [Tue, 16 Feb 2010 23:05:02 +0000 (15:05 -0800)] 
Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
  dwim_ref: fix dangling symref warning
  stash pop: remove 'apply' options during 'drop' invocation
  diff: make sure --output=/bad/path is caught
  Remove hyphen from "git-command" in two error messages

15 years agoMerge branch 'maint-1.6.5' into maint-1.6.6
Junio C Hamano [Tue, 16 Feb 2010 23:04:55 +0000 (15:04 -0800)] 
Merge branch 'maint-1.6.5' into maint-1.6.6

* maint-1.6.5:
  dwim_ref: fix dangling symref warning
  stash pop: remove 'apply' options during 'drop' invocation
  diff: make sure --output=/bad/path is caught

15 years agotransport: add got_remote_refs flag
Tay Ray Chuan [Tue, 16 Feb 2010 07:18:21 +0000 (15:18 +0800)] 
transport: add got_remote_refs flag

transport_get_remote_refs() in tranport.c checks transport->remote_refs
to determine whether transport->get_refs_list() should be invoked.  The
logic is "if it is NULL, we haven't run ls-remote to find out yet".

However, transport->remote_refs could still be NULL while cloning from
an empty repository.  This causes get_refs_list() to be run unnecessarily.

Introduce a flag, transport->got_remote_refs, to more explicitly record
if we have run transport->get_refs_list() already.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodwim_ref: fix dangling symref warning
Jeff King [Tue, 16 Feb 2010 07:03:16 +0000 (02:03 -0500)] 
dwim_ref: fix dangling symref warning

If we encounter a symref that is dangling, in most cases we will warn
about it. The one exception is a dangling HEAD, as that indicates a
branch yet to be born.

However, the check in dwim_ref was not quite right. If we were fed
something like "HEAD^0" we would try to resolve "HEAD", see that it is
dangling, and then check whether the _original_ string we got was
"HEAD" (which it wasn't in this case). And that makes no sense; the
dangling thing we found was not "HEAD^0" but rather "HEAD".

Fixing this squelches a scary warning from "submodule summary HEAD" (and
consequently "git status" with status.submodulesummary set) in an empty
repo, as the submodule script calls "git rev-parse -q --verify HEAD^0".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agostash pop: remove 'apply' options during 'drop' invocation
Thomas Rast [Mon, 15 Feb 2010 16:05:46 +0000 (17:05 +0100)] 
stash pop: remove 'apply' options during 'drop' invocation

The 'git stash pop' option parsing used to remove the first argument
in --index mode.  At the time this was implemented, this first
argument was always --index.  However, since the invention of the -q
option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can
cause an internal invocation of

  git stash drop --index

by running

  git stash pop -q --index

which then of course fails because drop doesn't know --index.

To handle this, instead let 'git stash apply' decide what the future
argument to 'drop' should be.

Warning: this means that 'git stash apply' must parse all options that
'drop' can take, and deal with them in the same way.  This is
currently true for its only option -q.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodiff: make sure --output=/bad/path is caught
Larry D'Anna [Tue, 16 Feb 2010 04:10:45 +0000 (23:10 -0500)] 
diff: make sure --output=/bad/path is caught

The return value from fopen wasn't being checked.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoRemove hyphen from "git-command" in two error messages
Pete Harlan [Mon, 15 Feb 2010 23:33:18 +0000 (15:33 -0800)] 
Remove hyphen from "git-command" in two error messages

Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Mon, 15 Feb 2010 02:59:20 +0000 (18:59 -0800)] 
Merge branch 'maint'

* maint:
  fix minor memory leak in get_tree_entry()

15 years agoMerge branch 'maint-1.6.6' into maint
Junio C Hamano [Mon, 15 Feb 2010 02:59:14 +0000 (18:59 -0800)] 
Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
  fix minor memory leak in get_tree_entry()

15 years agofix minor memory leak in get_tree_entry()
René Scharfe [Sun, 14 Feb 2010 09:56:46 +0000 (10:56 +0100)] 
fix minor memory leak in get_tree_entry()

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Sat, 13 Feb 2010 23:14:04 +0000 (15:14 -0800)] 
Merge branch 'maint'

* maint:
  Start 1.7.0 maintenance track

Conflicts:
RelNotes

15 years agoMerge branch 'rs/git-dir-cleanup'
Junio C Hamano [Sat, 13 Feb 2010 23:09:33 +0000 (15:09 -0800)] 
Merge branch 'rs/git-dir-cleanup'

* rs/git-dir-cleanup:
  Resurrect "git grep --no-index"
  setenv(GIT_DIR) clean-up

Conflicts:
builtin-grep.c
t/t7002-grep.sh

15 years agoMerge branch 'jk/cherry-pick-reword'
Junio C Hamano [Sat, 13 Feb 2010 23:09:33 +0000 (15:09 -0800)] 
Merge branch 'jk/cherry-pick-reword'

* jk/cherry-pick-reword:
  cherry-pick: prettify the advice message
  cherry-pick: show commit name instead of sha1
  cherry-pick: format help message as strbuf
  cherry-pick: refactor commit parsing code
  cherry-pick: rewrap advice message

15 years agoMerge branch 'jk/grep-double-dash'
Junio C Hamano [Sat, 13 Feb 2010 23:09:33 +0000 (15:09 -0800)] 
Merge branch 'jk/grep-double-dash'

* jk/grep-double-dash:
  accept "git grep -- pattern"

15 years agoResurrect "git grep --no-index"
Junio C Hamano [Sat, 6 Feb 2010 18:40:08 +0000 (10:40 -0800)] 
Resurrect "git grep --no-index"

This reverts commit 3c8f6c8 (Revert 30816237 and 7e62265, 2010-02-05) as
the issue has been sorted out.

15 years agoStart 1.7.0 maintenance track
Junio C Hamano [Sat, 13 Feb 2010 23:04:00 +0000 (15:04 -0800)] 
Start 1.7.0 maintenance track

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoStart 1.7.1 cycle
Junio C Hamano [Sat, 13 Feb 2010 23:01:37 +0000 (15:01 -0800)] 
Start 1.7.1 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGit 1.7.0 v1.7.0
Junio C Hamano [Fri, 12 Feb 2010 23:45:05 +0000 (15:45 -0800)] 
Git 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Fri, 12 Feb 2010 23:40:59 +0000 (15:40 -0800)] 
Merge branch 'maint'

* maint:
  Fix typo in 1.6.6.2 release notes
  Re-fix check-ref-format documentation mark-up

15 years agoFix typo in 1.6.6.2 release notes
Junio C Hamano [Fri, 12 Feb 2010 23:40:01 +0000 (15:40 -0800)] 
Fix typo in 1.6.6.2 release notes

Of course, these are changes since 1.6.6.1; changes since 1.6.6.2
would have been nil.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoRe-fix check-ref-format documentation mark-up
Junio C Hamano [Fri, 12 Feb 2010 23:39:03 +0000 (15:39 -0800)] 
Re-fix check-ref-format documentation mark-up

It is not double-backslash we forbid; backslashes are forbidden since
a4c2e699 (Disallow '\' in ref names, 2009-05-08)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit log -p -m: document -m and honor --first-parent
Petr Baudis [Wed, 10 Feb 2010 01:11:49 +0000 (02:11 +0100)] 
git log -p -m: document -m and honor --first-parent

git log -p -m is used to show one merge entry per parent, with an
appropriate diff; this can be useful when examining histories where
full set of changes introduced by a merged branch is interesting, not
only the conflicts.

This patch properly documents the -m switch, which has so far been
mentioned only as a fairly special diff-tree flag.

It also makes the code show full patch entry only for the first parent
when --first-parent is used. Thus:

git log -p -m --first-parent

will show the history from the "main branch perspective", while also
including full diff of changes introduced by other merged in branches.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-imap-send: Convert LF to CRLF before storing patch to draft box
Hitoshi Mitake [Fri, 12 Feb 2010 11:36:12 +0000 (20:36 +0900)] 
git-imap-send: Convert LF to CRLF before storing patch to draft box

When storing a message over IMAP (RFC 3501 6.3.11), the message should be
in the format of an RFC 2822 message; most notably, CRLF must be used as
a line terminator.

Convert "\n" line endings in the payload to CRLF before feeding it to
IMAP APPEND command.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive documentation: attributes are taken from the tree by default
Junio C Hamano [Wed, 10 Feb 2010 20:33:58 +0000 (12:33 -0800)] 
archive documentation: attributes are taken from the tree by default

By default, git-archive takes attributes from the tree being archived.
People however often wonder why their attempts to affect the way how the
command archives their tree by changing .gitattributes in their work tree
fail.

Add a bit of explanatory note to tell them how to achieve what they want
to do.

Noticed-by: Francois Marier
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: minor fixes to RelNotes-1.7.0
Michael J Gruber [Fri, 12 Feb 2010 09:47:53 +0000 (10:47 +0100)] 
Documentation: minor fixes to RelNotes-1.7.0

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobash: support 'git am's new '--continue' option
SZEDER Gábor [Fri, 12 Feb 2010 14:11:47 +0000 (15:11 +0100)] 
bash: support 'git am's new '--continue' option

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Fri, 12 Feb 2010 07:06:32 +0000 (23:06 -0800)] 
Merge branch 'maint'

* maint:
  filter-branch: Fix error message for --prune-empty --commit-filter

15 years agofilter-branch: Fix error message for --prune-empty --commit-filter
Jacob Helwig [Fri, 12 Feb 2010 02:46:22 +0000 (18:46 -0800)] 
filter-branch: Fix error message for --prune-empty --commit-filter

Running filter-branch with --prune-empty and --commit-filter reports:

  "Cannot set --prune-empty and --filter-commit at the same time".

Change it to use the correct option name: --commit-filter

Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocherry-pick: prettify the advice message
Jeff King [Thu, 11 Feb 2010 21:19:37 +0000 (16:19 -0500)] 
cherry-pick: prettify the advice message

It's hard to see the "how to commit" part of this message,
which users may want to cut and paste. On top of that,
having it in paragraph form means that a really long commit
name may cause ugly wrapping. Let's make it prettier, like:

  Automatic cherry-pick failed.  After resolving the conflicts,
  mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
  and commit the result with:

          git commit -c HEAD~23

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocherry-pick: show commit name instead of sha1
Jeff King [Thu, 11 Feb 2010 21:08:15 +0000 (16:08 -0500)] 
cherry-pick: show commit name instead of sha1

When we have a conflict, we advise the user to do:

  git commit -c $sha1

This works fine, but is unnecessarily confusing and annoying
for the user to type, when:

  git commit -c $the_thing_you_called_cherry_pick_with

works just as well.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocherry-pick: format help message as strbuf
Jeff King [Thu, 11 Feb 2010 21:07:06 +0000 (16:07 -0500)] 
cherry-pick: format help message as strbuf

This gets rid of the fixed-size buffer and an unchecked
sprintf. That sprintf is actually OK as the only
variable-sized thing put in it is an abbreviated sha1, which
is bounded at 40 characters. However, the next patch will
change that to something unbounded.

Note that this function now returns an allocated buffer
instead of a static one; however, it doesn't matter as the
only caller exits immediately.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocherry-pick: refactor commit parsing code
Jeff King [Thu, 11 Feb 2010 21:06:43 +0000 (16:06 -0500)] 
cherry-pick: refactor commit parsing code

These lines are really just lookup_commit_reference
re-implemented.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocherry-pick: rewrap advice message
Jeff King [Thu, 11 Feb 2010 21:06:01 +0000 (16:06 -0500)] 
cherry-pick: rewrap advice message

The current message overflows on an 80-character terminal.
While we're at it, fix the spelling of 'committing'.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoam: switch --resolved to --continue
Jeff King [Thu, 11 Feb 2010 22:27:14 +0000 (17:27 -0500)] 
am: switch --resolved to --continue

Rebase calls this same function "--continue", which means
users may be trained to type it. There is no reason to
deprecate --resolved (or -r), so we will keep it as a
synonym.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoUpdate draft release notes to 1.7.0 one more time
Junio C Hamano [Wed, 10 Feb 2010 21:47:46 +0000 (13:47 -0800)] 
Update draft release notes to 1.7.0 one more time

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSync with 1.6.6.2
Junio C Hamano [Wed, 10 Feb 2010 21:46:15 +0000 (13:46 -0800)] 
Sync with 1.6.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGit 1.6.6.2 v1.6.6.2
Junio C Hamano [Wed, 10 Feb 2010 21:44:11 +0000 (13:44 -0800)] 
Git 1.6.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint-1.6.5' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:42:48 +0000 (13:42 -0800)] 
Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
  t8003: check exit code of command and error message separately

15 years agot8003: check exit code of command and error message separately
Junio C Hamano [Tue, 9 Feb 2010 18:06:33 +0000 (10:06 -0800)] 
t8003: check exit code of command and error message separately

Shell reports exit status only from the most downstream command
in a pipeline.  In these tests, we want to make sure that the
command fails in a controlled way, and produces a correct error
message.

This issue was known by Jay who submitted the patch, and also was
pointed out by Hannes during the review process, but I forgot to
fix it up before applying.  Sorry about that.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sp/maint-fast-import-large-blob' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:32:20 +0000 (13:32 -0800)] 
Merge branch 'sp/maint-fast-import-large-blob' into maint

* sp/maint-fast-import-large-blob:
  fast-import: Stream very large blobs directly to pack

15 years agoMerge branch 'gp/maint-cvsserver' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:02:52 +0000 (13:02 -0800)] 
Merge branch 'gp/maint-cvsserver' into maint

* gp/maint-cvsserver:
  git-cvsserver: allow regex metacharacters in CVSROOT

15 years agoMerge branch 'jc/maint-reflog-bad-timestamp' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:02:43 +0000 (13:02 -0800)] 
Merge branch 'jc/maint-reflog-bad-timestamp' into maint

* jc/maint-reflog-bad-timestamp:
  t0101: use a fixed timestamp when searching in the reflog
  Update @{bogus.timestamp} fix not to die()
  approxidate_careful() reports errorneous date string

15 years agoMerge branch 'il/maint-xmallocz' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:02:16 +0000 (13:02 -0800)] 
Merge branch 'il/maint-xmallocz' into maint

* il/maint-xmallocz:
  Fix integer overflow in unpack_compressed_entry()
  Fix integer overflow in unpack_sha1_rest()
  Fix integer overflow in patch_delta()
  Add xmallocz()

15 years agoMerge branch 'jh/maint-config-file-prefix' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:02:05 +0000 (13:02 -0800)] 
Merge branch 'jh/maint-config-file-prefix' into maint

* jh/maint-config-file-prefix:
  builtin-config: Fix crash when using "-f <relative path>" from non-root dir

15 years agoMerge branch 'nd/include-termios-for-osol' into maint
Junio C Hamano [Wed, 10 Feb 2010 21:01:55 +0000 (13:01 -0800)] 
Merge branch 'nd/include-termios-for-osol' into maint

* nd/include-termios-for-osol:
  Add missing #include to support TIOCGWINSZ on Solaris

15 years agoMerge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maint
Junio C Hamano [Wed, 10 Feb 2010 20:54:15 +0000 (12:54 -0800)] 
Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maint

* jc/maint-1.6.1-checkout-m-custom-merge:
  checkout -m path: fix recreating conflicts

Conflicts:
t/t7201-co.sh

15 years agoMerge branch 'rs/maint-archive-match-pathspec' into maint
Junio C Hamano [Wed, 10 Feb 2010 20:52:39 +0000 (12:52 -0800)] 
Merge branch 'rs/maint-archive-match-pathspec' into maint

* rs/maint-archive-match-pathspec:
  archive: complain about path specs that don't match anything

15 years agocheck-ref-format documentation: fix enumeration mark-up
Junio C Hamano [Wed, 10 Feb 2010 18:18:55 +0000 (10:18 -0800)] 
check-ref-format documentation: fix enumeration mark-up

The last item in the enumerated refname rule was mistakenly made into
a sub-item of the 7th one.  It should be the 8th one in the list on its
own.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: quote braces in {upstream} notation
Thomas Rast [Wed, 10 Feb 2010 16:30:29 +0000 (17:30 +0100)] 
Documentation: quote braces in {upstream} notation

The lack of quoting made the entire line disappear.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sp/maint-push-sideband' into sp/push-sideband
Junio C Hamano [Wed, 10 Feb 2010 18:00:49 +0000 (10:00 -0800)] 
Merge branch 'sp/maint-push-sideband' into sp/push-sideband

* sp/maint-push-sideband:
  receive-pack: Send internal errors over side-band #2
  t5401: Use a bare repository for the remote peer

Conflicts:
builtin-receive-pack.c
t/t5401-update-hooks.sh

15 years agoreceive-pack: Send internal errors over side-band #2
Shawn O. Pearce [Wed, 10 Feb 2010 17:34:12 +0000 (09:34 -0800)] 
receive-pack: Send internal errors over side-band #2

If the client has requested side-band-64k capability, send any
of the internal error or warning messages in the muxed side-band
stream using the same band as our hook output, band #2.  By putting
everything in one stream we ensure all messages are processed by
the side-band demuxer, avoiding interleaving between our own stderr
and the side-band demuxer's stderr buffers.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot5401: Use a bare repository for the remote peer
Shawn O. Pearce [Wed, 10 Feb 2010 02:01:29 +0000 (18:01 -0800)] 
t5401: Use a bare repository for the remote peer

We want to avoid the warnings (or later, test failures) about
updating the current branch.  It was never my intention to have
this test deal with a repository with a working directory, and it
is a very old bug that the test even used a non-bare repository
for the remote side of the push operations.

This fixes the interleaved output error we were seeing as a test
failure by avoiding the giant warning message we were getting back
about updating the current branch being risky.

Its not a real fix, but is something we should do no matter what,
because the behavior will change in the future to reject, and the
test would break at that time.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot3902: Protect against OS X normalization
Brian Gernhardt [Tue, 9 Feb 2010 04:07:25 +0000 (23:07 -0500)] 
t3902: Protect against OS X normalization

8424981: "Fix invalid read in quote_c_style_counted" introduced a test
that used "caractère spécial" as a directory name.

Git creates it as "caract\303\250re sp\303\251cial"
OS X stores it as "caracte\314\200re spe\314\201cial"

To work around this problem, use the already introduced $FN as the
directory name.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Tue, 9 Feb 2010 05:54:10 +0000 (21:54 -0800)] 
Merge branch 'maint'

* maint:
  blame: prevent a segv when -L given start > EOF
  git-push: document all the status flags used in the output
  Fix parsing of imap.preformattedHTML and imap.sslverify
  git-add documentation: Fix shell quoting example

15 years agoMerge branch 'maint-1.6.5' into maint
Junio C Hamano [Tue, 9 Feb 2010 05:53:54 +0000 (21:53 -0800)] 
Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
  blame: prevent a segv when -L given start > EOF

15 years agoblame: prevent a segv when -L given start > EOF
Jay Soffian [Tue, 9 Feb 2010 03:48:13 +0000 (22:48 -0500)] 
blame: prevent a segv when -L given start > EOF

blame would segv if given -L <lineno> with <lineno> past the end of the file.
While we're fixing the bug, add test cases for an invalid <start> when called
as -L <start>,<end> or -L<start>.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/maint-push-doc-status' into maint
Junio C Hamano [Tue, 9 Feb 2010 00:49:22 +0000 (16:49 -0800)] 
Merge branch 'jc/maint-push-doc-status' into maint

* jc/maint-push-doc-status:
  git-push: document all the status flags used in the output

15 years agogit-push: document all the status flags used in the output
Junio C Hamano [Tue, 9 Feb 2010 00:45:21 +0000 (16:45 -0800)] 
git-push: document all the status flags used in the output

We didn't talk about '-' (deletion), '*' (addition), nor '+' (forced).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/maint-imap-config-parse' into maint
Junio C Hamano [Mon, 8 Feb 2010 23:09:19 +0000 (15:09 -0800)] 
Merge branch 'jc/maint-imap-config-parse' into maint

* jc/maint-imap-config-parse:
  Fix parsing of imap.preformattedHTML and imap.sslverify

15 years agoFix parsing of imap.preformattedHTML and imap.sslverify
Junio C Hamano [Sat, 6 Feb 2010 19:26:35 +0000 (11:26 -0800)] 
Fix parsing of imap.preformattedHTML and imap.sslverify

These two variables are boolean and can lack "= value" in the
configuration file.  Do not reject such input early in the
parser callback function.

Also the key are downcased before being given to the callback,
so we should run strcmp() with keyword spelled in all-lowercase.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/maint-doc-git-add-example' into maint
Junio C Hamano [Mon, 8 Feb 2010 20:13:56 +0000 (12:13 -0800)] 
Merge branch 'jc/maint-doc-git-add-example' into maint

* jc/maint-doc-git-add-example:
  git-add documentation: Fix shell quoting example

15 years agogit-add documentation: Fix shell quoting example
Junio C Hamano [Mon, 8 Feb 2010 20:12:41 +0000 (12:12 -0800)] 
git-add documentation: Fix shell quoting example

When 921177f (Documentation: improve "add", "pull" and "format-patch"
examples, 2008-05-07) converted this from enumeration header to displayed
text, it failed to adjust for the AsciiDoc's rule to quote backslashes.
In displayed text, backslash is shown verbatim, while in enumeration
header, we need to double it.

We have a similar construct in git-rm.txt documentation, and need to be
careful when somebody wants to update it to match the style of the "git
add" example.

Noticed by: Greg Bacon <gbacon@dbresearch.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoRevert "pack-objects: fix pack generation when using pack_size_limit"
Nicolas Pitre [Mon, 8 Feb 2010 15:39:01 +0000 (10:39 -0500)] 
Revert "pack-objects: fix pack generation when using pack_size_limit"

This reverts most of commit a2430dde8ceaaaabf05937438249397b883ca77a.

That commit made the situation better for repositories with relatively
small number of objects.  However with many objects and a small pack size
limit, the time required to complete the repack tends towards O(n^2),
or even much worse with long delta chains.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoaccept "git grep -- pattern"
Jeff King [Sun, 7 Feb 2010 04:44:15 +0000 (23:44 -0500)] 
accept "git grep -- pattern"

Currently the only way to "quote" a grep pattern that might
begin with a dash is to use "git grep -e pattern". This
works just fine, and is also the way right way to do it on
many traditional grep implemenations.

Some people prefer to use "git grep -- pattern", however, as
"--" is the usual "end of options" marker, and at least GNU
grep and Solaris 10 grep support this. This patch makes that
syntax work.

There is a slight behavior change, in that "git grep -- $X"
used to be interpreted as "grep for -- in $X". However, that
usage is questionable. "--" is usually the end-of-options
marker, so "git grep" was unlike many other greps in
treating it as a literal pattern (e.g., both GNU grep and
Solaris 10 grep will treat "grep --" as missing a pattern).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge git://repo.or.cz/git-gui v1.7.0-rc2
Junio C Hamano [Sun, 7 Feb 2010 23:52:28 +0000 (15:52 -0800)] 
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: update french translation
  git-gui: update Japanese translation
  git-gui: fix shortcut for menu "Commit/Revert Changes"
  git-gui: Quote git path when starting another gui in a submodule
  git-gui: update Italian translation
  git-gui: Update Swedish translation (520t0f0u)
  git-gui: use themed tk widgets with Tk 8.5
  git-gui: Update German translation (12 new or changed strings).
  git-gui: Update translation template
  git-gui: Remove unused icon file_parttick
  git-gui: use different icon for new and modified files in the index
  git-gui: set GIT_DIR and GIT_WORK_TREE after setup
  git-gui: update shortcut tools to use _gitworktree
  git-gui: handle bare repos correctly
  git-gui: handle non-standard worktree locations
  git-gui: Support applying a range of changes at once
  git-gui: Add a special diff popup menu for submodules
  git-gui: Use git diff --submodule when available

15 years agoMerge branch 'maint'
Junio C Hamano [Sun, 7 Feb 2010 23:52:12 +0000 (15:52 -0800)] 
Merge branch 'maint'

* maint:
  archive: simplify archive format guessing

15 years agoarchive: simplify archive format guessing
René Scharfe [Sun, 7 Feb 2010 23:30:20 +0000 (00:30 +0100)] 
archive: simplify archive format guessing

The code to guess an output archive's format consumed any --format
options and built a new one.  Jonathan noticed that it does so in an
unsafe way, risking to overflow the static buffer fmt_opt.

Change the code to keep the existing --format options intact and to only
add a new one if a format could be guessed based on the output file name.
The new option is added as the first one, allowing the existing ones to
overrule it, i.e. explicit --format options given on the command line win
over format guesses, as before.

To simplify the code further, format_from_name() is changed to return the
full --format option, thus no potentially dangerous sprintf() calls are
needed any more.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocvsimport: new -R option: generate .git/cvs-revisions mapping
Aaron Crane [Sat, 6 Feb 2010 18:26:24 +0000 (18:26 +0000)] 
cvsimport: new -R option: generate .git/cvs-revisions mapping

This option causes the creation or updating of a file mapping CVS
(filename, revision number) pairs to Git commit IDs.  This is expected
to be useful if you have CVS revision numbers stored in commit messages,
bug-tracking systems, email archives, and the like.

Signed-off-by: Aaron Crane <git@aaroncrane.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix invalid read in quote_c_style_counted
Jeff King [Mon, 1 Feb 2010 13:39:03 +0000 (08:39 -0500)] 
Fix invalid read in quote_c_style_counted

This function did not work on strings that were not NUL-terminated. It
reads through a length-bounded string, searching for characters in need of
quoting. After we find one, we output the quoted character, then advance
our pointer to find the next one. However, we never decremented the
length, meaning we ended up looking at whatever random junk was stored
after the string.

This bug was not found by the existing tests because most code paths feed
a NUL-terminated string. The notable exception is a directory name being
fed by ls-tree.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodocs: fix filter-branch example for quoted paths
Jeff King [Mon, 1 Feb 2010 12:43:45 +0000 (07:43 -0500)] 
docs: fix filter-branch example for quoted paths

If there is a quoted path, update-index will correctly
unquote it. However, we must take care to put our new prefix
inside the double-quote.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosetenv(GIT_DIR) clean-up
René Scharfe [Sat, 6 Feb 2010 09:35:19 +0000 (10:35 +0100)] 
setenv(GIT_DIR) clean-up

This patch converts the setenv() calls in path.c and setup.c.  After
the call, git grep with a pager works again in bare repos.

It leaves the setenv(GIT_DIR_ENVIRONMENT, ...) calls in git.c alone, as
they respond to command line switches that emulate the effect of setting
the environment variable directly.

The remaining site in environment.c is in set_git_dir() and is left
alone, too, of course.  Finally, builtin-init-db.c is left changed
because the repo is still being carefully constructed when the
environment variable is set.

This fixes git shortlog when run inside a git directory, which had been
broken by abe549e1.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot9501: Re-fix max load test
Brian Gernhardt [Sat, 6 Feb 2010 14:50:03 +0000 (09:50 -0500)] 
t9501: Re-fix max load test

Revert the previous attempt to skip this test on platforms where we
currently cannot determine the system load.  We want to make sure that
the max-load-limit codepath produces results cleanly, when gitweb is
updated and becomes capable of reading the load average by some other
method.

The code to check for load returns 0 if it doesn't know how to find
load.  It also checks to see if the current load is higher than the
max load.  So to force the script to quit early by setting the maxload
variable negative which should work for systems where we can detect
load (which should be a positive number) and systems where we can't
(where detected load is 0)

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobash: support the --autosquash option for rebase
Björn Gustavsson [Sat, 6 Feb 2010 08:37:53 +0000 (09:37 +0100)] 
bash: support the --autosquash option for rebase

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Sat, 6 Feb 2010 05:22:59 +0000 (21:22 -0800)] 
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Fix copyright symbol in About box message

15 years agot9501: Skip testing load if we can't detect it
Brian Gernhardt [Sat, 6 Feb 2010 05:00:40 +0000 (00:00 -0500)] 
t9501: Skip testing load if we can't detect it

Currently gitweb only knows how to check for load using /proc/loadavg,
which isn't available on all systems.  We shouldn't fail the test just
because we don't know how to check the system load.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sp/maint-push-sideband' into sp/push-sideband
Junio C Hamano [Sat, 6 Feb 2010 05:08:53 +0000 (21:08 -0800)] 
Merge branch 'sp/maint-push-sideband' into sp/push-sideband

* sp/maint-push-sideband:
  receive-pack: Send hook output over side band #2
  receive-pack: Wrap status reports inside side-band-64k
  receive-pack: Refactor how capabilities are shown to the client
  send-pack: demultiplex a sideband stream with status data
  run-command: support custom fd-set in async
  run-command: Allow stderr to be a caller supplied pipe
  Update git fsck --full short description to mention packs

Conflicts:
run-command.c

15 years agoreceive-pack: Send hook output over side band #2
Shawn O. Pearce [Fri, 5 Feb 2010 20:57:42 +0000 (12:57 -0800)] 
receive-pack: Send hook output over side band #2

If the client requests to enable side-band-64k capability we can
safely send any hook stdout or stderr data down side band #2,
so the client can present it to the user.

If side-band-64k isn't enabled, hooks continue to inherit stderr
from the parent receive-pack process.

When the side band channel is being used the push client will wind up
prefixing all server messages with "remote: ", just like fetch does,
so our test vector has to be updated with the new expected output.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoreceive-pack: Wrap status reports inside side-band-64k
Shawn O. Pearce [Fri, 5 Feb 2010 20:57:41 +0000 (12:57 -0800)] 
receive-pack: Wrap status reports inside side-band-64k

If the client requests the side-band-64k protocol capability we
now wrap the status report data inside of packets sent to band #1.
This permits us to later send additional progress or informational
messages down band #2.

If side-band-64k was enabled, we always send a final flush packet
to let the client know we are done transmitting.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoreceive-pack: Refactor how capabilities are shown to the client
Shawn O. Pearce [Fri, 5 Feb 2010 20:57:40 +0000 (12:57 -0800)] 
receive-pack: Refactor how capabilities are shown to the client

Moving capability advertisement into the packet_write call itself
makes it easier to add additional capabilities to the list, be
it optional by configuration, or always present in the protocol.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosend-pack: demultiplex a sideband stream with status data
Shawn O. Pearce [Fri, 5 Feb 2010 20:57:39 +0000 (12:57 -0800)] 
send-pack: demultiplex a sideband stream with status data

If the server advertises side-band-64k capability, we request
it and pull the status report data out of side band #1, and let
side band #2 go to our stderr.  The latter channel be used by the
remote side to send our user messages.  This basically mirrors the
side-band-64k capability in upload-pack.

Servers may choose to use side band #2 to send error messages from
hook scripts that are meant for the push end user.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorun-command: support custom fd-set in async
Erik Faye-Lund [Fri, 5 Feb 2010 20:57:38 +0000 (12:57 -0800)] 
run-command: support custom fd-set in async

This patch adds the possibility to supply a set of non-0 file
descriptors for async process communication instead of the
default-created pipe.

Additionally, we now support bi-directional communiction with the
async procedure, by giving the async function both read and write
file descriptors.

To retain compatiblity and similar "API feel" with start_command,
we require start_async callers to set .out = -1 to get a readable
file descriptor.  If either of .in or .out is 0, we supply no file
descriptor to the async process.

[sp: Note: Erik started this patch, and a huge bulk of it is
     his work.  All bugs were introduced later by Shawn.]

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorun-command: Allow stderr to be a caller supplied pipe
Shawn O. Pearce [Fri, 5 Feb 2010 20:57:37 +0000 (12:57 -0800)] 
run-command: Allow stderr to be a caller supplied pipe

Like .out, .err may now be set to a file descriptor > 0, which
is a writable pipe/socket/file that the child's stderr will be
redirected into.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>