Git development
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] config: Introduce diff.algorithm variable
From: Junio C Hamano @ 2013-01-14 18:33 UTC (permalink / raw)
  To: Michal Privoznik; +Cc: git, peff, trast
In-Reply-To: <72370b372a56cc5bfaa9741eae62eae2854964b2.1358006339.git.mprivozn@redhat.com>

Michal Privoznik <mprivozn@redhat.com> writes:

> Some users or projects prefer different algorithms over others, e.g.
> patience over myers or similar. However, specifying appropriate
> argument every time diff is to be used is impractical. Moreover,
> creating an alias doesn't play nicely with other tools based on diff
> (git-show for instance). Hence, a configuration variable which is able
> to set specific algorithm is needed. For now, these four values are
> accepted: 'myers' (which has the same effect as not setting the config
> variable at all), 'minimal', 'patience' and 'histogram'.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  Documentation/diff-config.txt          | 17 +++++++++++++++++
>  contrib/completion/git-completion.bash |  1 +
>  diff.c                                 | 23 +++++++++++++++++++++++
>  3 files changed, 41 insertions(+)
>
> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
> index 4314ad0..be31276 100644
> --- a/Documentation/diff-config.txt
> +++ b/Documentation/diff-config.txt
> @@ -155,3 +155,20 @@ diff.tool::
>  	"kompare".  Any other value is treated as a custom diff tool,
>  	and there must be a corresponding `difftool.<tool>.cmd`
>  	option.
> +
> +diff.algorithm::
> +	Choose a diff algorithm.  The variants are as follows:
> ++
> +--
> +`myers`;;
> +	The basic greedy diff algorithm.
> +`minimal`;;
> +	Spend extra time to make sure the smallest possible diff is
> +	produced.
> +`patience`;;
> +	Use "patience diff" algorithm when generating patches.
> +`histogram`;;
> +	This algorithm extends the patience algorithm to "support
> +	low-occurrence common elements".
> +--
> ++

Sounds sensible.

> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 383518c..33e25dc 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1839,6 +1839,7 @@ _git_config ()
>  		diff.suppressBlankEmpty
>  		diff.tool
>  		diff.wordRegex
> +		diff.algorithm
>  		difftool.
>  		difftool.prompt
>  		fetch.recurseSubmodules
> diff --git a/diff.c b/diff.c
> index 732d4c2..ddae5c4 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -36,6 +36,7 @@ static int diff_no_prefix;
>  static int diff_stat_graph_width;
>  static int diff_dirstat_permille_default = 30;
>  static struct diff_options default_diff_options;
> +static long diff_algorithm = 0;

Please do not initialize a static explicitly to a zero and instead
let BSS do its thing.

