Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Junio C Hamano
Lukas Fleischer g...@cryptocrack.de writes: The helper functions prepare_final() and prepare_initial() return a pointer to a string that is a member of an object in the revs-pending array. This array is later rebuilt when running prepare_revision_walk() which potentially transforms the

Re: [PATCH v2 1/2] Documentation/githooks: mention pwd, $GIT_PREFIX

2015-01-12 Thread Junio C Hamano
Richard Hansen rhan...@bbn.com writes: Document that hooks are run from the top-level directory and that GIT_PREFIX is set to the name of the original subdirectory (relative to the top-level directory). Signed-off-by: Richard Hansen rhan...@bbn.com --- Documentation/githooks.txt | 6

Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Jeff King
On Mon, Jan 12, 2015 at 11:08:26AM -0800, Junio C Hamano wrote: Lukas Fleischer g...@cryptocrack.de writes: The helper functions prepare_final() and prepare_initial() return a pointer to a string that is a member of an object in the revs-pending array. This array is later rebuilt when

Re: [PATCH] git-log: added --none-match option

2015-01-12 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Christoph Junghans ott...@gentoo.org writes: The only useful thing I could image is using it in conjunction with --files-with-matches, but that is what --files-without-match is for. Yes, -l was exactly what I had in mind and I was hoping that git

[no subject]

2015-01-12 Thread امير الاحزان
-- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: profile-fast is failing in my Git 2.2.1 build from tar in a Git repo

2015-01-12 Thread Jeff King
On Mon, Jan 12, 2015 at 04:08:28PM -0500, Jeff King wrote: I do not think profile build is prepared to be run without having our history (after all, it is not test_perf_create_REPO_from, not test_perf_create_source_directory_of_git_from). It wants to create a repository that hosts a

Re: [PATCH] cat-file: remove definition of already defined variables

2015-01-12 Thread Junio C Hamano
Alexander Kuleshov kuleshovm...@gmail.com writes: 'enum object_type type' and 'unsigned long size' are already defined at the top of cat_one_file routine True. That description applies to two completely different situations, though, and does not help judging if the change is correct.

Re: profile-fast is failing in my Git 2.2.1 build from tar in a Git repo

2015-01-12 Thread Jeff King
On Tue, Jan 06, 2015 at 03:13:30PM -0800, Junio C Hamano wrote: The problem is in the t/perf/perf-lib.sh:test_perf_create_repo_from() function, where we see this: repo=$1 source=$2 source_git=$source/$(cd $source git rev-parse --git-dir) The function is invoked as:

Re: [PATCHv12 08/10] send-pack.c: add --atomic command line argument

2015-01-12 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: +static int atomic_push_failure(struct send_pack_args *args, +struct ref *remote_refs, +struct ref *failing_ref) +{ + struct ref *ref; + /* Mark other refs as failed */ + for (ref =

Re: [PATCH v2 2/2] t1020-subdirectory.sh: check hook pwd, $GIT_PREFIX

2015-01-12 Thread Junio C Hamano
Richard Hansen rhan...@bbn.com writes: Make sure hooks are executed at the top-level directory and that GIT_PREFIX is set (as documented). The same comment as the one for 1/2 applies here. If we substitute 'hook' everywhere with 'post-checkout hook' in this patch, it makes perfect sense to

Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Lukas Fleischer g...@cryptocrack.de writes: The helper functions prepare_final() and prepare_initial() return a pointer to a string that is a member of an object in the revs-pending array. This array is later rebuilt when running

Re: [PATCHv12 06/10] receive-pack.c: negotiate atomic push support

2015-01-12 Thread Stefan Beller
On Mon, Jan 12, 2015 at 3:29 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Is this needed only to support the tests you add in t5543, or do you intend it to be useful to end users? If it is for end users, then it deserves to be documented. Is also deserves proper mention and justification

[PATCH 1/5] git-compat-util: add xstrdup_or_null helper

2015-01-12 Thread Jeff King
It's a common idiom to duplicate a string if it is non-NULL, or pass a literal NULL through. This is already a one-liner in C, but you do have to repeat the name of the string twice. So if there's a function call, you must write: const char *x = some_fun(...); return x ? xstrdup(x) : NULL;

[PATCH 4/5] use xstrdup_or_null to replace ternary conditionals

2015-01-12 Thread Jeff King
This replaces x ? xstrdup(x) : NULL with xstrdup_or_null(x). The change is fairly mechanical, with the exception of resolve_refdup, which can eliminate a temporary variable. There are still a few hits grepping for ?.*xstrdup, but these are of slightly different forms and cannot be converted

[PATCH 2/5] builtin/apply.c: use xstrdup_or_null instead of null_strdup

2015-01-12 Thread Jeff King
This file had its own identical helper that predates xstrdup_or_null. Let's use the global one to avoid repetition. Signed-off-by: Jeff King p...@peff.net --- You'll note that every one of these could just be a ?:-conditional (there are no function calls). builtin/apply.c | 15 +--

[PATCH 3/5] builtin/commit.c: use xstrdup_or_null instead of envdup

2015-01-12 Thread Jeff King
The only reason for envdup to be its own function is that we have to save the result in a temporary string. With xstrdup_or_null, we can feed the result of getenv() directly. Signed-off-by: Jeff King p...@peff.net --- These ones need the temporary. Is the result more readable, or less?

Re: [PATCHv12 06/10] receive-pack.c: negotiate atomic push support

2015-01-12 Thread Eric Sunshine
On Wed, Jan 7, 2015 at 10:23 PM, Stefan Beller sbel...@google.com wrote: From: Ronnie Sahlberg sahlb...@google.com This adds the atomic protocol option to allow receive-pack to inform the client that it has atomic push capability. Signed-off-by: Stefan Beller sbel...@google.com ---

Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Jeff King
On Mon, Jan 12, 2015 at 04:11:06PM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: As an aside, I have often been tempted to have xstrdup silently propagate a NULL. It would have been the right thing to do here, but maybe there are cases where the segfault is preferable for

Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Jeff King
On Mon, Jan 12, 2015 at 02:55:30PM -0800, Junio C Hamano wrote: With the patch applied on top of 1da1e07c (or the result merged to 'next' for that matter), I see test breakages in many places git blame is used, e.g. t7010. Did you run the test suite? This is because it is perfectly normal

[ANNOUNCE] Git v2.2.2

2015-01-12 Thread Junio C Hamano
The latest maintenance release Git v2.2.2 is now available at the usual places. This backports many fixes that were not in 2.2.1 that have been used on 'master' for the past few weeks. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories

Re: [PATCH v2] git-gui: fix problem with gui.maxfilesdisplayed

2015-01-12 Thread Pat Thoyts
Csaba Kiraly kir...@disi.unitn.it writes: gui.maxfilesdisplayed (added in dd6451f9c7c5a36d3006231b618ac6da06c7c7b4) was applied brute force on the file list in alphabetic order. As a result, files that had modifications might not be displayed by git-gui. Even worse, files that are already in the

Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Lukas Fleischer
On Mon, 12 Jan 2015 at 23:55:30, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Lukas Fleischer g...@cryptocrack.de writes: The helper functions prepare_final() and prepare_initial() return a pointer to a string that is a member of an object in the revs-pending array.

What's cooking in git.git (Jan 2015, #02; Mon, 12)

2015-01-12 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The preview release candidate 2.3-rc0 has been tagged. With the slowness from the end-of-year holiday, this cycle turns out to be a relatively

[ANNOUNCE] Git v2.3.0-rc0

2015-01-12 Thread Junio C Hamano
An early preview release Git v2.3.0-rc0 is now available for testing at the usual places. With the slowness from the end-of-year holiday, this cycle turned out to be a relatively lean one as I predicted (just 200 changes since 2.2, as opposed to ~500 changes in an normal cycle), but that is fine.

Re: [PATCH 1/5] git-compat-util: add xstrdup_or_null helper

2015-01-12 Thread Jeff King
On Mon, Jan 12, 2015 at 06:21:19PM -0800, Jonathan Nieder wrote: Jeff King wrote: --- a/git-compat-util.h +++ b/git-compat-util.h @@ -675,6 +675,11 @@ extern char *xgetcwd(void); #define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x))) +static inline char

Re: [PATCH] git-gui.sh: support Tcl 8.4

2015-01-12 Thread Pat Thoyts
Jens Lehmann jens.lehm...@web.de writes: Am 07.01.2015 um 01:02 schrieb Junio C Hamano: ^Kyle J. McKay mack...@gmail.com writes: I can't find anything in that thread about why vsatisfies was preferred over vcompare other than the obvious that the vsatisfies version is only a 1-character

[PATCH 5/5] blame.c: fix garbled error message

2015-01-12 Thread Jeff King
From: Lukas Fleischer g...@cryptocrack.de The helper functions prepare_final() and prepare_initial() return a pointer to a string that is a member of an object in the revs-pending array. This array is later rebuilt when running prepare_revision_walk() which potentially transforms the pointer

Re: [PATCH 1/5] git-compat-util: add xstrdup_or_null helper

2015-01-12 Thread Jonathan Nieder
Jeff King wrote: --- a/git-compat-util.h +++ b/git-compat-util.h @@ -675,6 +675,11 @@ extern char *xgetcwd(void); #define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x))) +static inline char *xstrdup_or_null(const char *str) +{ + return str ? xstrdup(str) :

[PATCH] http-push: trim trailing newline from remote symref

2015-01-12 Thread Jeff King
When we fetch a symbolic ref file from the remote, we get the whole string ref: refs/heads/master\n, recognize it by skipping past the ref: , and store the rest. We should chomp the trailing newline. This bug was introduced in ae021d8 (use skip_prefix to avoid magic numbers, 2014-06-18), which

Re: [PATCH] blame.c: fix garbled error message

2015-01-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: As an aside, I have often been tempted to have xstrdup silently propagate a NULL. It would have been the right thing to do here, but maybe there are cases where the segfault is preferable for catching a mistake early (otherwise you might store the NULL and then

[PATCH v2] log: teach --invert-grep option

2015-01-12 Thread Christoph Junghans
git log --grep=string shows only commits with messages that match the given string, but sometimes it is useful to be able to show only commits that do *not* have certain messages (e.g. show me ones that are not FIXUP commits). Originally, we had the invert-grep flag in grep_opt, but because git

Re: [PATCH] show-branch --upstream: add upstream branches to the list of branches to display

2015-01-12 Thread Mike Hommey
On Thu, Jan 08, 2015 at 06:17:37PM +0900, Mike Hommey wrote: `git show-branch --upstream` is equivalent to `git show-branch $(git for-each-ref refs/heads --format '%(refname:short)') $(git for-each-ref refs/heads --format '%(upstream:short)')` `git show-branch --upstream foo bar` is

Re: [PATCHv12 10/10] t5543-atomic-push.sh: add basic tests for atomic pushes

2015-01-12 Thread Eric Sunshine
On Wed, Jan 7, 2015 at 10:23 PM, Stefan Beller sbel...@google.com wrote: This adds tests for the atomic push option. The first four tests check if the atomic option works in good conditions and the last three patches check if the atomic s/patches/tests/ option prevents any change to be

[PATCH] Document receive.advertiseatomic

2015-01-12 Thread Stefan Beller
This was missing in 1b70fe5d3054 (2015-01-07, receive-pack.c: negotiate atomic push support) as I squashed the option in very late in the patch series. Signed-off-by: Stefan Beller sbel...@google.com --- Notes: v1: This goes on top of origin/sb/atomic-push Documentation/config.txt | 5

Re: [PATCHv12 06/10] receive-pack.c: negotiate atomic push support

2015-01-12 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: If it's only intended to assist automated testing, then perhaps control it via an environment variable rather than a configuration option. (See, for instance, GIT_TEST_SPLIT_INDEX or GIT_USE_LOOKUP as precedent.) Note that passing environment to

Re: [PATCH v2] standardize usage info string format

2015-01-12 Thread Alex Henrie
2015-01-12 22:29 GMT-07:00 Scott Schmit i.g...@comcast.net: On Wed, Jan 07, 2015 at 11:28:21PM -0700, Alex Henrie wrote: diff --git a/builtin/diff-files.c b/builtin/diff-files.c index 9200069..1abeba6 100644 --- a/builtin/diff-files.c +++ b/builtin/diff-files.c @@ -11,7 +11,7 @@

Re: [PATCH] standardize usage info string format

2015-01-12 Thread Scott Schmit
On Wed, Jan 07, 2015 at 11:28:21PM -0700, Alex Henrie wrote: This patch puts the usage info strings that were not already in docopt- like format into docopt-like format, which will be a litle easier for end users and a lot easier for translators. Changes include: - Placing angle brackets

[L10N] Startup of Git 2.3.0 l10n round 1

2015-01-12 Thread Jiang Xin
Hi, Since Git v2.3.0-rc0 had already been released, it's time to start new round of git l10n. This time there are 13 new messages need to be translated since last update for v2.2.0: l10n: git.pot: v2.3.0 round 1 (13 new, 11 removed) Generate po/git.pot from v2.3.0-rc0 for git v2.3.0

[PATCH v2] standardize usage info string format

2015-01-12 Thread Alex Henrie
This patch puts the usage info strings that were not already in docopt- like format into docopt-like format, which will be a litle easier for end users and a lot easier for translators. Changes include: - Placing angle brackets around fill-in-the-blank parameters - Putting dashes in multiword

Re: git rerere forget isn't working?

2015-01-12 Thread Junio C Hamano
Robert Dailey rcdailey.li...@gmail.com writes: So I want a way to clear out the whole rerere cache (i.e. every remembered conflict resolution). So I try this command: $ git rerere forget . The forget subcommand is to tell Git that you screwed up in this sequence: $ git merge other ;# or