Code

git.git
15 years agoDocumentation: remove warning saying that "git bisect skip" may slow bisection
Christian Couder [Sat, 13 Jun 2009 11:11:02 +0000 (13:11 +0200)]
Documentation: remove warning saying that "git bisect skip" may slow bisection

This warning was probably useless anyway, but it is even more so now
that filtering of skipped commits is done in C and that there is a
mechanism to skip away from broken commits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: use a PRNG with a bias when skipping away from untestable commits
Christian Couder [Sat, 13 Jun 2009 05:21:06 +0000 (07:21 +0200)]
bisect: use a PRNG with a bias when skipping away from untestable commits

Using a PRNG (pseudo random number generator) with a bias should be better
than alternating between 3 fixed ratios.

In repositories with many untestable commits it should prevent alternating
between areas where many commits are untestable. The bias should favor
commits that can give more information, so that the bisection process
should not loose much efficiency.

HPA suggested to use a PRNG and found that the best bias is to raise a
ratio between 0 and 1 given by the PRNG to the power 1.5.

An integer square root function is implemented to avoid including
<math.h> and linking with -lm.

A PRNG function is implemented to get the same number sequence on
different machines as suggested by "man 3 rand".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot6030: test skipping away from an already skipped commit
Christian Couder [Sat, 6 Jun 2009 04:41:35 +0000 (06:41 +0200)]
t6030: test skipping away from an already skipped commit

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: when skipping, choose a commit away from a skipped commit
Christian Couder [Sat, 6 Jun 2009 04:41:34 +0000 (06:41 +0200)]
bisect: when skipping, choose a commit away from a skipped commit

To do that a new function "apply_skip_ratio" is added and another
function "managed_skipped" is created to wrap both "filter_skipped"
and the previous one.

In "managed_skipped" we detect when we should choose a commit away
from a skipped one and then we automatically choose a skip ratio
to pass to "apply_skip_ratio".

The ratio is choosen so that it alternates between 1/5, 2/5 and
3/5.

In "apply_skip_ratio", we ignore a given ratio of all the commits
that could be tested.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: add parameters to "filter_skipped"
Christian Couder [Sat, 6 Jun 2009 04:41:33 +0000 (06:41 +0200)]
bisect: add parameters to "filter_skipped"

because we will need to get more information from this function in
some later patches.

The new "int *count" parameter gives the number of commits left after
the skipped commit have been filtered out.

The new "int *skipped_first" parameter tells us if the first commit
in the list has been skipped. Note that using this parameter also
changes the behavior of the function if the first commit is indeed
skipped. Because we assume that in this case we will want all the
filtered commits, not just the first one, even if "show_all" is not
set.

So using a not NULL "skipped_first" parameter really means that we
plan to choose to test another commit than the first non skipped
one if the first commit in the list is skipped. That in turn means
that, in case the first commit is skipped, we have to return a
fully filtered list.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: display first bad commit without forking a new process
Christian Couder [Thu, 28 May 2009 21:21:16 +0000 (23:21 +0200)]
bisect: display first bad commit without forking a new process

Previously "git diff-tree --pretty COMMIT" was run using
"run_command_v_opt" to display information about the first bad
commit.

The goal of this patch is to avoid a "fork" and an "exec" call
when displaying that information.

To do that, we manually setup revision information as
"git diff-tree --pretty" would do it, and then use the
"log_tree_commit" function.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: drop unparse_commit() and use clear_commit_marks()
Christian Couder [Wed, 27 May 2009 05:09:40 +0000 (07:09 +0200)]
bisect: drop unparse_commit() and use clear_commit_marks()

The goal of this patch series is to check if good revisions are
ancestor of the bad revision without forking a process to launch
"git rev-list $good ^$bad".

This new version of this patch series does not use an "unparse_commit"
function anymore, we use "clear_commit_marks" instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: check ancestors without forking a "git rev-list" process
Christian Couder [Sun, 17 May 2009 15:36:46 +0000 (17:36 +0200)]
bisect: check ancestors without forking a "git rev-list" process

We must save the pending commits that will be used during revision
walking and unparse them after, because we want to leave a clean
state for the next revision walking that will try to find the best
bisection point.

As we don't fork a process anymore to call "git rev-list", we need
to remove the use of GIT_TRACE to check how "git rev-list" is
called from the t6030 test that uses it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocommit: add function to unparse a commit and its parents
Christian Couder [Sun, 17 May 2009 15:36:45 +0000 (17:36 +0200)]
commit: add function to unparse a commit and its parents

This patch adds the "unparse_commit" function that returns a commit
into an unparsed state by freeing its data and resetting its fields
to 0.

Its parents are recursively unparsed too, because they might have
been changed. But its tree is not unparsed as it should not have
been modifed.

Note that as the "flags" and "used" fields may be used even if the
object is not parsed, we have to reset them anyway.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: rework some rev related functions to make them more reusable
Christian Couder [Sun, 17 May 2009 15:36:44 +0000 (17:36 +0200)]
bisect: rework some rev related functions to make them more reusable

This patches changes the "bisect_rev_setup" and "bisect_common"
functions to make it easier to reuse them in a later patch.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: make "git bisect" use new "--next-all" bisect-helper function
Christian Couder [Sat, 9 May 2009 15:55:47 +0000 (17:55 +0200)]
bisect: make "git bisect" use new "--next-all" bisect-helper function

This patch replace the "--next-exit" option of "git bisect--helper"
with a "--next-all" option that does merge base checking using
the "check_good_are_ancestors_of_bad" function implemented in
"bisect.c" in a former patch.

The new "--next-all" option is then used in "git-bisect.sh" instead
of the "--next-exit" option, and all the shell functions in
"git-bisect.sh" that are now unused are removed.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: add "check_good_are_ancestors_of_bad" function
Christian Couder [Sat, 9 May 2009 15:55:46 +0000 (17:55 +0200)]
bisect: add "check_good_are_ancestors_of_bad" function

This is a port of the function with the same name that is in
"git-bisect.sh". The new function is not used yet but will be in
a later patch.

We also implement an helper "check_ancestors" function that use
"start_command" and "finish_command" to launch
"git rev-list $good ^$bad".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: implement the "check_merge_bases" function
Christian Couder [Sat, 9 May 2009 15:55:45 +0000 (17:55 +0200)]
bisect: implement the "check_merge_bases" function

And all functions needed to make it work.

This is a port from the shell function with the same name
"git-bisect.sh". This function is not used yet but it will be used
later.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: automatically sort sha1_array if needed when looking it up
Christian Couder [Sat, 9 May 2009 15:55:44 +0000 (17:55 +0200)]
bisect: automatically sort sha1_array if needed when looking it up

This makes sha1_array easier to use, so later patches will be simpler.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: make skipped array functions more generic
Christian Couder [Sat, 9 May 2009 15:55:43 +0000 (17:55 +0200)]
bisect: make skipped array functions more generic

So they can be used on the good array too.

This is done by renaming many functions and some variables to
remove "skip" in the name, and by adding a
"struct sha1_array *array" argument where needed.

While at it, make the second argument to "lookup_sha1_array"
const. It becomes "const unsigned char *sha1".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: remove too much function nesting
Christian Couder [Sat, 9 May 2009 15:55:42 +0000 (17:55 +0200)]
bisect: remove too much function nesting

This patch moves some function calls into "bisect_next_exit" so
that functions are nesting less.

The call to "bisect_rev_setup" is moved from "bisect_common" into
"bisect_next_exit" and the call to "read_bisect_refs" from
"bisect_rev_setup" into "bisect_next_exit".

While at it, "rev_argv" is moved into "bisect_rev_setup".

This will make it easier and cleaner to implement checking merge
bases.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: use new "struct argv_array" to prepare argv for "setup_revisions"
Christian Couder [Sat, 9 May 2009 15:55:41 +0000 (17:55 +0200)]
bisect: use new "struct argv_array" to prepare argv for "setup_revisions"

Because we will use other instances of this struct.

The "rev_argv_push" function is changed into 2 functions
"argv_array_push" and "argv_array_push_sha1" that take a "struct
argv_array *" as first argument. And these functions are used to
simplify "bisect_rev_setup".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: store good revisions in a "sha1_array"
Christian Couder [Sat, 9 May 2009 15:55:40 +0000 (17:55 +0200)]
bisect: store good revisions in a "sha1_array"

This will make it easier to use good revisions for checking merge
bases later.

To simplify the code, a new "sha1_array_push" function is also
introduced.

And while at it we move the earlier part of the code to fill the
argv that is passed to "setup_revisions", so that all this code is
now completely after "read_bisect_refs".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: implement "rev_argv_push" to fill an argv with revs
Christian Couder [Sat, 9 May 2009 15:55:39 +0000 (17:55 +0200)]
bisect: implement "rev_argv_push" to fill an argv with revs

This patch is a minor clean up right now, but the new function
will evolve and be used more later.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: use "sha1_array" to store skipped revisions
Christian Couder [Sat, 9 May 2009 15:55:38 +0000 (17:55 +0200)]
bisect: use "sha1_array" to store skipped revisions

This patch creates a "struct sha1_array" to store skipped revisions,
so that the same struct can be reused in a later patch for good
revisions.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoam: simplify "sq" function by using "git rev-parse --sq-quote"
Christian Couder [Fri, 24 Apr 2009 06:29:01 +0000 (08:29 +0200)]
am: simplify "sq" function by using "git rev-parse --sq-quote"

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: use "git rev-parse --sq-quote" instead of a custom "sq" function
Christian Couder [Fri, 24 Apr 2009 06:29:00 +0000 (08:29 +0200)]
bisect: use "git rev-parse --sq-quote" instead of a custom "sq" function

As the "sq" function was the only place using Perl in "git-bisect.sh",
this removes the Perl dependency in this script.

While at it, we also remove the sed instruction in the Makefile that
substituted @@PERL@@ with the Perl path in shell scripts, as this is
not needed anymore. (It is now only needed in "git-instaweb.sh" but
this command is dealt with separately in the Makefile.)

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorev-parse: add --sq-quote to shell quote arguments
Christian Couder [Sat, 25 Apr 2009 04:55:26 +0000 (06:55 +0200)]
rev-parse: add --sq-quote to shell quote arguments

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorev-list: remove stringed output flag from "show_bisect_vars"
Christian Couder [Tue, 21 Apr 2009 05:54:10 +0000 (07:54 +0200)]
rev-list: remove stringed output flag from "show_bisect_vars"

Because it was used only by "git bisect--helper --next-vars" but
the "--next-vars" option has been removed.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect--helper: remove "--next-vars" option as it is now useless
Christian Couder [Tue, 21 Apr 2009 05:54:09 +0000 (07:54 +0200)]
bisect--helper: remove "--next-vars" option as it is now useless

Because it has been replaced by "--next-exit".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: use "git bisect--helper --next-exit" in "git-bisect.sh"
Christian Couder [Sun, 19 Apr 2009 09:56:16 +0000 (11:56 +0200)]
bisect: use "git bisect--helper --next-exit" in "git-bisect.sh"

instead of "git bisect--helper --next-vars".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect--helper: add "--next-exit" to output bisect results
Christian Couder [Sun, 19 Apr 2009 09:56:07 +0000 (11:56 +0200)]
bisect--helper: add "--next-exit" to output bisect results

The goal of this patch is to port more shell code from the "bisect_next"
function in "git-bisect.sh" to C code in "builtin-bisect--helper.c".

So we port the code that interprets the bisection result and stops or
continues (by checking out the next revision) the bisection process.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: move common bisect functionality to "bisect_common"
Christian Couder [Sun, 19 Apr 2009 09:55:57 +0000 (11:55 +0200)]
bisect: move common bisect functionality to "bisect_common"

So we can easily reuse the code in a later patch.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorev-list: refactor printing bisect vars
Christian Couder [Sun, 19 Apr 2009 09:55:43 +0000 (11:55 +0200)]
rev-list: refactor printing bisect vars

This simplifies the code, and while at it we create the
"print_commit_list" function that will be reused later.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorev-list: make "estimate_bisect_steps" non static
Christian Couder [Sun, 19 Apr 2009 09:55:38 +0000 (11:55 +0200)]
rev-list: make "estimate_bisect_steps" non static

Because it will be used from "bisect.c" too.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGIT 1.6.3 v1.6.3
Junio C Hamano [Thu, 7 May 2009 00:13:27 +0000 (17:13 -0700)]
GIT 1.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4029: use sh instead of bash
Nguyễn Thái Ngọc Duy [Wed, 6 May 2009 14:33:34 +0000 (00:33 +1000)]
t4029: use sh instead of bash

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4200: convert sed expression which operates on non-text file to perl
Brandon Casey [Wed, 6 May 2009 22:56:18 +0000 (17:56 -0500)]
t4200: convert sed expression which operates on non-text file to perl

POSIX only requires sed to work on text files and MERGE_RR is not a text
file.  Some versions of sed complain that this file is not newline
terminated, and exit non-zero.  Use perl instead which does not have a
problem with it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4200: remove two unnecessary lines
Brandon Casey [Wed, 6 May 2009 22:56:17 +0000 (17:56 -0500)]
t4200: remove two unnecessary lines

These two lines appear to be unnecessary.  They set variables which are not
used afterwards.  The primary motivation to remove them is that the sed
invocation exits non-zero for seds which require newline termination of
input files.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot/annotate-tests.sh: avoid passing a non-newline terminated file to sed
Brandon Casey [Wed, 6 May 2009 18:29:16 +0000 (13:29 -0500)]
t/annotate-tests.sh: avoid passing a non-newline terminated file to sed

Some versions of sed exit non-zero if the file they are supplied is not
newline terminated.  Solaris's /usr/xpg4/bin/sed is one such sed.  So
rework this test to avoid doing so.

This affects tests t8001-annotate.sh and t8002-blame.sh.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4118: avoid sed invocation on file without terminating newline
Brandon Casey [Wed, 6 May 2009 18:29:15 +0000 (13:29 -0500)]
t4118: avoid sed invocation on file without terminating newline

Some versions of sed exit non-zero if the file they are supplied is not
newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed.  In
this case the sed invocation can be avoided entirely since the resulting
file is equivalent to a previously created file.  So, just copy that file
into place instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4118: add missing '&&'
Brandon Casey [Wed, 6 May 2009 18:29:14 +0000 (13:29 -0500)]
t4118: add missing '&&'

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot8005: use egrep when extended regular expressions are required
Brandon Casey [Wed, 6 May 2009 18:31:42 +0000 (13:31 -0500)]
t8005: use egrep when extended regular expressions are required

Not all versions of grep understand backslashed extended regular
expressions.  Possibly only gnu grep does.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-clean doc: the command only affects paths under $(cwd)
Junio C Hamano [Wed, 6 May 2009 17:48:26 +0000 (10:48 -0700)]
git-clean doc: the command only affects paths under $(cwd)

Fredrik Skolmli and Thomas Rast noticed that it was left unstated that
"git clean" ran from a subdirectory will not affect anything outside it,
with or without path limiters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 6 May 2009 05:52:17 +0000 (22:52 -0700)]
Merge branch 'maint'

* maint:
  improve error message in config.c
  t4018-diff-funcname: add cpp xfuncname pattern to syntax test
  Work around BSD whose typeof(tv.tv_sec) != time_t
  git-am.txt: reword extra headers in message body
  git-am.txt: Use date or value instead of time or timestamp
  git-am.txt: add an 'a', say what 'it' is, simplify a sentence
  dir.c: Fix two minor grammatical errors in comments
  git-svn: fix a sloppy Getopt::Long usage

15 years agoMerge branch 'rj/maint-1.6.0-svn-parse-fix' into maint
Junio C Hamano [Wed, 6 May 2009 05:51:49 +0000 (22:51 -0700)]
Merge branch 'rj/maint-1.6.0-svn-parse-fix' into maint

* rj/maint-1.6.0-svn-parse-fix:
  git-svn: fix a sloppy Getopt::Long usage

15 years agoMerge branch 'maint-1.6.0' into maint
Junio C Hamano [Wed, 6 May 2009 05:51:31 +0000 (22:51 -0700)]
Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
  dir.c: Fix two minor grammatical errors in comments

15 years agoimprove error message in config.c
Alex Riesen [Wed, 29 Apr 2009 21:27:54 +0000 (23:27 +0200)]
improve error message in config.c

Show errno if opening a lockfile fails.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot4018-diff-funcname: add cpp xfuncname pattern to syntax test
Brandon Casey [Sat, 2 May 2009 14:31:16 +0000 (09:31 -0500)]
t4018-diff-funcname: add cpp xfuncname pattern to syntax test

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoWork around BSD whose typeof(tv.tv_sec) != time_t
Bernd Ahlers [Mon, 6 Apr 2009 17:26:37 +0000 (19:26 +0200)]
Work around BSD whose typeof(tv.tv_sec) != time_t

According to POSIX, tv_sec is supposed to be a time_t, but OpenBSD
(and FreeBSD, too) defines it to be a long, which triggers a type
mismatch when a pointer to it is given to localtime_r().

Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-am.txt: reword extra headers in message body
Stephen Boyd [Mon, 4 May 2009 06:46:58 +0000 (23:46 -0700)]
git-am.txt: reword extra headers in message body

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-am.txt: Use date or value instead of time or timestamp
Stephen Boyd [Tue, 5 May 2009 05:19:00 +0000 (22:19 -0700)]
git-am.txt: Use date or value instead of time or timestamp

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-am.txt: add an 'a', say what 'it' is, simplify a sentence
Stephen Boyd [Tue, 5 May 2009 05:18:42 +0000 (22:18 -0700)]
git-am.txt: add an 'a', say what 'it' is, simplify a sentence

It's nice to know that 'it' is git-am or the subject line. Whitespace
implies characters so just remove characters.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompletion: complete values for send-email
Stephen Boyd [Mon, 4 May 2009 06:25:35 +0000 (23:25 -0700)]
completion: complete values for send-email

Add completion for --confirm, --suppress-cc, and --smtp-encryption
command line arguments. Add completion for aliasfiletype and confirm
configuration variables.

Since --smtp-ssl is deprecated, replace it with --smtp-encryption and
the two options ssl and tls.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompletion: complete values for log.date
Stephen Boyd [Mon, 4 May 2009 06:25:34 +0000 (23:25 -0700)]
completion: complete values for log.date

Add raw to the date formats too.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompletion: complete values for help.format
Stephen Boyd [Mon, 4 May 2009 06:25:33 +0000 (23:25 -0700)]
completion: complete values for help.format

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompletion: add {gui,diff,merge}tool, man, and pager config variables
Stephen Boyd [Mon, 4 May 2009 06:25:32 +0000 (23:25 -0700)]
completion: add {gui,diff,merge}tool, man, and pager config variables

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompletion: add missing configuration variables to _git_config()
Stephen Boyd [Mon, 4 May 2009 06:25:31 +0000 (23:25 -0700)]
completion: add missing configuration variables to _git_config()

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodir.c: Fix two minor grammatical errors in comments
Allan Caffee [Mon, 4 May 2009 17:37:30 +0000 (13:37 -0400)]
dir.c: Fix two minor grammatical errors in comments

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-svn: fix a sloppy Getopt::Long usage
Robin H. Johnson [Tue, 5 May 2009 18:16:14 +0000 (11:16 -0700)]
git-svn: fix a sloppy Getopt::Long usage

Getopt-Long v2.38 is much stricter about sloppy getopt usage. The
trailing pipe causes git-svn testcases to fail for all of the --stdin
argument calls.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSync with GIT 1.6.2.5
Junio C Hamano [Sun, 3 May 2009 23:46:34 +0000 (16:46 -0700)]
Sync with GIT 1.6.2.5

15 years agoGIT 1.6.2.5 v1.6.2.5
Junio C Hamano [Sun, 3 May 2009 23:14:58 +0000 (16:14 -0700)]
GIT 1.6.2.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'np/maint-no-ofs-delta' into maint
Junio C Hamano [Sun, 3 May 2009 23:50:47 +0000 (16:50 -0700)]
Merge branch 'np/maint-no-ofs-delta' into maint

* np/maint-no-ofs-delta:
  honor repack.usedeltabaseoffset when fetching packs

15 years agoMerge branch 'maint-1.6.1' into maint
Junio C Hamano [Sun, 3 May 2009 23:14:07 +0000 (16:14 -0700)]
Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
  GIT 1.6.1.4

Conflicts:
GIT-VERSION-GEN

15 years agoGIT 1.6.1.4 v1.6.1.4
Junio C Hamano [Sun, 3 May 2009 22:20:03 +0000 (15:20 -0700)]
GIT 1.6.1.4

With a handful of fixes backmerged from 1.6.2.X series

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/maint-read-tree-multi' into maint
Junio C Hamano [Sun, 3 May 2009 22:02:59 +0000 (15:02 -0700)]
Merge branch 'jc/maint-read-tree-multi' into maint

* jc/maint-read-tree-multi:
  checkout branch: prime cache-tree fully
  read-tree -m A B: prime cache-tree from the switched-to tree
  Move prime_cache_tree() to cache-tree.c
  read-tree A B: do not corrupt cache-tree

15 years agoMerge branch 'mk/maint-apply-swap' into maint
Junio C Hamano [Sun, 3 May 2009 22:02:52 +0000 (15:02 -0700)]
Merge branch 'mk/maint-apply-swap' into maint

* mk/maint-apply-swap:
  tests: make test-apply-criss-cross-rename more robust
  builtin-apply: keep information about files to be deleted
  tests: test applying criss-cross rename patch

15 years agoMerge branch 'mm/maint-add-p-quit' into maint
Junio C Hamano [Sun, 3 May 2009 22:02:46 +0000 (15:02 -0700)]
Merge branch 'mm/maint-add-p-quit' into maint

* mm/maint-add-p-quit:
  git add -p: add missing "q" to patch prompt

15 years agoMerge branch 'lt/pack-object-memuse' into maint
Junio C Hamano [Sun, 3 May 2009 22:02:40 +0000 (15:02 -0700)]
Merge branch 'lt/pack-object-memuse' into maint

* lt/pack-object-memuse:
  show_object(): push path_name() call further down
  process_{tree,blob}: show objects without buffering

15 years agoMerge branch 'jc/maint-1.6.0-keep-pack' into maint-1.6.1
Junio C Hamano [Sun, 3 May 2009 22:01:31 +0000 (15:01 -0700)]
Merge branch 'jc/maint-1.6.0-keep-pack' into maint-1.6.1

* jc/maint-1.6.0-keep-pack:
  pack-objects: don't loosen objects available in alternate or kept packs
  t7700: demonstrate repack flaw which may loosen objects unnecessarily
  Remove --kept-pack-only option and associated infrastructure
  pack-objects: only repack or loosen objects residing in "local" packs
  git-repack.sh: don't use --kept-pack-only option to pack-objects
  t7700-repack: add two new tests demonstrating repacking flaws
  is_kept_pack(): final clean-up
  Simplify is_kept_pack()
  Consolidate ignore_packed logic more
  has_sha1_kept_pack(): take "struct rev_info"
  has_sha1_pack(): refactor "pretend these packs do not exist" interface
  git-repack: resist stray environment variable

15 years agoMerge branch 'jc/maint-1.6.0-diff-borrow-carefully' into maint-1.6.1
Junio C Hamano [Sun, 3 May 2009 22:01:26 +0000 (15:01 -0700)]
Merge branch 'jc/maint-1.6.0-diff-borrow-carefully' into maint-1.6.1

* jc/maint-1.6.0-diff-borrow-carefully:
  diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged

15 years agoMerge branch 'bs/maint-1.6.0-tree-walk-prefix' into maint-1.6.1
Junio C Hamano [Sun, 3 May 2009 22:01:19 +0000 (15:01 -0700)]
Merge branch 'bs/maint-1.6.0-tree-walk-prefix' into maint-1.6.1

* bs/maint-1.6.0-tree-walk-prefix:
  match_tree_entry(): a pathspec only matches at directory boundaries
  tree_entry_interesting: a pathspec only matches at directory boundary

15 years agoGIT 1.6.3-rc4 v1.6.3-rc4
Junio C Hamano [Sat, 2 May 2009 06:31:00 +0000 (23:31 -0700)]
GIT 1.6.3-rc4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agohonor repack.usedeltabaseoffset when fetching packs
Nicolas Pitre [Sat, 2 May 2009 00:18:02 +0000 (20:18 -0400)]
honor repack.usedeltabaseoffset when fetching packs

If the local receiving repository has disabled the use of delta base
offset, for example to retain compatibility with older versions of
Git that predate OFS_DELTA, we shouldn't ask for ofs-delta support
when we obtain a pack from the remote server.

[ issue noticed by Shawn Pearce ]

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Sat, 2 May 2009 05:11:57 +0000 (22:11 -0700)]
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: Fixes for Mac OS X TkAqua
  git-gui: Update Russian translation
  git-gui: run post-checkout hook after clone
  git-gui: Ensure consistent usage of mergetool.keepBackup
  git-gui: fix use of undeclared variable diff_empty_count
  git-gui (Win): make starting via "Git GUI Here" on .git/ possible
  git-gui (Win): make "Explore Working Copy" more robust
  git-gui: run post-checkout hook on checkout
  git-gui: When calling post-commit hook wrong variable was cleared.
  git-gui: use `git --html-path` to get the location of installed HTML docs
  git-gui: fix deleting from the context menu with empty selection
  git-gui: minor spelling fix and string factorisation.
  git-gui: various French translation fixes
  git-gui: Fix merge conflict display error when filename contains spaces
  git-gui: don't hide the Browse button when resizing the repo chooser
  Append ampersand to "Target" of lnk files created by do_cygwin_shortcut
  git-gui: Support more git version notations.
  git-gui: Avoid an infinite rescan loop in handle_empty_diff.
  git-gui: Fix post-commit status with subject in non-locale encoding

15 years agoctype.c: fix typo in comment
René Scharfe [Fri, 1 May 2009 20:03:07 +0000 (22:03 +0200)]
ctype.c: fix typo in comment

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix a bunch of pointer declarations (codestyle)
Felipe Contreras [Fri, 1 May 2009 09:06:36 +0000 (12:06 +0300)]
Fix a bunch of pointer declarations (codestyle)

Essentially; s/type* /type */ as per the coding guidelines.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-gui: Fixes for Mac OS X TkAqua
Daniel A. Steffen [Sat, 16 Aug 2008 01:20:09 +0000 (03:20 +0200)]
git-gui: Fixes for Mac OS X TkAqua

- detect more Tk.framework variants
- fix apple menu setup, use native preferences menu item
- don't set menu font

Signed-off-by: Daniel A. Steffen <das@users.sourceforge.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Fri, 1 May 2009 02:56:28 +0000 (19:56 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Add Russian translation
  gitk: Fix compare-commits function when we have local changes
  gitk: Avoid crash if closed while reading references
  gitk: Handle external diff tool with spaces in the path
  gitk: Remember and restore the window state with the geometry
  gitk: Map KP_Divide to focus the search box
  gitk: Mark some more strings for translation
  gitk: Mark forgotten string for translation
  gitk: Make .gitk a hidden file under windows
  gitk: Add a command to compare two strings of commits
  gitk: Add a way to mark a commit, plus a "find descendant" command
  gitk: Fixes for Mac OS X TkAqua
  gitk: Provide a 32x32 window icon based on the git logo
  gitk: Provide a window icon if possible
  gitk: Handle blobs containing a DOS end-of-file marker

15 years agogitk: Add Russian translation
Alex Riesen [Mon, 27 Apr 2009 18:04:27 +0000 (20:04 +0200)]
gitk: Add Russian translation

Thanks go to Dmitry Potapov for proofreading and suggested translation
of the word 'merge'.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoimprove error message in config.c
Alex Riesen [Wed, 29 Apr 2009 21:27:54 +0000 (23:27 +0200)]
improve error message in config.c

Show errno if opening a lockfile fails.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 29 Apr 2009 23:50:31 +0000 (16:50 -0700)]
Merge branch 'maint'

* maint:
  diff -c -p: do not die on submodules

Conflicts:
combine-diff.c

15 years agodaemon.c: fix segfault on OS X
Benjamin Kramer [Mon, 27 Apr 2009 13:59:49 +0000 (15:59 +0200)]
daemon.c: fix segfault on OS X

On OS X (and maybe other unices), getaddrinfo(3) returns NULL
in the ai_canonname field if it's called with an IP address for
the hostname. We'll now use the IP address for the hostname if
ai_canonname was NULL, this also matches the behaviour on Linux.

steps to reproduce:
$ git daemon --export-all
$ git clone git://127.0.0.1/frotz
=> git daemon's fork (silently) segfaults.

Remove the pointless loop while at it. There is only one iteration
because of the break; on the last line and there are no continues.

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agomerge-recursive: do not die on a conflicting submodule
Junio C Hamano [Wed, 29 Apr 2009 18:08:18 +0000 (11:08 -0700)]
merge-recursive: do not die on a conflicting submodule

We cannot represent the 3-way conflicted state in the work tree
for these entries, but it is normal not to have commit objects
for them in our repository.  Just update the index and the life
will be good.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit config: error when editing a repo config and not being in one
Felipe Contreras [Wed, 29 Apr 2009 22:49:47 +0000 (01:49 +0300)]
git config: error when editing a repo config and not being in one

Let's throw an error on this specific case. If the user specifies the
config file, he must know what he is doing.

Teemu Likonen pointed this out.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoparseopt: fix documentation for --keep-dashdash
Uwe Kleine-König [Tue, 28 Apr 2009 20:29:24 +0000 (22:29 +0200)]
parseopt: fix documentation for --keep-dashdash

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoRename core.unreliableHardlinks to core.createObject
Johannes Schindelin [Mon, 27 Apr 2009 22:32:25 +0000 (00:32 +0200)]
Rename core.unreliableHardlinks to core.createObject

"Unreliable hardlinks" is a misleading description for what is happening.
So rename it to something less misleading.

Suggested by Linus Torvalds.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint-1.6.1' into maint
Junio C Hamano [Wed, 29 Apr 2009 22:40:33 +0000 (15:40 -0700)]
Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
  diff -c -p: do not die on submodules

15 years agoMerge branch 'maint-1.6.0' into maint-1.6.1
Junio C Hamano [Wed, 29 Apr 2009 20:43:13 +0000 (13:43 -0700)]
Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
  diff -c -p: do not die on submodules

15 years agodiff -c -p: do not die on submodules
Junio C Hamano [Wed, 29 Apr 2009 19:49:52 +0000 (12:49 -0700)]
diff -c -p: do not die on submodules

The combine diff logic knew only about blobs (and their checked-out form
in the work tree, either regular files or symlinks), and barfed when fed
submodules.  This "externalizes" gitlinks in the same way as the normal
patch generation codepath does (i.e. "Subproject commit Xxx\n") to fix the
issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-gui: Update Russian translation
Alex Riesen [Wed, 29 Apr 2009 05:56:06 +0000 (07:56 +0200)]
git-gui: Update Russian translation

Also, the previous translations of the words 'tag' and 'merge' were
changed. Added translation of the 'Tool' submenu.

Thanks go to Alexander Gavrilov and Dmitry Potapov for proofreading
and suggestions.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agodoc: consistently use ASCIIDOC_EXTRA
Eric Blake [Tue, 28 Apr 2009 12:28:32 +0000 (06:28 -0600)]
doc: consistently use ASCIIDOC_EXTRA

For all uses of $(ASCIIDOC) in Documentation/Makefile, supply the same
options via $(ASCIIDOC_EXTRA).

Signed-off-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: installing git in cygwin 1.7.0
Eric Blake [Tue, 28 Apr 2009 12:28:31 +0000 (06:28 -0600)]
Makefile: installing git in cygwin 1.7.0

On platforms with $X, make removes any leftover scripts 'a' from
earlier builds if a new binary 'a.exe' is now built.  However, on
cygwin 1.7.0, 'git' and 'git.exe' now consistently name the same file.
Test for file equality before attempting a remove, in order to avoid
nuking just-built binaries.

This repeats commit 0d768f7 for the installation destdir.

Signed-off-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Tue, 28 Apr 2009 07:46:39 +0000 (00:46 -0700)]
Merge branch 'maint'

* maint:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message

15 years agoMerge branch 'maint-1.6.1' into maint
Junio C Hamano [Tue, 28 Apr 2009 07:46:25 +0000 (00:46 -0700)]
Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message

15 years agoMerge branch 'maint-1.6.0' into maint-1.6.1
Junio C Hamano [Tue, 28 Apr 2009 07:46:20 +0000 (00:46 -0700)]
Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message

15 years agoSubmittingPatches: itemize and reflect upon well written changes
Sam Vilain [Mon, 27 Apr 2009 14:38:47 +0000 (02:38 +1200)]
SubmittingPatches: itemize and reflect upon well written changes

The SubmittingPatches file was trimmed down from a somewhat
overwhelming set of requirements from the Linux Kernel equivalent;
however perhaps a little of it can be returned without making the
text too long.

Signed-off-by: Sam Vilain <sam@vilain.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: fix NO_PERL bug with gitweb
Jeff King [Tue, 28 Apr 2009 03:34:24 +0000 (23:34 -0400)]
Makefile: fix NO_PERL bug with gitweb

When the user has defined NO_PERL, we want to skip building
gitweb entirely.  However, the conditional to add
gitweb/gitweb.cgi to OTHER_PROGRAMS was evaluated before we
actually parsed the user's config.mak. This meant that "make
NO_PERL=NoThanks" worked fine, but putting "NO_PERL=NoThanks"
into your config.mak broke the build (it wanted gitweb.cgi
to satisfy "all", but the rule to build it was conditionally
ignored, so it complained).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogrep: fix segfault when "git grep '('" is given
Linus Torvalds [Mon, 27 Apr 2009 18:10:24 +0000 (11:10 -0700)]
grep: fix segfault when "git grep '('" is given

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot5701: do not get stuck in empty-push/
Johannes Schindelin [Mon, 27 Apr 2009 22:12:31 +0000 (00:12 +0200)]
t5701: do not get stuck in empty-push/

A test might happen to be the last one in the script, but other people
later may want to add more tests after your test is done.

Do not surprise them by going in a subdirectory to run a part of your test
and never coming out of it.  This fixes a162e78 in that respect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoNetBSD compilation fix
Patrick Welche [Sun, 26 Apr 2009 13:49:00 +0000 (14:49 +0100)]
NetBSD compilation fix

Similar to other BSD variants, it needs USE_ST_TIMESPEC.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: fix a grammatical error in api-builtin.txt
Allan Caffee [Mon, 13 Apr 2009 18:11:21 +0000 (14:11 -0400)]
Documentation: fix a grammatical error in api-builtin.txt

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-merge: fix a typo in an error message
Allan Caffee [Mon, 13 Apr 2009 18:10:08 +0000 (14:10 -0400)]
builtin-merge: fix a typo in an error message

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoAdd semicolon to curly brace group in main Makefile
Mark Drago [Mon, 27 Apr 2009 02:36:48 +0000 (22:36 -0400)]
Add semicolon to curly brace group in main Makefile

This semicolon is technically required by POSIX shell and indeed causes a
syntax error with e.g. bash-2.04.0.  Cf.

  http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02_09_04_01

Signed-off-by: Mark Drago <markdrago@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoprune-packed: advanced progress even for non-existing fan-out directories
Johannes Sixt [Mon, 27 Apr 2009 07:44:58 +0000 (09:44 +0200)]
prune-packed: advanced progress even for non-existing fan-out directories

A progress indicator is used to count through the 256 object fan-out
directories while unused object files are removed. (However, it becomes
visible only if this process takes long enough.)

Previously, display_progress() was only called if object files were
actually removed. But if directories towards the end (fd/, fe/, ff/) did
not exist, this could leave a strange line

   Removing duplicate objects:  99% (255/256), done.

in the terminal instead of the expected "100% (256/256)".

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>