>  static char diff_colors[][COLOR_MAXLEN] = {
>  	GIT_COLOR_RESET,
> @@ -143,6 +144,20 @@ static int git_config_rename(const char *var, const char *value)
>  	return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
>  }
>  
> +static long parse_algorithm_value(const char *value)
> +{
> +	if (!value || !strcasecmp(value, "myers"))
> +		return 0;
> +	else if (!strcasecmp(value, "minimal"))
> +		return XDF_NEED_MINIMAL;
> +	else if (!strcasecmp(value, "patience"))
> +		return XDF_PATIENCE_DIFF;
> +	else if (!strcasecmp(value, "histogram"))
> +		return XDF_HISTOGRAM_DIFF;
> +	else
> +		return -1;
> +}
> +
>  /*
>   * These are to give UI layer defaults.
>   * The core-level commands such as git-diff-files should
> @@ -196,6 +211,13 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
>  		return 0;
>  	}
>  
> +	if (!strcmp(var, "diff.algorithm")) {
> +		diff_algorithm = parse_algorithm_value(value);
> +		if (diff_algorithm < 0)
> +			return -1;
> +		return 0;
> +	}
> +
>  	if (git_color_config(var, value, cb) < 0)
>  		return -1;
>  
> @@ -3213,6 +3235,7 @@ void diff_setup(struct diff_options *options)
>  	options->add_remove = diff_addremove;
>  	options->use_color = diff_use_color_default;
>  	options->detect_rename = diff_detect_rename_default;
> +	options->xdl_opts |= diff_algorithm;
>  
>  	if (diff_no_prefix) {
>  		options->a_prefix = options->b_prefix = "";

^ permalink raw reply

* Re: [PATCH 3/3] diff: Introduce --diff-algorithm command line option
From: Junio C Hamano @ 2013-01-14 18:44 UTC (permalink / raw)
  To: Michal Privoznik; +Cc: git, peff, trast
In-Reply-To: <6c058f13c6bb83985e8651a8dde99e7b17879d4e.1358006339.git.mprivozn@redhat.com>

Michal Privoznik <mprivozn@redhat.com> writes:

> Since command line options have higher priority than config file
> variables and taking previous commit into account, we need a way
> how to specify myers algorithm on command line.

Yes.  We cannot stop at [2/3] without this patch.

> However,
> inventing `--myers` is not the right answer. We need far more
> general option, and that is `--diff-algorithm`.

Yes, --diff-algorithm=default would let people defeat a configured
algo without knowing how exactly to spell myers.

> The older options
> (`--minimal`, `--patience` and `--histogram`) are kept for
> backward compatibility.

That is phrasing it too strongly to be acceptable.

People who do not care any configuration can keep using --histogram
without having to retrain their fingers to type a much longer form
you introduced (i.e. --diff-algorithm=histogram).  It is and will
always be just as valid a way to ask for --histogram as the new
longhand is.

> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  Documentation/diff-options.txt         | 22 ++++++++++++++++++++++
>  contrib/completion/git-completion.bash | 11 +++++++++++
>  diff.c                                 | 12 +++++++++++-
>  diff.h                                 |  2 ++
>  merge-recursive.c                      |  6 ++++++
>  5 files changed, 52 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 39f2c50..4091f52 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -45,6 +45,9 @@ ifndef::git-format-patch[]
>  	Synonym for `-p --raw`.
>  endif::git-format-patch[]
>  
> +The next three options are kept for compatibility reason. You should use the
> +`--diff-algorithm` option instead.
> +

Drop this.

> @@ -55,6 +58,25 @@ endif::git-format-patch[]
>  --histogram::
>  	Generate a diff using the "histogram diff" algorithm.
>  
> +--diff-algorithm={patience|minimal|histogram|myers}::
> +	Choose a diff algorithm. The variants are as follows:
> ++
> +--
> +`myers`;;
> +	The basic greedy diff algorithm.
> +`minimal`;;
> +	Spend extra time to make sure the smallest possible diff is
> +	produced.
> +`patience`;;
> +	Use "patience diff" algorithm when generating patches.
> +`histogram`;;
> +	This algorithm extends the patience algorithm to "support
> +	low-occurrence common elements".
> +--
> ++
> +You should prefer this option over the `--minimal`, `--patience` and
> +`--histogram` which are kept just for backwards compatibility.

Drop the last one, and replace it with something like:

	If you configured diff.algorithm to a non-default value and
	want to use the default one, you have to use this form and
	choose myers, i.e. --diff-algorithm=myers, as we do not have
	a short-and-sweet --myers option.

(but the above is a bit too verbose, so please shorten it appropriately).

> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 33e25dc..d592cf9 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1021,6 +1021,8 @@ _git_describe ()
>  	__gitcomp_nl "$(__git_refs)"
>  }
>  
> +__git_diff_algorithms="myers minimal patience histogram"
> +
>  __git_diff_common_options="--stat --numstat --shortstat --summary
>  			--patch-with-stat --name-only --name-status --color
>  			--no-color --color-words --no-renames --check
> @@ -1035,6 +1037,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
>  			--raw
>  			--dirstat --dirstat= --dirstat-by-file
>  			--dirstat-by-file= --cumulative
> +			--diff-algorithm=
>  "
>  
>  _git_diff ()
> @@ -1042,6 +1045,10 @@ _git_diff ()
>  	__git_has_doubledash && return
>  
>  	case "$cur" in
> +	--diff-algorithm=*)
> +		__gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
> +		return
> +		;;
>  	--*)
>  		__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
>  			--base --ours --theirs --no-index
> @@ -2114,6 +2121,10 @@ _git_show ()
>  			" "" "${cur#*=}"
>  		return
>  		;;
> +	--diff-algorithm=*)
> +		__gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
> +		return
> +		;;
>  	--*)
>  		__gitcomp "--pretty= --format= --abbrev-commit --oneline
>  			$__git_diff_common_options
> diff --git a/diff.c b/diff.c
> index ddae5c4..6418076 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -144,7 +144,7 @@ static int git_config_rename(const char *var, const char *value)
>  	return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
>  }
>  
> -static long parse_algorithm_value(const char *value)
> +long parse_algorithm_value(const char *value)
>  {
>  	if (!value || !strcasecmp(value, "myers"))
>  		return 0;
> @@ -3633,6 +3633,16 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
>  		options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
>  	else if (!strcmp(arg, "--histogram"))
>  		options->xdl_opts = DIFF_WITH_ALG(options, HISTOGRAM_DIFF);
> +	else if (!prefixcmp(arg, "--diff-algorithm=")) {
> +		long value = parse_algorithm_value(arg+17);
> +		if (value < 0)
> +			return error("option diff-algorithm accepts \"myers\", "
> +				     "\"minimal\", \"patience\" and \"histogram\"");
> +		/* clear out previous settings */
> +		DIFF_XDL_CLR(options, NEED_MINIMAL);
> +		options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
> +		options->xdl_opts |= value;
> +	}
>  
>  	/* flags options */
>  	else if (!strcmp(arg, "--binary")) {
> diff --git a/diff.h b/diff.h
> index a47bae4..54c2590 100644
> --- a/diff.h
> +++ b/diff.h
> @@ -333,6 +333,8 @@ extern struct userdiff_driver *get_textconv(struct diff_filespec *one);
>  
>  extern int parse_rename_score(const char **cp_p);
>  
> +extern long parse_algorithm_value(const char *value);
> +
>  extern int print_stat_summary(FILE *fp, int files,
>  			      int insertions, int deletions);
>  extern void setup_diff_pager(struct diff_options *);
> diff --git a/merge-recursive.c b/merge-recursive.c
> index d882060..53d8feb 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -2068,6 +2068,12 @@ int parse_merge_opt(struct merge_options *o, const char *s)
>  		o->xdl_opts = DIFF_WITH_ALG(o, PATIENCE_DIFF);
>  	else if (!strcmp(s, "histogram"))
>  		o->xdl_opts = DIFF_WITH_ALG(o, HISTOGRAM_DIFF);
> +	else if (!strcmp(s, "diff-algorithm=")) {
> +		long value = parse_algorithm_value(s+15);
> +		if (value < 0)
> +			return -1;
> +		o->xdl_opts |= value;

Isn't this new hunk wrong?  DIFF_WITH_ALG() removes the previously
chosen algorithm choice before OR'ing the new one in, so that

	diff --histogram --patience

would not end up with a value PATIENCE|HISTOGRAM OR'ed together in
the algo field.

^ permalink raw reply

* Re: [PATCH 00/14] Remove unused code from imap-send.c
From: Junio C Hamano @ 2013-01-14 19:02 UTC (permalink / raw)
  To: Michael Haggerty; +Cc: Jonathan Nieder, Jeff King, git
In-Reply-To: <50F3D0ED.5030103@alum.mit.edu>

Michael Haggerty <mhagger@alum.mit.edu> writes:

> On 01/14/2013 07:57 AM, Jonathan Nieder wrote:
>> Michael Haggerty wrote:
>> 
>>>  imap-send.c | 286 +++++++++---------------------------------------------------
>>>  1 file changed, 39 insertions(+), 247 deletions(-)
>> 
>> See my replies for comments on patches 1, 6, 9, 11, and 12.  The rest
>> are
>> 
>> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>> 
>> The series is tasteful and easy to follow and it's hard to argue with
>> the resulting code reduction.  Thanks for a pleasant read.
>
> Thanks for your careful review.  I will re-roll the patch series as soon
> as I get the chance.

Thanks, all of you.  The numbers and the graph look very nice indeed
;-)

^ permalink raw reply

* Re: Error:non-monotonic index after failed recursive "sed" command
From: Junio C Hamano @ 2013-01-14 19:06 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: George Karpenkov, git
In-Reply-To: <50F3F852.8060800@viscovery.net>

Johannes Sixt <j.sixt@viscovery.net> writes:

> Am 1/14/2013 12:40, schrieb George Karpenkov:
>> I've managed to corrupt my very valuable repository with a recursive
>> sed which went wrong.
>> I wanted to convert all tabs to spaces with the following command:
>> 
>> find ./ -name '*.*' -exec sed -i 's/\t/    /g' {} \;
>> 
>> I think that has changed not only the files in the repo, but the data
>> files in .git directory itself. As a result, my index became
>> corrupted, and almost every single command dies:
>> 
>>> git log
>> error: non-monotonic index
>> ..git/objects/pack/pack-314b1944adebea645526b6724b2044c1313241f5.idx
>> error: non-monotonic index
>> ..git/objects/pack/pack-75c95b0defe1968b61e4f4e1ab7040d35110bfdc.idx
>> ....
> ...
> Try the reverse edit:
>
>  find .git -name '*.*' -exec sed -i 's/    /\t/g' {} \;
>
> Remove .git/index; it can be reconstructed (of course, assuming you
> started all this with a clean index; if not, you lose the staged changes).

Everybody seems to be getting an impression that .idx is the only
thing that got corrupt.  Where does that come from?

I do not see anything that prevents the original command line from
touching *.pack files.  Loose objects may have been left unmolested
as their names do not match '*.*', though.

^ permalink raw reply

* Re: [BUG] Possible bug in `remote set-url --add --push`
From: Junio C Hamano @ 2013-01-14 19:09 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Jardel Weyrich, Sascha Cunz, git
In-Reply-To: <50F40316.7010308@drmicha.warpmail.net>

Michael J Gruber <git@drmicha.warpmail.net> writes:

> It seems to me that everything works as designed, and that the man page
> talk about "push URLs" can be read in two ways,...

Hmph, but I had an impression that Jardel's original report was that
one of the --add --pushurl was not adding but was replacing.  If
that was a false alarm, everything you said makes sense to me.

Thanks.

^ permalink raw reply

* Re: [PATCH 3/3] diff: Introduce --diff-algorithm command line option
From: Junio C Hamano @ 2013-01-14 19:12 UTC (permalink / raw)
  To: Michal Privoznik; +Cc: git, peff, trast
In-Reply-To: <7vsj63bo4n.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Michal Privoznik <mprivozn@redhat.com> writes:
> ...
>> diff --git a/merge-recursive.c b/merge-recursive.c
>> index d882060..53d8feb 100644
>> --- a/merge-recursive.c
>> +++ b/merge-recursive.c
>> @@ -2068,6 +2068,12 @@ int parse_merge_opt(struct merge_options *o, const char *s)
>>  		o->xdl_opts = DIFF_WITH_ALG(o, PATIENCE_DIFF);
>>  	else if (!strcmp(s, "histogram"))
>>  		o->xdl_opts = DIFF_WITH_ALG(o, HISTOGRAM_DIFF);
>> +	else if (!strcmp(s, "diff-algorithm=")) {
>> +		long value = parse_algorithm_value(s+15);
>> +		if (value < 0)
>> +			return -1;
>> +		o->xdl_opts |= value;
>
> Isn't this new hunk wrong?  DIFF_WITH_ALG() removes the previously
> chosen algorithm choice before OR'ing the new one in, so that
>
> 	diff --histogram --patience
>
> would not end up with a value PATIENCE|HISTOGRAM OR'ed together in
> the algo field.

I misspoke; this is not "diff", but "merge-recursive".  The issue
may be the same here, though.

^ permalink raw reply

* Re: Error:non-monotonic index after failed recursive "sed" command
From: Matthieu Moy @ 2013-01-14 19:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Sixt, George Karpenkov, git
In-Reply-To: <7v622zbn3s.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Everybody seems to be getting an impression that .idx is the only
> thing that got corrupt.  Where does that come from?

It's the only thing that appear in the error message. This does not
imply that it is the only corrupt thing, but gives a little hope that it
may still be the case.

Actually, I thought the "read-only" protection should have protected
files in object/ directory, but a little testing shows that "sed -i"
gladly accepts to modify read-only files (technically, it does not
modify it, but creates a temporary file with the new content, and then
renames it to the new location). So, the hope that pack files are
uncorrupted is rather thin unfortunately.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply

* [PATCH] builtin/reset.c: Fix a sparse warning
From: Ramsay Jones @ 2013-01-14 19:28 UTC (permalink / raw)
  To: martinvonz; +Cc: GIT Mailing-list


In particular, sparse issues an "symbol not declared. Should it be
static?" warning for the 'parse_args' function. Since this function
does not require greater than file visibility, we suppress this
warning by simply adding the static modifier to it's decalaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Hi Martin,

When you re-roll your "reset" patches (branch 'mz/reset-misc'), could
you please squash this into commit b24b3654 ("reset.c: extract function
for parsing arguments", 09-01-2013). Note that this patch is on top of
the pu branch (@75ea4ed3), which includes Junio's style fix patch
(commit 9f45c39f, "[SQUASH???] style fix", 10-01-2013).

Thanks!

ATB,
Ramsay Jones

 builtin/reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/reset.c b/builtin/reset.c
index a37044e..c69f9da 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -171,7 +171,7 @@ static void die_if_unmerged_cache(int reset_type)
 
 }
 
-const char **parse_args(int argc, const char **argv, const char *prefix, const char **rev_ret)
+static const char **parse_args(int argc, const char **argv, const char *prefix, const char **rev_ret)
 {
 	const char *rev = "HEAD";
 	unsigned char unused[20];
-- 
1.8.1

^ permalink raw reply related

* Re: [PATCH] builtin/reset.c: Fix a sparse warning
From: Martin von Zweigbergk @ 2013-01-14 19:35 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: GIT Mailing-list
In-Reply-To: <50F45C7B.9030608@ramsay1.demon.co.uk>

On Mon, Jan 14, 2013 at 11:28 AM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
>
> In particular, sparse issues an "symbol not declared. Should it be
> static?" warning for the 'parse_args' function. Since this function
> does not require greater than file visibility, we suppress this
> warning by simply adding the static modifier to it's decalaration.

Oops, how did I miss that? Will fix in re-roll. Thanks.

Martin

^ permalink raw reply

* [ANNOUNCE] Git v1.8.1.1
From: Junio C Hamano @ 2013-01-14 19:54 UTC (permalink / raw)
  To: git; +Cc: Linux Kernel

The latest maintenance release Git v1.8.1.1 is now available at
the usual places.  This contains many bugfixes that have been
cooking on the 'master' branch since v1.8.1 was released.

The release tarballs are found at:

    http://code.google.com/p/git-core/downloads/list

and their SHA-1 checksums are:

44b90aab937b0e0dbb0661eb5ec4ca6182e60854  git-1.8.1.1.tar.gz
952e0950d40bb141357be88a63f4cbb58258a4f5  git-htmldocs-1.8.1.1.tar.gz
5089613a434ba09c94f6694d546c246838377760  git-manpages-1.8.1.1.tar.gz

Also the following public repositories all have a copy of the v1.8.1.1
tag and the maint branch that the tag points at:

  url = git://repo.or.cz/alt-git.git
  url = https://code.google.com/p/git-core/
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

Git 1.8.1.1 Release Notes
=========================

Fixes since v1.8.1
------------------

 * The attribute mechanism didn't allow limiting attributes to be
   applied to only a single directory itself with "path/" like the
   exclude mechanism does.

 * When attempting to read the XDG-style $HOME/.config/git/config and
   finding that $HOME/.config/git is a file, we gave a wrong error
   message, instead of treating the case as "a custom config file does
   not exist there" and moving on.

 * After failing to create a temporary file using mkstemp(), failing
   pathname was not reported correctly on some platforms.

 * http transport was wrong to ask for the username when the
   authentication is done by certificate identity.

 * The behaviour visible to the end users was confusing, when they
   attempt to kill a process spawned in the editor that was in turn
   launched by Git with SIGINT (or SIGQUIT), as Git would catch that
   signal and die.  We ignore these signals now.

 * A child process that was killed by a signal (e.g. SIGINT) was
   reported in an inconsistent way depending on how the process was
   spawned by us, with or without a shell in between.

 * After "git add -N" and then writing a tree object out of the
   index, the cache-tree data structure got corrupted.

 * "git apply" misbehaved when fixing whitespace breakages by removing
   excess trailing blank lines in some corner cases.

 * A tar archive created by "git archive" recorded a directory in a
   way that made NetBSD's implementation of "tar" sometimes unhappy.

 * When "git clone --separate-git-dir=$over_there" is interrupted, it
   failed to remove the real location of the $GIT_DIR it created.
   This was most visible when interrupting a submodule update.

 * "git fetch --mirror" and fetch that uses other forms of refspec
   with wildcard used to attempt to update a symbolic ref that match
   the wildcard on the receiving end, which made little sense (the
   real ref that is pointed at by the symbolic ref would be updated
   anyway).  Symbolic refs no longer are affected by such a fetch.

 * The "log --graph" codepath fell into infinite loop in some
   corner cases.

 * "git merge" started calling prepare-commit-msg hook like "git
   commit" does some time ago, but forgot to pay attention to the exit
   status of the hook.

 * "git pack-refs" that ran in parallel to another process that
   created new refs had a race that can lose new ones.

 * When a line to be wrapped has a solid run of non space characters
   whose length exactly is the wrap width, "git shortlog -w" failed
   to add a newline after such a line.

 * The way "git svn" asked for password using SSH_ASKPASS and
   GIT_ASKPASS was not in line with the rest of the system.

 * "gitweb", when sorting by age to show repositories with new
   activities first, used to sort repositories with absolutely
   nothing in it early, which was not very useful.

 * "gitweb", when sorting by age to show repositories with new
   activities first, used to sort repositories with absolutely
   nothing in it early, which was not very useful.

 * When autoconf is used, any build on a different commit always ran
   "config.status --recheck" even when unnecessary.

 * Some scripted programs written in Python did not get updated when
   PYTHON_PATH changed.

 * We have been carrying a translated and long-unmaintained copy of an
   old version of the tutorial; removed.

 * Portability issues in many self-test scripts have been addressed.


Also contains other minor fixes and documentation updates.

----------------------------------------------------------------

Changes since v1.8.1 are as follows:

Aaron Schrab (1):
      Use longer alias names in subdirectory tests

Adam Spiers (1):
      api-allocation-growing.txt: encourage better variable naming

Antoine Pelisse (1):
      merge: Honor prepare-commit-msg return code

Christian Couder (1):
      Makefile: detect when PYTHON_PATH changes

Jean-Noël AVILA (1):
      Add directory pattern matching to attributes

Jeff King (9):
      run-command: drop silent_exec_failure arg from wait_or_whine
      launch_editor: refactor to use start/finish_command
      run-command: do not warn about child death from terminal
      launch_editor: propagate signals from editor to git
      completion: complete refs for "git commit -c"
      refs: do not use cached refs in repack_without_ref
      tests: turn on test-lint by default
      fix compilation with NO_PTHREADS
      run-command: encode signal death as a positive integer

Jens Lehmann (1):
      clone: support atomic operation with --separate-git-dir

John Keeping (4):
      git-fast-import(1): remove duplicate '--done' option
      git-shortlog(1): document behaviour of zero-width wrap
      git-fast-import(1): combine documentation of --[no-]relative-marks
      git-fast-import(1): reorganise options

Jonathan Nieder (6):
      config, gitignore: failure to access with ENOTDIR is ok
      config: treat user and xdg config permission problems as errors
      doc: advertise GIT_CONFIG_NOSYSTEM
      config: exit on error accessing any config file
      build: do not automatically reconfigure unless configure.ac changed
      docs: manpage XML depends on asciidoc.conf

Junio C Hamano (20):
      apply.c:update_pre_post_images(): the preimage can be truncated
      format_commit_message(): simplify calls to logmsg_reencode()
      sh-setup: work around "unset IFS" bug in some shells
      fetch: ignore wildcarded refspecs that update local symbolic refs
      xmkstemp(): avoid showing truncated template more carefully
      t0200: "locale" may not exist
      t9502: do not assume GNU tar
      t4014: fix arguments to grep
      t3600: Avoid "cp -a", which is a GNUism
      t9020: use configured Python to run the test helper
      compat/fnmatch: update old-style definition to ANSI
      t9200: let "cvs init" create the test repository
      merge --no-edit: do not credit people involved in the side branch
      SubmittingPatches: who am I and who cares?
      SubmittingPatches: mention subsystems with dedicated repositories
      Documentation: full-ness of a bundle is significant for cloning
      SubmittingPatches: remove overlong checklist
      SubmittingPatches: give list and maintainer addresses
      Prepare for 1.8.1.1
      Git 1.8.1.1

Kirill Brilliantov (1):
      Documentation: correct example restore from bundle

Mark Levedahl (1):
      Makefile: add comment on CYGWIN_V15_WIN32API

Matthew Daley (1):
      gitweb: Sort projects with undefined ages last

Max Horn (1):
      configure.ac: fix pthreads detection on Mac OS X

Michael Schubert (2):
      git-subtree: ignore git-subtree executable
      git-subtree: fix typo in manpage

Michał Kiedrowicz (1):
      graph.c: infinite loop in git whatchanged --graph -m

Nguyễn Thái Ngọc Duy (4):
      cache-tree: remove dead i-t-a code in verify_cache()
      cache-tree: replace "for" loops in update_one with "while" loops
      cache-tree: fix writing cache-tree when CE_REMOVE is present
      cache-tree: invalidate i-t-a paths after generating trees

Orgad Shaneh (1):
      gitweb: fix error in sanitize when highlight is enabled

Paul Fox (1):
      launch_editor: ignore terminal signals while editor has control

Rene Bredlau (1):
      http.c: Avoid username prompt for certifcate credentials

René Scharfe (2):
      archive-tar: split long paths more carefully
      t1402: work around shell quoting issue on NetBSD

Sebastian Schuberth (1):
      nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2

Steffen Prohaska (2):
      shortlog: fix wrapping lines of wraplen
      strbuf_add_wrapped*(): Remove unused return value

Sven Strickroth (3):
      git-svn, perl/Git.pm: add central method for prompting passwords
      perl/Git.pm: Honor SSH_ASKPASS as fallback if GIT_ASKPASS is not set
      git-svn, perl/Git.pm: extend and use Git->prompt method for querying users

Thomas Ackermann (1):
      Remove Documentation/pt_BR/gittutorial.txt

Torsten Bögershausen (2):
      t9810: Do not use sed -i
      t9020: which is not portable

W. Trevor King (1):
      remote-hg: Fix biridectionality -> bidirectionality typos

^ permalink raw reply

* Re: Ediff interactive add
From: Rémi Vanicat @ 2013-01-14 19:57 UTC (permalink / raw)
  To: git mailing list
In-Reply-To: <50EFF882.5010206@mpp.mpg.de>

Frederik Beaujean <beaujean-rVlqnlWY17WELgA04lAiVw@public.gmane.org>
writes:

> On 13-01-11 01:47 AM, Samuel Wales wrote:
>> I have more on this, but if possible it would be best to make ediff do
>> that natively.  I don't know if that's possible.
> Thanks for your prompt replies. The reason I looked for this feature
> is that it is available in the package git-emacs. There I can choose
> Git - 
> Add to index - Select changes in current file. Then ediff starts, and
> I can modify the buffer named <index>:FILENAME at will.
> After I answer 'y' to 'Quit this Ediff session?',  another question comes up
> 'Add changes to the git index? (y or n)'. With 'y' I see the message
> Saving file /tmp/git-emacs-tmp6991oXZ...'
>
> So I guess all it takes is saving a temporary file and adding its
> content to the index. Given my lack of experience in lisp programming,
> I don't know how hard it actually is to implement in magit,
> though. But a quick look into the source code of git-emacs revealed
> this function
>

[...]

> I would be very happy if this became available in magit.

Could you test what has just been pushed in master, it should do it.

-- 
Rémi Vanicat

^ permalink raw reply

* [PATCH v2 2/3] config: Introduce diff.algorithm variable
From: Michal Privoznik @ 2013-01-14 19:58 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, trast
In-Reply-To: <cover.1358193364.git.mprivozn@redhat.com>

Some users or projects prefer different algorithms over others, e.g.
patience over myers or similar. However, specifying appropriate
argument every time diff is to be used is impractical. Moreover,
creating an alias doesn't play nicely with other tools based on diff
(git-show for instance). Hence, a configuration variable which is able
to set specific algorithm is needed. For now, these four values are
accepted: 'myers' (which has the same effect as not setting the config
variable at all), 'minimal', 'patience' and 'histogram'.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 Documentation/diff-config.txt          | 17 +++++++++++++++++
 contrib/completion/git-completion.bash |  1 +
 diff.c                                 | 23 +++++++++++++++++++++++
 3 files changed, 41 insertions(+)

diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index 4314ad0..be31276 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -155,3 +155,20 @@ diff.tool::
 	"kompare".  Any other value is treated as a custom diff tool,
 	and there must be a corresponding `difftool.<tool>.cmd`
 	option.
+
+diff.algorithm::
+	Choose a diff algorithm.  The variants are as follows:
++
+--
+`myers`;;
+	The basic greedy diff algorithm.
+`minimal`;;
+	Spend extra time to make sure the smallest possible diff is
+	produced.
+`patience`;;
+	Use "patience diff" algorithm when generating patches.
+`histogram`;;
+	This algorithm extends the patience algorithm to "support
+	low-occurrence common elements".
+--
++
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 383518c..33e25dc 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1839,6 +1839,7 @@ _git_config ()
 		diff.suppressBlankEmpty
 		diff.tool
 		diff.wordRegex
+		diff.algorithm
 		difftool.
 		difftool.prompt
 		fetch.recurseSubmodules
diff --git a/diff.c b/diff.c
index 732d4c2..e9a7e4d 100644
--- a/diff.c
+++ b/diff.c
@@ -36,6 +36,7 @@ static int diff_no_prefix;
 static int diff_stat_graph_width;
 static int diff_dirstat_permille_default = 30;
 static struct diff_options default_diff_options;
+static long diff_algorithm;
 
 static char diff_colors[][COLOR_MAXLEN] = {
 	GIT_COLOR_RESET,
@@ -143,6 +144,20 @@ static int git_config_rename(const char *var, const char *value)
 	return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
 }
 
+static long parse_algorithm_value(const char *value)
+{
+	if (!value || !strcasecmp(value, "myers"))
+		return 0;
+	else if (!strcasecmp(value, "minimal"))
+		return XDF_NEED_MINIMAL;
+	else if (!strcasecmp(value, "patience"))
+		return XDF_PATIENCE_DIFF;
+	else if (!strcasecmp(value, "histogram"))
+		return XDF_HISTOGRAM_DIFF;
+	else
+		return -1;
+}
+
 /*
  * These are to give UI layer defaults.
  * The core-level commands such as git-diff-files should
@@ -196,6 +211,13 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
 		return 0;
 	}
 
+	if (!strcmp(var, "diff.algorithm")) {
+		diff_algorithm = parse_algorithm_value(value);
+		if (diff_algorithm < 0)
+			return -1;
+		return 0;
+	}
+
 	if (git_color_config(var, value, cb) < 0)
 		return -1;
 
@@ -3213,6 +3235,7 @@ void diff_setup(struct diff_options *options)
 	options->add_remove = diff_addremove;
 	options->use_color = diff_use_color_default;
 	options->detect_rename = diff_detect_rename_default;
+	options->xdl_opts |= diff_algorithm;
 
 	if (diff_no_prefix) {
 		options->a_prefix = options->b_prefix = "";
-- 
1.8.0.2

^ permalink raw reply related

* [PATCH v2 1/3] git-completion.bash: Autocomplete --minimal and --histogram for git-diff
From: Michal Privoznik @ 2013-01-14 19:58 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, trast
In-Reply-To: <cover.1358193364.git.mprivozn@redhat.com>

Even though --patience was already there, we missed --minimal and
--histogram for some reason.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index a4c48e1..383518c 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1031,7 +1031,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
 			--no-ext-diff
 			--no-prefix --src-prefix= --dst-prefix=
 			--inter-hunk-context=
-			--patience
+			--patience --histogram --minimal
 			--raw
 			--dirstat --dirstat= --dirstat-by-file
 			--dirstat-by-file= --cumulative
-- 
1.8.0.2

^ permalink raw reply related

* [PATCH v2 3/3] diff: Introduce --diff-algorithm command line option
From: Michal Privoznik @ 2013-01-14 19:58 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, trast
In-Reply-To: <cover.1358193364.git.mprivozn@redhat.com>

Since command line options have higher priority than config file
variables and taking previous commit into account, we need a way
how to specify myers algorithm on command line. However,
inventing `--myers` is not the right answer. We need far more
general option, and that is `--diff-algorithm`.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 Documentation/diff-options.txt         | 23 +++++++++++++++++++++++
 contrib/completion/git-completion.bash | 11 +++++++++++
 diff.c                                 | 12 +++++++++++-
 diff.h                                 |  2 ++
 merge-recursive.c                      |  9 +++++++++
 5 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 39f2c50..01b97b3 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -55,6 +55,29 @@ endif::git-format-patch[]
 --histogram::
 	Generate a diff using the "histogram diff" algorithm.
 
+--diff-algorithm={patience|minimal|histogram|myers}::
+	Choose a diff algorithm. The variants are as follows:
++
+--
+`myers`;;
+	The basic greedy diff algorithm.
+`minimal`;;
+	Spend extra time to make sure the smallest possible diff is
+	produced.
+`patience`;;
+	Use "patience diff" algorithm when generating patches.
+`histogram`;;
+	This algorithm extends the patience algorithm to "support
+	low-occurrence common elements".
+--
++
+For instance, if you configured diff.algorithm variable to a
+non-default value and want to use the default one, then you
+have to use `--diff-algorithm=myers` option.
+
+You should prefer this option over the `--minimal`, `--patience` and
+`--histogram` which are kept just for backwards compatibility.
+
 --stat[=<width>[,<name-width>[,<count>]]]::
 	Generate a diffstat. By default, as much space as necessary
 	will be used for the filename part, and the rest for the graph
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 33e25dc..d592cf9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1021,6 +1021,8 @@ _git_describe ()
 	__gitcomp_nl "$(__git_refs)"
 }
 
+__git_diff_algorithms="myers minimal patience histogram"
+
 __git_diff_common_options="--stat --numstat --shortstat --summary
 			--patch-with-stat --name-only --name-status --color
 			--no-color --color-words --no-renames --check
@@ -1035,6 +1037,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
 			--raw
 			--dirstat --dirstat= --dirstat-by-file
 			--dirstat-by-file= --cumulative
+			--diff-algorithm=
 "
 
 _git_diff ()
@@ -1042,6 +1045,10 @@ _git_diff ()
 	__git_has_doubledash && return
 
 	case "$cur" in
+	--diff-algorithm=*)
+		__gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
+		return
+		;;
 	--*)
 		__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
 			--base --ours --theirs --no-index
@@ -2114,6 +2121,10 @@ _git_show ()
 			" "" "${cur#*=}"
 		return
 		;;
+	--diff-algorithm=*)
+		__gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
+		return
+		;;
 	--*)
 		__gitcomp "--pretty= --format= --abbrev-commit --oneline
 			$__git_diff_common_options
diff --git a/diff.c b/diff.c
index e9a7e4d..3e021d5 100644
--- a/diff.c
+++ b/diff.c
@@ -144,7 +144,7 @@ static int git_config_rename(const char *var, const char *value)
 	return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
 }
 
-static long parse_algorithm_value(const char *value)
+long parse_algorithm_value(const char *value)
 {
 	if (!value || !strcasecmp(value, "myers"))
 		return 0;
@@ -3633,6 +3633,16 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
 		options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
 	else if (!strcmp(arg, "--histogram"))
 		options->xdl_opts = DIFF_WITH_ALG(options, HISTOGRAM_DIFF);
+	else if (!prefixcmp(arg, "--diff-algorithm=")) {
+		long value = parse_algorithm_value(arg+17);
+		if (value < 0)
+			return error("option diff-algorithm accepts \"myers\", "
+				     "\"minimal\", \"patience\" and \"histogram\"");
+		/* clear out previous settings */
+		DIFF_XDL_CLR(options, NEED_MINIMAL);
+		options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
+		options->xdl_opts |= value;
+	}
 
 	/* flags options */
 	else if (!strcmp(arg, "--binary")) {
diff --git a/diff.h b/diff.h
index a47bae4..54c2590 100644
--- a/diff.h
+++ b/diff.h
@@ -333,6 +333,8 @@ extern struct userdiff_driver *get_textconv(struct diff_filespec *one);
 
 extern int parse_rename_score(const char **cp_p);
 
+extern long parse_algorithm_value(const char *value);
+
 extern int print_stat_summary(FILE *fp, int files,
 			      int insertions, int deletions);
 extern void setup_diff_pager(struct diff_options *);
diff --git a/merge-recursive.c b/merge-recursive.c
index 33ba5dc..ea9dbd3 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -2068,6 +2068,15 @@ int parse_merge_opt(struct merge_options *o, const char *s)
 		o->xdl_opts = DIFF_WITH_ALG(o, PATIENCE_DIFF);
 	else if (!strcmp(s, "histogram"))
 		o->xdl_opts = DIFF_WITH_ALG(o, HISTOGRAM_DIFF);
+	else if (!strcmp(s, "diff-algorithm=")) {
+		long value = parse_algorithm_value(s+15);
+		if (value < 0)
+			return -1;
+		/* clear out previous settings */
+		DIFF_XDL_CLR(o, NEED_MINIMAL);
+		o->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
+		o->xdl_opts |= value;
+	}
 	else if (!strcmp(s, "ignore-space-change"))
 		o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE;
 	else if (!strcmp(s, "ignore-all-space"))
-- 
1.8.0.2

^ permalink raw reply related

* [PATCH v2 0/3] Rework git-diff algorithm selection
From: Michal Privoznik @ 2013-01-14 19:58 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, trast

It's been a while I was trying to get this in. Recently, I realized how
important this is.

Please keep me CC'ed as I am not subscribed to the list.

diff to v1:
-Junio's suggestions worked in

Michal Privoznik (3):
  git-completion.bash: Autocomplete --minimal and --histogram for
    git-diff
  config: Introduce diff.algorithm variable
  diff: Introduce --diff-algorithm command line option

 Documentation/diff-config.txt          | 17 +++++++++++++++++
 Documentation/diff-options.txt         | 23 +++++++++++++++++++++++
 contrib/completion/git-completion.bash | 14 +++++++++++++-
 diff.c                                 | 33 +++++++++++++++++++++++++++++++++
 diff.h                                 |  2 ++
 merge-recursive.c                      |  9 +++++++++
 6 files changed, 97 insertions(+), 1 deletion(-)

-- 
1.8.0.2

^ permalink raw reply

* Re: Announcing git-reparent
From: Andreas Schwab @ 2013-01-14 20:08 UTC (permalink / raw)
  To: Piotr Krukowiecki; +Cc: Jonathan Nieder, Mark Lodato, git list
In-Reply-To: <CAA01Csoh24ppo37fzptzZKvFrzGQyhz-0eDTQsP8tZiTRQ2YwA@mail.gmail.com>

Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:

> Just wondering, is the result different than something like
>
> git checkout commit_to_reparent
> cp -r * ../snapshot/
> git reset --hard new_parent
> rm -r *
> cp -r ../snapshot/* .
> git add -A

I think you are looking for "git reset --soft new_parent", which keeps
both the index and the working tree intact.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply

* Re: Announcing git-reparent
From: Mark Lodato @ 2013-01-14 20:28 UTC (permalink / raw)
  To: Piotr Krukowiecki; +Cc: Jonathan Nieder, git list
In-Reply-To: <CAA01Csoh24ppo37fzptzZKvFrzGQyhz-0eDTQsP8tZiTRQ2YwA@mail.gmail.com>

On Mon, Jan 14, 2013 at 3:03 AM, Piotr Krukowiecki
<piotr.krukowiecki@gmail.com> wrote:
> Just wondering, is the result different than something like
>
> git checkout commit_to_reparent
> cp -r * ../snapshot/
> git reset --hard new_parent
> rm -r *
> cp -r ../snapshot/* .
> git add -A
>
> (assumes 1 parent, does not cope with .dot files, and has probably
> other small problems)

The result is similar, but your script would also lose the commit
message and author.  I think the following would do exactly as my
script does (untested):

git checkout commit_to_reparent
git branch tmp
git reset --soft new_parent
git commit -C tmp
git branch -D tmp

I actually contemplated using the above method in my script, rather
than git-commit-tree and git-reset.  In the end, I decided to stick
with my original approach because it does not create any intermediate
state; either an early command fails and nothing changes, or the git
reset works and everything is done.  Using the above might be cleaner
for the --edit flag since it allows the git-commit cleanup of the
commit message, but this would require much more careful error
handling, and might make the reflog uglier.

I'd be interested to hear a git expert's opinion on the choice.

^ permalink raw reply

* Re: [PATCH v2 2/3] config: Introduce diff.algorithm variable
From: Junio C Hamano @ 2013-01-14 21:05 UTC (permalink / raw)
  To: Michal Privoznik; +Cc: git, peff, trast
In-Reply-To: <f76708fc2a1dc33f3f9c67688ef5709302b56cbb.1358193364.git.mprivozn@redhat.com>

Michal Privoznik <mprivozn@redhat.com> writes:

> +static long parse_algorithm_value(const char *value)
> +{
> +	if (!value || !strcasecmp(value, "myers"))
> +		return 0;

[diff]
	algorithm

should probably error out.  Also it is rather unusual to parse the
keyword values case insensitively.

> +	else if (!strcasecmp(value, "minimal"))
> +		return XDF_NEED_MINIMAL;
> +	else if (!strcasecmp(value, "patience"))
> +		return XDF_PATIENCE_DIFF;
> +	else if (!strcasecmp(value, "histogram"))
> +		return XDF_HISTOGRAM_DIFF;
> +	else
> +		return -1;
> +}
> +
>  /*
>   * These are to give UI layer defaults.
>   * The core-level commands such as git-diff-files should
> @@ -196,6 +211,13 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
>  		return 0;
>  	}
>  
> +	if (!strcmp(var, "diff.algorithm")) {
> +		diff_algorithm = parse_algorithm_value(value);
> +		if (diff_algorithm < 0)
> +			return -1;
> +		return 0;
> +	}
> +
>  	if (git_color_config(var, value, cb) < 0)
>  		return -1;
>  
> @@ -3213,6 +3235,7 @@ void diff_setup(struct diff_options *options)
>  	options->add_remove = diff_addremove;
>  	options->use_color = diff_use_color_default;
>  	options->detect_rename = diff_detect_rename_default;
> +	options->xdl_opts |= diff_algorithm;
>  
>  	if (diff_no_prefix) {
>  		options->a_prefix = options->b_prefix = "";

^ permalink raw reply

* Re: [PATCH v2 3/3] diff: Introduce --diff-algorithm command line option
From: Junio C Hamano @ 2013-01-14 21:06 UTC (permalink / raw)
  To: Michal Privoznik; +Cc: git, peff, trast
In-Reply-To: <1b9015bb45f2ece54dae7baee3cbcdc54b9c7ee9.1358193364.git.mprivozn@redhat.com>

Michal Privoznik <mprivozn@redhat.com> writes:

> +--diff-algorithm={patience|minimal|histogram|myers}::
> +	Choose a diff algorithm. The variants are as follows:
> ++
> +--
> +`myers`;;
> +	The basic greedy diff algorithm.
> +`minimal`;;
> +	Spend extra time to make sure the smallest possible diff is
> +	produced.
> +`patience`;;
> +	Use "patience diff" algorithm when generating patches.
> +`histogram`;;
> +	This algorithm extends the patience algorithm to "support
> +	low-occurrence common elements".
> +--
> ++
> +For instance, if you configured diff.algorithm variable to a
> +non-default value and want to use the default one, then you
> +have to use `--diff-algorithm=myers` option.
> +
> +You should prefer this option over the `--minimal`, `--patience` and
> +`--histogram` which are kept just for backwards compatibility.

Much better; I'd drop the last paragraph, though.

I also think we really should consider "default" synonym for
whichever happens to be the built-in default (currently myers).

> diff --git a/diff.c b/diff.c
> index e9a7e4d..3e021d5 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -144,7 +144,7 @@ static int git_config_rename(const char *var, const char *value)
>  	return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
>  }
>  
> -static long parse_algorithm_value(const char *value)
> +long parse_algorithm_value(const char *value)
>  {
>  	if (!value || !strcasecmp(value, "myers"))
>  		return 0;
> @@ -3633,6 +3633,16 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
>  		options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
>  	else if (!strcmp(arg, "--histogram"))
>  		options->xdl_opts = DIFF_WITH_ALG(options, HISTOGRAM_DIFF);
> +	else if (!prefixcmp(arg, "--diff-algorithm=")) {
> +		long value = parse_algorithm_value(arg+17);
> +		if (value < 0)
> +			return error("option diff-algorithm accepts \"myers\", "
> +				     "\"minimal\", \"patience\" and \"histogram\"");
> +		/* clear out previous settings */
> +		DIFF_XDL_CLR(options, NEED_MINIMAL);
> +		options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
> +		options->xdl_opts |= value;

This makes me wonder if other places that use DIFF_WITH_ALG() also
need to worry about clearing NEED_MINIMAL?

^ permalink raw reply

* [PATCH] am: invoke perl's strftime in C locale
From: Dmitry V. Levin @ 2013-01-14 20:59 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

This fixes "hg" patch format support for locales other than C and en_*,
see https://bugzilla.altlinux.org/show_bug.cgi?id=28248

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 git-am.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-am.sh b/git-am.sh
index c682d34..64b88e4 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -334,7 +334,7 @@ split_patches () {
 			# Since we cannot guarantee that the commit message is in
 			# git-friendly format, we put no Subject: line and just consume
 			# all of the message as the body
-			perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
+			LC_ALL=C perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
 				if ($subject) { print ; }
 				elsif (/^\# User /) { s/\# User/From:/ ; print ; }
 				elsif (/^\# Date /) {

-- 
ldv

^ permalink raw reply related

* [PATCH v2] Make git selectively and conditionally ignore certain stat fields
From: Robin Rosenberg @ 2013-01-14 21:11 UTC (permalink / raw)
  To: git; +Cc: gitster, j.sixt, Robin Rosenberg
In-Reply-To: <50C0475F.1030206@viscovery.net>

Specifically the fields uid, gid, ctime, ino and dev are set to zero
by JGit. Any stat checking by git will then need to check content,
which may be very slow, particularly on Windows. Since mtime and size
is typically enough we should allow the user to tell git to avoid
checking these fields if they are set to zero in the index.

This change introduces a core.ignorezerostat config option where the
user can list the fields to ignore using the names above.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 Documentation/config.txt |  9 +++++++++
 cache.h                  |  8 ++++++++
 config.c                 | 25 +++++++++++++++++++++++++
 environment.c            |  1 +
 read-cache.c             | 24 +++++++++++++++---------
 5 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index d5809e0..7f34c94 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -235,6 +235,15 @@ core.trustctime::
 	crawlers and some backup systems).
 	See linkgit:git-update-index[1]. True by default.
 
+core.ignorezerostat::
+	Affects the interpretation of some fields in the index. If
+	unset has no effect. When set to a comma separated list of fields,
+	each of the fields in the index will be excluded from comparison with
+	working tree if the index value is zero. The following fields
+	are recognzed: `uid', `gid', `ctime', `ino' and `dev'. When ctime is ignored
+	the setting of 'core.trustctime' is overridden by by this config
+	value.
+
 core.quotepath::
 	The commands that output paths (e.g. 'ls-files',
 	'diff'), when not given the `-z` option, will quote
diff --git a/cache.h b/cache.h
index c257953..524e49a 100644
--- a/cache.h
+++ b/cache.h
@@ -536,6 +536,14 @@ extern int delete_ref(const char *, const unsigned char *sha1, int delopt);
 /* Environment bits from configuration mechanism */
 extern int trust_executable_bit;
 extern int trust_ctime;
+extern int check_nonzero_stat;
+#define CHECK_NONZERO_STAT_UID (1<<0)
+#define CHECK_NONZERO_STAT_GID (1<<1)
+#define CHECK_NONZERO_STAT_CTIME (1<<2)
+#define CHECK_NONZERO_STAT_INO (1<<3)
+#define CHECK_NONZERO_STAT_DEV (1<<4)
+#define CHECK_NONZERO_STAT_MASK ((1<<5)-1)
+
 extern int quote_path_fully;
 extern int has_symlinks;
 extern int minimum_abbrev, default_abbrev;
diff --git a/config.c b/config.c
index 7b444b6..79485cd 100644
--- a/config.c
+++ b/config.c
@@ -566,6 +566,31 @@ static int git_default_core_config(const char *var, const char *value)
 		trust_ctime = git_config_bool(var, value);
 		return 0;
 	}
+	if (!strcmp(var, "core.ignorezerostat")) {
+		char *copy, *tok;
+		git_config_string(&copy, "core.ignorezerostat", value);
+		check_nonzero_stat = CHECK_NONZERO_STAT_MASK;
+		tok = strtok(value, ",");
+		while (tok) {
+			if (strcasecmp(tok, "uid") == 0)
+				check_nonzero_stat &= ~CHECK_NONZERO_STAT_UID;
+			else if (strcasecmp(tok, "gid") == 0)
+				check_nonzero_stat &= ~CHECK_NONZERO_STAT_GID;
+			else if (strcasecmp(tok, "ctime") == 0) {
+				check_nonzero_stat &= ~CHECK_NONZERO_STAT_CTIME;
+				trust_ctime = 0;
+			} else if (strcasecmp(tok, "ino") == 0)
+				check_nonzero_stat &= ~CHECK_NONZERO_STAT_INO;
+			else if (strcasecmp(tok, "dev") == 0)
+				check_nonzero_stat &= ~CHECK_NONZERO_STAT_DEV;
+			else
+				die_bad_config(var);
+			tok = strtok(NULL, ",");
+		}
+		if (check_nonzero_stat >= CHECK_NONZERO_STAT_MASK)
+			die_bad_config(var);
+		free(copy);
+	}
 
 	if (!strcmp(var, "core.quotepath")) {
 		quote_path_fully = git_config_bool(var, value);
diff --git a/environment.c b/environment.c
index 85edd7f..e90b52f 100644
--- a/environment.c
+++ b/environment.c
@@ -13,6 +13,7 @@
 
 int trust_executable_bit = 1;
 int trust_ctime = 1;
+int check_nonzero_stat = CHECK_NONZERO_STAT_MASK;
 int has_symlinks = 1;
 int minimum_abbrev = 4, default_abbrev = 7;
 int ignore_case;
diff --git a/read-cache.c b/read-cache.c
index fda78bc..f7fe15d 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -197,8 +197,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
 	}
 	if (ce->ce_mtime.sec != (unsigned int)st->st_mtime)
 		changed |= MTIME_CHANGED;
-	if (trust_ctime && ce->ce_ctime.sec != (unsigned int)st->st_ctime)
-		changed |= CTIME_CHANGED;
+	if ((trust_ctime || ((check_nonzero_stat&CHECK_NONZERO_STAT_CTIME) && ce->ce_ctime.sec)))
+		if (ce->ce_ctime.sec != (unsigned int)st->st_ctime)
+			changed |= CTIME_CHANGED;
 
 #ifdef USE_NSEC
 	if (ce->ce_mtime.nsec != ST_MTIME_NSEC(*st))
@@ -207,11 +208,15 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
 		changed |= CTIME_CHANGED;
 #endif
 
-	if (ce->ce_uid != (unsigned int) st->st_uid ||
-	    ce->ce_gid != (unsigned int) st->st_gid)
-		changed |= OWNER_CHANGED;
-	if (ce->ce_ino != (unsigned int) st->st_ino)
-		changed |= INODE_CHANGED;
+	if ((check_nonzero_stat&CHECK_NONZERO_STAT_UID) || ce->ce_uid)
+		if (ce->ce_uid != (unsigned int) st->st_uid)
+			changed |= OWNER_CHANGED;
+	if ((check_nonzero_stat&CHECK_NONZERO_STAT_GID) || ce->ce_gid)
+		if (ce->ce_gid != (unsigned int) st->st_gid)
+			changed |= OWNER_CHANGED;
+	if ((check_nonzero_stat&CHECK_NONZERO_STAT_INO) || ce->ce_ino)
+		if (ce->ce_ino != (unsigned int) st->st_ino)
+			changed |= INODE_CHANGED;
 
 #ifdef USE_STDEV
 	/*
@@ -219,8 +224,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
 	 * clients will have different views of what "device"
 	 * the filesystem is on
 	 */
-	if (ce->ce_dev != (unsigned int) st->st_dev)
-		changed |= INODE_CHANGED;
+	if ((check_nonzero_stat&CHECK_NONZERO_STAT_DEV) || ce->ce_dev)
+		if (ce->ce_dev != (unsigned int) st->st_dev)
+			changed |= INODE_CHANGED;
 #endif
 
 	if (ce->ce_size != (unsigned int) st->st_size)
-- 
1.8.1.337.g63e8afb.dirty

^ permalink raw reply related

* Re: [PATCH] am: invoke perl's strftime in C locale
From: Junio C Hamano @ 2013-01-14 21:49 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: git
In-Reply-To: <20130114205933.GA25947@altlinux.org>

"Dmitry V. Levin" <ldv@altlinux.org> writes:

> This fixes "hg" patch format support for locales other than C and en_*,
> see https://bugzilla.altlinux.org/show_bug.cgi?id=28248
>
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---

Thanks.

The reference URL is not very friendly, and you should be able to
state it here on a single line in English instead, I think.

The patch looks correct, though.

>  git-am.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-am.sh b/git-am.sh
> index c682d34..64b88e4 100755
> --- a/git-am.sh
> +++ b/git-am.sh
> @@ -334,7 +334,7 @@ split_patches () {
>  			# Since we cannot guarantee that the commit message is in
>  			# git-friendly format, we put no Subject: line and just consume
>  			# all of the message as the body
> -			perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
> +			LC_ALL=C perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
>  				if ($subject) { print ; }
>  				elsif (/^\# User /) { s/\# User/From:/ ; print ; }
>  				elsif (/^\# Date /) {

^ permalink raw reply

* Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields
From: Junio C Hamano @ 2013-01-14 21:57 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git, j.sixt
In-Reply-To: <1358197878-36736-1-git-send-email-robin.rosenberg@dewire.com>

Robin Rosenberg <robin.rosenberg@dewire.com> writes:

> diff --git a/read-cache.c b/read-cache.c
> index fda78bc..f7fe15d 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -197,8 +197,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
>  	}
>  	if (ce->ce_mtime.sec != (unsigned int)st->st_mtime)
>  		changed |= MTIME_CHANGED;
> -	if (trust_ctime && ce->ce_ctime.sec != (unsigned int)st->st_ctime)
> -		changed |= CTIME_CHANGED;
> +	if ((trust_ctime || ((check_nonzero_stat&CHECK_NONZERO_STAT_CTIME) && ce->ce_ctime.sec)))

One SP is required on each side of a binary operator; please have
one after check_nonzero_stat and after the & after it.

I wonder if we should lose the trust_ctime variable and use this
check_nonzero_stat bitset exclusively, provided that this were a
good direction to go?

^ permalink raw reply

* Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields
From: Junio C Hamano @ 2013-01-14 22:08 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git, j.sixt
In-Reply-To: <1358197878-36736-1-git-send-email-robin.rosenberg@dewire.com>

Robin Rosenberg <robin.rosenberg@dewire.com> writes:

> @@ -566,6 +566,31 @@ static int git_default_core_config(const char *var, const char *value)
>  		trust_ctime = git_config_bool(var, value);
>  		return 0;
>  	}
> +	if (!strcmp(var, "core.ignorezerostat")) {
> +		char *copy, *tok;
> +		git_config_string(&copy, "core.ignorezerostat", value);
> +		check_nonzero_stat = CHECK_NONZERO_STAT_MASK;
> +		tok = strtok(value, ",");
> +		while (tok) {
> +			if (strcasecmp(tok, "uid") == 0)
> +				check_nonzero_stat &= ~CHECK_NONZERO_STAT_UID;
> +			else if (strcasecmp(tok, "gid") == 0)
> +				check_nonzero_stat &= ~CHECK_NONZERO_STAT_GID;
> +			else if (strcasecmp(tok, "ctime") == 0) {
> +				check_nonzero_stat &= ~CHECK_NONZERO_STAT_CTIME;
> +				trust_ctime = 0;
> +			} else if (strcasecmp(tok, "ino") == 0)
> +				check_nonzero_stat &= ~CHECK_NONZERO_STAT_INO;
> +			else if (strcasecmp(tok, "dev") == 0)
> +				check_nonzero_stat &= ~CHECK_NONZERO_STAT_DEV;
> +			else
> +				die_bad_config(var);
> +			tok = strtok(NULL, ",");
> +		}
> +		if (check_nonzero_stat >= CHECK_NONZERO_STAT_MASK)
> +			die_bad_config(var);
> +		free(copy);
> +	}

Also I am getting these:

config.c: In function 'git_default_core_config':
config.c:571: error: passing argument 1 of 'git_config_string' from incompatible pointer type
config.c:540: note: expected 'const char **' but argument is of type 'char **'
config.c:573: error: passing argument 1 of 'strtok' discards qualifiers from pointer target type

^ permalink raw reply

* What's cooking in git.git (Jan 2013, #06; Mon, 14)
From: Junio C Hamano @ 2013-01-14 22:23 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.

As usual, this cycle is expected to last for 8 to 10 weeks, with a
preview -rc0 sometime in the middle of next month.

You can find the changes described here in the integration branches of the
repositories listed at

    http://git-blame.blogspot.com/p/git-public-repositories.html

--------------------------------------------------
[New Topics]

* jc/cvsimport-upgrade (2013-01-14) 8 commits
 - t9600: adjust for new cvsimport
 - t9600: further prepare for sharing
 - cvsimport-3: add a sample test
 - cvsimport: make tests reusable for cvsimport-3
 - cvsimport: start adding cvsps 3.x support
 - cvsimport: introduce a version-switch wrapper
 - cvsimport: allow setting a custom cvsps (2.x) program name
 - Makefile: add description on PERL/PYTHON_PATH

 The most important part of this series is the addition of the new
 cvsimport by Eric Raymond that works with cvsps 3.x.  Given some
 distros have inertia to be conservative, Git with cvsimport that
 does not work with both 3.x will block adoption of cvsps 3.x by
 them, and shipping Git with cvsimport that does not work with cvsps
 2.x will block such a version of Git, so we'll do the proven "both
 old and new are available, but we aim to deprecate and remove the
 old one in due time" strategy that we used successfully in the
 past.


* as/pre-push-hook (2013-01-14) 3 commits
 - Add sample pre-push hook script
 - push: Add support for pre-push hooks
 - hooks: Add function to check if a hook exists

 Add an extra hook so that "git push" that is run without making
 sure what is being pushed is sane can be checked and rejected (as
 opposed to the user deciding not pushing).


* dl/am-hg-locale (2013-01-14) 1 commit
 - am: invoke perl's strftime in C locale

 Datestamp recorded in "Hg" format patch was reformatted incorrectly
 to an e-mail looking date using locale dependant strftime, causing
 patch application to fail.


* jk/config-parsing-cleanup (2013-01-14) 7 commits
 - [DONTMERGE] reroll coming
 - submodule: simplify memory handling in config parsing
 - submodule: use match_config_key when parsing config
 - userdiff: drop parse_driver function
 - convert some config callbacks to match_config_key
 - archive-tar: use match_config_key when parsing config
 - config: add helper function for parsing key names

 Expecting a reroll.

* mp/diff-algo-config (2013-01-14) 3 commits
 - diff: Introduce --diff-algorithm command line option
 - config: Introduce diff.algorithm variable
 - git-completion.bash: Autocomplete --minimal and --histogram for git-diff

 Add diff.algorithm configuration so that the user does not type
 "diff --histogram".

 Expecting a reroll.

* ph/rebase-preserve-all-merges (2013-01-14) 1 commit
 - rebase --preserve-merges: keep all merge commits including empty ones

 An earlier change to add --keep-empty option broke "git rebase
 --preserve-merges" and lost merge commits that end up being the
 same as its parent.

 Will merge to 'next'.

* rs/archive-tar-config-parsing-fix (2013-01-14) 1 commit
 - archive-tar: fix sanity check in config parsing

 Configuration parsing for tar.* configuration variables were
 broken; Peff's config parsing clean-up topic will address the same
 breakage, so this may be superseded by that other topic.


* rs/pretty-use-prefixcmp (2013-01-14) 1 commit
 - pretty: use prefixcmp instead of memcmp on NUL-terminated strings

 Will merge to 'next'.

--------------------------------------------------
[Graduated to "master"]

* ap/status-ignored-in-ignored-directory (2013-01-07) 3 commits
  (merged to 'next' on 2013-01-10 at 20f7476)
 + status: always report ignored tracked directories
  (merged to 'next' on 2013-01-07 at 2a20b19)
 + git-status: Test --ignored behavior
 + dir.c: Make git-status --ignored more consistent

 Output from "git status --ignored" showed an unexpected interaction
 with "--untracked".


* fc/remote-testgit-feature-done (2012-10-29) 1 commit
  (merged to 'next' on 2013-01-10 at 3132a60)
 + remote-testgit: properly check for errors

 In the longer term, tightening rules is a good thing to do, and
 because nobody who has worked in the remote helper area seems to be
 interested in reviewing this, I would assume they do not think
 such a retroactive tightening will affect their remote helpers.  So
 let's advance this topic to see what happens.


* jc/blame-no-follow (2012-09-21) 2 commits
  (merged to 'next' on 2013-01-10 at 201c7f4)
 + blame: pay attention to --no-follow
 + diff: accept --no-follow option

 Teaches "--no-follow" option to "git blame" to disable its
 whole-file rename detection.


* jc/format-patch-reroll (2013-01-03) 9 commits
  (merged to 'next' on 2013-01-07 at 0e007e6)
 + format-patch: give --reroll-count a short synonym -v
 + format-patch: document and test --reroll-count
 + format-patch: add --reroll-count=$N option
 + get_patch_filename(): split into two functions
 + get_patch_filename(): drop "just-numbers" hack
 + get_patch_filename(): simplify function signature
 + builtin/log.c: stop using global patch_suffix
 + builtin/log.c: drop redundant "numbered_files" parameter from make_cover_letter()
 + builtin/log.c: drop unused "numbered" parameter from make_cover_letter()

 Originally merged to 'next' on 2013-01-04

 Teach "format-patch" to prefix v4- to its output files for the
 fourth iteration of a patch series, to make it easier for the
 submitter to keep separate copies for iterations.


* jc/merge-blobs (2012-12-26) 5 commits
  (merged to 'next' on 2013-01-08 at 582ca38)
 + merge-tree: fix d/f conflicts
 + merge-tree: add comments to clarify what these functions are doing
 + merge-tree: lose unused "resolve_directories"
 + merge-tree: lose unused "flags" from merge_list
 + Which merge_file() function do you mean?

 Update the disused merge-tree proof-of-concept code.


* jk/maint-fast-import-doc-reorder (2013-01-09) 2 commits
  (merged to 'next' on 2013-01-10 at 9f3950d)
 + git-fast-import(1): reorganise options
 + git-fast-import(1): combine documentation of --[no-]relative-marks


* jk/shortlog-no-wrap-doc (2013-01-09) 1 commit
  (merged to 'next' on 2013-01-10 at c79898a)
 + git-shortlog(1): document behaviour of zero-width wrap


* jk/unify-exit-code-by-receiving-signal (2013-01-06) 1 commit
  (merged to 'next' on 2013-01-08 at 5ebf940)
 + run-command: encode signal death as a positive integer

 The internal logic had to deal with two representations of a death
 of a child process by a signal.


* jn/xml-depends-on-asciidoc-conf (2013-01-06) 1 commit
  (merged to 'next' on 2013-01-08 at 4faf8d4)
 + docs: manpage XML depends on asciidoc.conf


* nd/upload-pack-shallow-must-be-commit (2013-01-08) 1 commit
  (merged to 'next' on 2013-01-10 at a8b3ba5)
 + upload-pack: only accept commits from "shallow" line

 A minor consistency check patch that does not have much relevance
 to the real world.


* nz/send-email-headers-are-case-insensitive (2013-01-06) 1 commit
  (merged to 'next' on 2013-01-10 at cf4c9c9)
 + git-send-email: treat field names as case-insensitively

 When user spells "cc:" in lowercase in the fake "header" in the
 trailer part, send-email failed to pick up the addresses from
 there. As e-mail headers field names are case insensitive, this
 script should follow suit and treat "cc:" and "Cc:" the same way.


* rs/zip-tests (2013-01-07) 4 commits
  (merged to 'next' on 2013-01-08 at 8e37423)
 + t5003: check if unzip supports symlinks
 + t5000, t5003: move ZIP tests into their own script
 + t0024, t5000: use test_lazy_prereq for UNZIP
 + t0024, t5000: clear variable UNZIP, use GIT_UNZIP instead

 Updates zip tests to skip some that cannot be handled on platform
 unzip.


* rs/zip-with-uncompressed-size-in-the-header (2013-01-06) 1 commit
  (merged to 'next' on 2013-01-08 at d9ec30e)
 + archive-zip: write uncompressed size into header even with streaming

 Improve compatibility of our zip output to fill uncompressed size
 in the header, which we can do without seeking back (even though it
 should not be necessary).

--------------------------------------------------
[Stalled]

* mp/complete-paths (2013-01-11) 1 commit
 - git-completion.bash: add support for path completion

 The completion script used to let the default completer to suggest
 pathnames, which gave too many irrelevant choices (e.g. "git add"
 would not want to add an unmodified path).  Teach it to use a more
 git-aware logic to enumerate only relevant ones.

 Waiting for area-experts' help and review.


* jl/submodule-deinit (2012-12-04) 1 commit
 - submodule: add 'deinit' command

 There was no Porcelain way to say "I no longer am interested in
 this submodule", once you express your interest in a submodule with
 "submodule init".  "submodule deinit" is the way to do so.

 Expecting a reroll.
 $gmane/212884


* jk/lua-hackery (2012-10-07) 6 commits
 - pretty: fix up one-off format_commit_message calls
 - Minimum compilation fixup
 - Makefile: make "lua" a bit more configurable
 - add a "lua" pretty format
 - add basic lua infrastructure
 - pretty: make some commit-parsing helpers more public

 Interesting exercise. When we do this for real, we probably would want
 to wrap a commit to make it more like an "object" with methods like
 "parents", etc.


* rc/maint-complete-git-p4 (2012-09-24) 1 commit
 - Teach git-completion about git p4

 Comment from Pete will need to be addressed ($gmane/206172).


* jc/maint-name-rev (2012-09-17) 7 commits
 - describe --contains: use "name-rev --algorithm=weight"
 - name-rev --algorithm=weight: tests and documentation
 - name-rev --algorithm=weight: cache the computed weight in notes
 - name-rev --algorithm=weight: trivial optimization
 - name-rev: --algorithm option
 - name_rev: clarify the logic to assign a new tip-name to a commit
 - name-rev: lose unnecessary typedef

 "git name-rev" names the given revision based on a ref that can be
 reached in the smallest number of steps from the rev, but that is
 not useful when the caller wants to know which tag is the oldest one
 that contains the rev.  This teaches a new mode to the command that
 uses the oldest ref among those which contain the rev.

 I am not sure if this is worth it; for one thing, even with the help
 from notes-cache, it seems to make the "describe --contains" even
 slower. Also the command will be unusably slow for a user who does
 not have a write access (hence unable to create or update the
 notes-cache).

 Stalled mostly due to lack of responses.


* jc/xprm-generation (2012-09-14) 1 commit
 - test-generation: compute generation numbers and clock skews

 A toy to analyze how bad the clock skews are in histories of real
 world projects.

 Stalled mostly due to lack of responses.


* jc/add-delete-default (2012-08-13) 1 commit
 - git add: notice removal of tracked paths by default

 "git add dir/" updated modified files and added new files, but does
 not notice removed files, which may be "Huh?" to some users.  They
 can of course use "git add -A dir/", but why should they?

 Resurrected from graveyard, as I thought it was a worthwhile thing
 to do in the longer term.

 Stalled mostly due to lack of responses.


* mb/remote-default-nn-origin (2012-07-11) 6 commits
 - Teach get_default_remote to respect remote.default.
 - Test that plain "git fetch" uses remote.default when on a detached HEAD.
 - Teach clone to set remote.default.
 - Teach "git remote" about remote.default.
 - Teach remote.c about the remote.default configuration setting.
 - Rename remote.c's default_remote_name static variables.

 When the user does not specify what remote to interact with, we
 often attempt to use 'origin'.  This can now be customized via a
 configuration variable.

 Expecting a reroll.
 $gmane/210151

 "The first remote becomes the default" bit is better done as a
 separate step.

--------------------------------------------------
[Cooking]

* rt/commit-cleanup-config (2013-01-10) 1 commit
 - commit: make default of "cleanup" option configurable

 Add a configuration variable to set default clean-up mode other
 than "strip".

 Will merge to 'next'.


* jc/custom-comment-char (2013-01-10) 1 commit
 - Allow custom "comment char"

 An illustration to show codepaths that need to be touched to change
 the hint lines in the edited text to begin with something other
 than '#'.


* jn/maint-trim-vim-contrib (2013-01-10) 1 commit
 - contrib/vim: simplify instructions for old vim support

 Will merge to 'next'.


* mz/reset-misc (2013-01-10) 22 commits
 - reset [--mixed]: use diff-based reset whether or not pathspec was given
 - [SQUASH???] script portability fixes
 - reset: allow reset on unborn branch
 - reset $sha1 $pathspec: require $sha1 only to be treeish
 - reset [--mixed] --quiet: don't refresh index
 - reset.c: finish entire cmd_reset() whether or not pathspec is given
 - reset [--mixed]: don't write index file twice
 - reset.c: move lock, write and commit out of update_index_refresh()
 - reset.c: move update_index_refresh() call out of read_from_tree()
 - reset: avoid redundant error message
 - reset --keep: only write index file once
 - reset.c: replace switch by if-else
 - reset.c: share call to die_if_unmerged_cache()
 - [SQUASH???] style fixes
 - reset.c: extract function for updating {ORIG,}HEAD
 - reset.c: remove unnecessary variable 'i'
 - [SQUASH???] style fix
 - reset.c: extract function for parsing arguments
 - reset: don't allow "git reset -- $pathspec" in bare repo
 - reset.c: pass pathspec around instead of (prefix, argv) pair
 - reset $pathspec: exit with code 0 if successful
 - reset $pathspec: no need to discard index

 Various 'reset' optimizations and clean-ups, followed by a change
 to allow "git reset" to work even on an unborn branch.


* pe/doc-email-env-is-trumped-by-config (2013-01-10) 1 commit
  (merged to 'next' on 2013-01-14 at 6b4d555)
 + git-commit-tree(1): correct description of defaults

 In the precedence order, the environment variable $EMAIL comes
 between the built-in default (i.e. taking value by asking the
 system's gethostname() etc.) and the user.email configuration
 variable; the documentation implied that it is stronger than the
 configuration like $GIT_COMMITTER_EMAIL is, which is wrong.


* ds/completion-silence-in-tree-path-probe (2013-01-11) 1 commit
 - git-completion.bash: silence "not a valid object" errors

 An internal ls-tree call made by completion code only to probe if
 a path exists in the tree recorded in a commit object leaked error
 messages when the path is not there.  It is not an error at all and
 should not be shown to the end user.

 Will merge to 'next'.


* nd/fetch-depth-is-broken (2013-01-11) 3 commits
 - fetch: elaborate --depth action
 - upload-pack: fix off-by-one depth calculation in shallow clone
 - fetch: add --unshallow for turning shallow repo into complete one

 "git fetch --depth" was broken in at least three ways.  The
 resulting history was deeper than specified by one commit, it was
 unclear how to wipe the shallowness of the repository with the
 command, and documentation was misleading.

 Will merge to 'next'.


* jc/no-git-config-in-clone (2013-01-11) 1 commit
 - clone: do not export and unexport GIT_CONFIG

 We stopped paying attention to $GIT_CONFIG environment that points
 at a single configuration file from any command other than "git config"
 quite a while ago, but "git clone" internally set, exported, and
 then unexported the variable during its operation unnecessarily.


* mk/complete-tcsh (2013-01-07) 1 commit
  (merged to 'next' on 2013-01-11 at b8b30b1)
 + Prevent space after directories in tcsh completion

 Update tcsh command line completion so that an unwanted space is
 not added to a single directory name.


* dg/subtree-fixes (2013-01-08) 7 commits
 - contrib/subtree: mkdir the manual directory if needed
 - contrib/subtree: honor $(DESTDIR)
 - contrib/subtree: fix synopsis and command help
 - contrib/subtree: better error handling for "add"
 - contrib/subtree: add --unannotate option
 - contrib/subtree: use %B for split Subject/Body
 - t7900: remove test number comments

 contrib/subtree updates.

 Rerolled?


* ap/log-mailmap (2013-01-10) 11 commits
  (merged to 'next' on 2013-01-10 at 8544084)
 + log --use-mailmap: optimize for cases without --author/--committer search
 + log: add log.mailmap configuration option
 + log: grep author/committer using mailmap
 + test: add test for --use-mailmap option
 + log: add --use-mailmap option
 + pretty: use mailmap to display username and email
 + mailmap: add mailmap structure to rev_info and pp
 + mailmap: simplify map_user() interface
 + mailmap: remove email copy and length limitation
 + Use split_ident_line to parse author and committer
 + string-list: allow case-insensitive string list

 Teach commands in the "log" family to optionally pay attention to
 the mailmap.


* jc/push-2.0-default-to-simple (2013-01-08) 11 commits
  (merged to 'next' on 2013-01-09 at 74c3498)
 + doc: push.default is no longer "matching"
 + push: switch default from "matching" to "simple"
 + t9401: do not assume the "matching" push is the default
 + t9400: do not assume the "matching" push is the default
 + t7406: do not assume the "matching" push is the default
 + t5531: do not assume the "matching" push is the default
 + t5519: do not assume the "matching" push is the default
 + t5517: do not assume the "matching" push is the default
 + t5516: do not assume the "matching" push is the default
 + t5505: do not assume the "matching" push is the default
 + t5404: do not assume the "matching" push is the default

 Will cook in 'next' until Git 2.0 ;-).


* nd/clone-no-separate-git-dir-with-bare (2013-01-10) 1 commit
 - clone: forbid --bare --separate-git-dir <dir>

 Will merge to 'next'.


* nd/parse-pathspec (2013-01-11) 20 commits
 . Convert more init_pathspec() to parse_pathspec()
 . Convert add_files_to_cache to take struct pathspec
 . Convert {read,fill}_directory to take struct pathspec
 . Convert refresh_index to take struct pathspec
 . Convert report_path_error to take struct pathspec
 . checkout: convert read_tree_some to take struct pathspec
 . Convert unmerge_cache to take struct pathspec
 . Convert read_cache_preload() to take struct pathspec
 . add: convert to use parse_pathspec
 . archive: convert to use parse_pathspec
 . ls-files: convert to use parse_pathspec
 . rm: convert to use parse_pathspec
 . checkout: convert to use parse_pathspec
 . rerere: convert to use parse_pathspec
 . status: convert to use parse_pathspec
 . commit: convert to use parse_pathspec
 . clean: convert to use parse_pathspec
 . Export parse_pathspec() and convert some get_pathspec() calls
 . Add parse_pathspec() that converts cmdline args to struct pathspec
 . pathspec: save the non-wildcard length part

 Uses the parsed pathspec structure in more places where we used to
 use the raw "array of strings" pathspec.

 Ejected from 'pu' for now; will take a look at the rerolled one
 later ($gmane/213340).


* jc/doc-maintainer (2013-01-03) 2 commits
  (merged to 'next' on 2013-01-11 at f35d582)
 + howto/maintain: mark titles for asciidoc
 + Documentation: update "howto maintain git"

 Describe tools for automation that were invented since this
 document was originally written.


* mo/cvs-server-updates (2012-12-09) 18 commits
  (merged to 'next' on 2013-01-08 at 75e2d11)
 + t9402: Use TABs for indentation
 + t9402: Rename check.cvsCount and check.list
 + t9402: Simplify git ls-tree
 + t9402: Add missing &&; Code style
 + t9402: No space after IO-redirection
 + t9402: Dont use test_must_fail cvs
 + t9402: improve check_end_tree() and check_end_full_tree()
 + t9402: sed -i is not portable
 + cvsserver Documentation: new cvs ... -r support
 + cvsserver: add t9402 to test branch and tag refs
 + cvsserver: support -r and sticky tags for most operations
 + cvsserver: Add version awareness to argsfromdir
 + cvsserver: generalize getmeta() to recognize commit refs
 + cvsserver: implement req_Sticky and related utilities
 + cvsserver: add misc commit lookup, file meta data, and file listing functions
 + cvsserver: define a tag name character escape mechanism
 + cvsserver: cleanup extra slashes in filename arguments
 + cvsserver: factor out git-log parsing logic

 Various git-cvsserver updates.

 Will cook in 'next' for a while to see if anybody screams.


* as/check-ignore (2013-01-10) 12 commits
  (merged to 'next' on 2013-01-14 at 9df2afc)
 + t0008: avoid brace expansion
 + add git-check-ignore sub-command
 + setup.c: document get_pathspec()
 + add.c: extract new die_if_path_beyond_symlink() for reuse
 + add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse
 + pathspec.c: rename newly public functions for clarity
 + add.c: move pathspec matchers into new pathspec.c for reuse
 + add.c: remove unused argument from validate_pathspec()
 + dir.c: improve docs for match_pathspec() and match_pathspec_depth()
 + dir.c: provide clear_directory() for reclaiming dir_struct memory
 + dir.c: keep track of where patterns came from
 + dir.c: use a single struct exclude_list per source of excludes

 Add a new command "git check-ignore" for debugging .gitignore
 files.


* nd/retire-fnmatch (2013-01-01) 7 commits
  (merged to 'next' on 2013-01-07 at ab31f9b)
 + Makefile: add USE_WILDMATCH to use wildmatch as fnmatch
 + wildmatch: advance faster in <asterisk> + <literal> patterns
 + wildmatch: make a special case for "*/" with FNM_PATHNAME
 + test-wildmatch: add "perf" command to compare wildmatch and fnmatch
 + wildmatch: support "no FNM_PATHNAME" mode
 + wildmatch: make dowild() take arbitrary flags
 + wildmatch: rename constants and update prototype

 Originally merged to 'next' on 2013-01-04

 Replace our use of fnmatch(3) with a more feature-rich wildmatch.
 A handful patches at the bottom have been moved to nd/wildmatch to
 graduate as part of that branch, before this series solidifies.

 Will cook in 'next' a bit longer than other topics.


* mb/gitweb-highlight-link-target (2012-12-20) 1 commit
 - Highlight the link target line in Gitweb using CSS

 Expecting a reroll.
 $gmane/211935


* zk/clean-report-failure (2013-01-14) 1 commit
 - git-clean: Display more accurate delete messages

 "git clean" states what it is going to remove and then goes on to
 remove it, but sometimes it only discovers things that cannot be
 removed after recursing into a directory, which makes the output
 confusing and even wrong.

 Will merge to 'next'.


* bc/append-signed-off-by (2013-01-01) 12 commits
 - t4014: do not use echo -n
 - Unify appending signoff in format-patch, commit and sequencer
 - format-patch: update append_signoff prototype
 - format-patch: stricter S-o-b detection
 - t4014: more tests about appending s-o-b lines
 - sequencer.c: teach append_signoff to avoid adding a duplicate newline
 - sequencer.c: teach append_signoff how to detect duplicate s-o-b
 - sequencer.c: always separate "(cherry picked from" from commit body
 - sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer
 - t/t3511: add some tests of 'cherry-pick -s' functionality
 - t/test-lib-functions.sh: allow to specify the tag name to test_commit
 - sequencer.c: remove broken support for rfc2822 continuation in footer

 Expecting a reroll.
 $gmane/212507

* er/replace-cvsimport (2013-01-12) 7 commits
 . t/lib-cvs: cvsimport no longer works without Python >= 2.7
 . t9605: test for cvsps commit ordering bug
 . t9604: fixup for new cvsimport
 . t9600: fixup for new cvsimport
 . t/lib-cvs.sh: allow cvsps version 3.x.
 . t/t960[123]: remove leftover scripts
 . cvsimport: rewrite to use cvsps 3.x to fix major bugs

 Rerolled as jc/cvsimport-upgrade and ejected from 'pu'.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox