* [PATCH 2/2] serialize collection of refs that contain submodule changes
From: Heiko Voigt @ 2016-09-14 17:51 UTC (permalink / raw)
To: Jeff King
Cc: Stefan Beller, Junio C Hamano, git@vger.kernel.org, Jens Lehmann,
Fredrik Gustafsson, Leandro Lucarella
In-Reply-To: <20160824230115.jhmcr4r7wobj5ejb@sigill.intra.peff.net>
We are iterating over each pushed ref and want to check whether it
contains changes to submodules. Instead of immediately checking each ref
lets first collect them and then do the check for all of them in one
revision walk.
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
---
Sorry this was not catched earlier. This was implemented as part of
summer of code and it seems we never tested with --mirror.
This is the one which does only one revision walk instead of one for
each ref. Here are some numbers (using the my development clone of git
itself) from my local machine:
rm -rf <test-git> && mkdir <test-git> &&
(cd <test-git> && git init) &&
time git push --mirror <test-git>
real 0m16.056s
user 0m24.424s
sys 0m1.380s
real 0m15.885s
user 0m24.204s
sys 0m1.296s
real 0m16.731s
user 0m24.176s
sys 0m1.244s
rm -rf <test-git> && mkdir <test-git> &&
(cd <test-git> && git init) &&
time git push --mirror --recurse-submodules=check <test-git>
real 0m21.441s
user 0m29.560s
sys 0m1.480s
real 0m21.319s
user 0m29.484s
sys 0m1.464s
real 0m21.261s
user 0m29.252s
sys 0m1.592s
Without my patches and --recurse-submodules=check the numbers are
basically the same. I stopped the test with --recurse-submodules=check
after ~ 9 minutes.
Cheers Heiko
submodule.c | 36 +++++++++++++++++++++---------------
submodule.h | 5 +++--
transport.c | 22 ++++++++++++++--------
3 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/submodule.c b/submodule.c
index b04c066..a15e346 100644
--- a/submodule.c
+++ b/submodule.c
@@ -627,24 +627,31 @@ static void free_submodules_sha1s(struct string_list *submodules)
string_list_clear(submodules, 1);
}
-int find_unpushed_submodules(unsigned char new_sha1[20],
+static void append_hash_to_argv(const unsigned char sha1[20],
+ void *data)
+{
+ struct argv_array *argv = (struct argv_array *) data;
+ argv_array_push(argv, sha1_to_hex(sha1));
+}
+
+int find_unpushed_submodules(struct sha1_array *hashes,
const char *remotes_name, struct string_list *needs_pushing)
{
struct rev_info rev;
struct commit *commit;
- const char *argv[] = {NULL, NULL, "--not", "NULL", NULL};
- int argc = ARRAY_SIZE(argv) - 1, i;
- char *sha1_copy;
+ int i;
struct string_list submodules = STRING_LIST_INIT_DUP;
+ struct argv_array argv = ARGV_ARRAY_INIT;
- struct strbuf remotes_arg = STRBUF_INIT;
-
- strbuf_addf(&remotes_arg, "--remotes=%s", remotes_name);
init_revisions(&rev, NULL);
- sha1_copy = xstrdup(sha1_to_hex(new_sha1));
- argv[1] = sha1_copy;
- argv[3] = remotes_arg.buf;
- setup_revisions(argc, argv, &rev, NULL);
+
+ /* argv.argv[0] will be ignored by setup_revisions */
+ argv_array_push(&argv, "find_unpushed_submodules");
+ sha1_array_for_each_unique(hashes, append_hash_to_argv, &argv);
+ argv_array_push(&argv, "--not");
+ argv_array_pushf(&argv, "--remotes=%s", remotes_name);
+
+ setup_revisions(argv.argc, argv.argv, &rev, NULL);
if (prepare_revision_walk(&rev))
die("revision walk setup failed");
@@ -652,8 +659,7 @@ int find_unpushed_submodules(unsigned char new_sha1[20],
find_unpushed_submodule_commits(commit, &submodules);
reset_revision_walk();
- free(sha1_copy);
- strbuf_release(&remotes_arg);
+ argv_array_clear(&argv);
for (i = 0; i < submodules.nr; i++) {
struct string_list_item *item = &submodules.items[i];
@@ -691,12 +697,12 @@ static int push_submodule(const char *path)
return 1;
}
-int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name)
+int push_unpushed_submodules(struct sha1_array *hashes, const char *remotes_name)
{
int i, ret = 1;
struct string_list needs_pushing = STRING_LIST_INIT_DUP;
- if (!find_unpushed_submodules(new_sha1, remotes_name, &needs_pushing))
+ if (!find_unpushed_submodules(hashes, remotes_name, &needs_pushing))
return 1;
for (i = 0; i < needs_pushing.nr; i++) {
diff --git a/submodule.h b/submodule.h
index d9e197a..065b2f0 100644
--- a/submodule.h
+++ b/submodule.h
@@ -3,6 +3,7 @@
struct diff_options;
struct argv_array;
+struct sha1_array;
enum {
RECURSE_SUBMODULES_CHECK = -4,
@@ -62,9 +63,9 @@ int submodule_uses_gitfile(const char *path);
int ok_to_remove_submodule(const char *path);
int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20],
const unsigned char a[20], const unsigned char b[20], int search);
-int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name,
+int find_unpushed_submodules(struct sha1_array *hashes, const char *remotes_name,
struct string_list *needs_pushing);
-int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name);
+int push_unpushed_submodules(struct sha1_array *hashes, const char *remotes_name);
void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir);
int parallel_submodules(void);
diff --git a/transport.c b/transport.c
index 94d6dc3..76e1daf 100644
--- a/transport.c
+++ b/transport.c
@@ -903,23 +903,29 @@ int transport_push(struct transport *transport,
if ((flags & TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND) && !is_bare_repository()) {
struct ref *ref = remote_refs;
+ struct sha1_array hashes = SHA1_ARRAY_INIT;
+
for (; ref; ref = ref->next)
- if (!is_null_oid(&ref->new_oid) &&
- !push_unpushed_submodules(ref->new_oid.hash,
- transport->remote->name))
- die ("Failed to push all needed submodules!");
+ if (!is_null_oid(&ref->new_oid))
+ sha1_array_append(&hashes, ref->new_oid.hash);
+
+ if (!push_unpushed_submodules(&hashes, transport->remote->name))
+ die ("Failed to push all needed submodules!");
}
if ((flags & (TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND |
TRANSPORT_RECURSE_SUBMODULES_CHECK)) && !is_bare_repository()) {
struct ref *ref = remote_refs;
struct string_list needs_pushing = STRING_LIST_INIT_DUP;
+ struct sha1_array hashes = SHA1_ARRAY_INIT;
for (; ref; ref = ref->next)
- if (!is_null_oid(&ref->new_oid) &&
- find_unpushed_submodules(ref->new_oid.hash,
- transport->remote->name, &needs_pushing))
- die_with_unpushed_submodules(&needs_pushing);
+ if (!is_null_oid(&ref->new_oid))
+ sha1_array_append(&hashes, ref->new_oid.hash);
+
+ if (find_unpushed_submodules(&hashes, transport->remote->name,
+ &needs_pushing))
+ die_with_unpushed_submodules(&needs_pushing);
}
push_ret = transport->push_refs(transport, remote_refs, flags);
--
2.0.2.832.g083c931
^ permalink raw reply related
* Re: [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers
From: Jeff King @ 2016-09-14 19:11 UTC (permalink / raw)
To: Mike Ralphson; +Cc: git
In-Reply-To: <01020157276d4d1f-9c995462-4aea-4949-8d29-3dbdbec77dd7-000000@eu-west-1.amazonses.com>
On Wed, Sep 14, 2016 at 06:40:57AM +0000, Mike Ralphson wrote:
> Two instances of %ld being used for unsigned longs
Obviously this is an improvement, but I'm kind of surprised that
compiler warnings didn't flag this. I couldn't find a "-W" combination
that noticed, though (at least not with gcc 6).
-Peff
^ permalink raw reply
* Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields
From: Jeff King @ 2016-09-14 19:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Kevin Daudt, git
In-Reply-To: <xmqqoa3qqsw9.fsf@gitster.mtv.corp.google.com>
On Wed, Sep 14, 2016 at 10:43:18AM -0700, Junio C Hamano wrote:
> I think we can go either way and it does not matter all that much if
> "mailinfo" changes its output or the reader of "mailinfo" output
> changes its input--we will either be munging data read from "From:"
> when producing the "Author:" line, or taking the "Author:" output by
> mailinfo and removing the quotes.
Yeah, that was the part I was wondering about in my original response.
What is the output of mailinfo _supposed_ to be, and do we consider that
at all public (i.e., are there are other tools besides "git am" that
build on mailinfo)?
At least "am" already does some quote-stripping, so any de-quoting added
in mailinfo is potentially a regression (if we indeed care about keeping
the output stable).
But if we are OK with that, it seems to me that mailinfo is the best
place to do the de-quoting, because then its output is well-defined:
everything after "Author:" up to the newline is the name. Whereas if the
cleanup of the value is split across mailinfo and its reader, then it is
hard to know which side is responsible for which part. mailinfo handles
whitespace unfolding, certainly. What other rfc2822 things does it
handle? What are the rules for dequoting its output?
I'll admit I don't care _too_ much. This is a remote corner of the code
that I hope never to have to look at. I'm mostly just describing how the
problem space makes sense to _me_, and how I would write it if starting
from scratch.
-Peff
^ permalink raw reply
* Re: [PATCH] pathspec: removed unnecessary function prototypes
From: Jeff King @ 2016-09-14 19:23 UTC (permalink / raw)
To: Brandon Williams; +Cc: git
In-Reply-To: <20160913181552.74bhacoa2q76yv6k@sigill.intra.peff.net>
On Tue, Sep 13, 2016 at 11:15:52AM -0700, Jeff King wrote:
> On Tue, Sep 13, 2016 at 09:52:51AM -0700, Brandon Williams wrote:
>
> > removed function prototypes from pathspec.h which don't have a
> > corresponding implementation.
>
> I'm always curious of the "why" in cases like this. Did we forget to add
> them? Did they get renamed? Did they go away?
>
> Looks like the latter; 5a76aff (add: convert to use parse_pathspec,
> 2013-07-14) just forgot to remove them.
I should have done a better job of not just providing the answer, but
showing how. The easiest tool here is "git log -S":
git log -1 -p -Scheck_path_for_gitlink
(and then you can see that the whole function went away there).
-Peff
^ permalink raw reply
* Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields
From: Junio C Hamano @ 2016-09-14 19:30 UTC (permalink / raw)
To: Jeff King; +Cc: Kevin Daudt, git
In-Reply-To: <20160914191759.5unwaq2eequ4pifr@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> On Wed, Sep 14, 2016 at 10:43:18AM -0700, Junio C Hamano wrote:
>
>> I think we can go either way and it does not matter all that much if
>> "mailinfo" changes its output or the reader of "mailinfo" output
>> changes its input--we will either be munging data read from "From:"
>> when producing the "Author:" line, or taking the "Author:" output by
>> mailinfo and removing the quotes.
>
> Yeah, that was the part I was wondering about in my original response.
> What is the output of mailinfo _supposed_ to be, and do we consider that
> at all public (i.e., are there are other tools besides "git am" that
> build on mailinfo)?
>
> At least "am" already does some quote-stripping, so any de-quoting added
> in mailinfo is potentially a regression (if we indeed care about keeping
> the output stable).
Another small thing I am not sure about is if the \ quoting can hide
an embedded newline in the author name. Would we end up turning
From: "Jeff \
King" <peff@peff.net>
or somesuch into
Author: Jeff
King
Email: peff@peff.net
;-)
> But if we are OK with that, it seems to me that mailinfo is the best
> place to do the de-quoting, because then its output is well-defined:
> everything after "Author:" up to the newline is the name.
There are other things mailinfo does, like turning this
From: peff@peff.net (Jeff King)
into
Author: Jeff King
Email: peff@peff.net
and
From: Uh "foo" Bar peff@peff.net (Jeff King)
into
Author: Uh "foo" Bar (Jeff King)
Email: peff@peff.net
So let's roll the \" -> " into mailinfo.
I am not sure if we also should remove the surrounding "", i.e. we
currently do not turn this
From: "Jeff King" <peff@peff.net>
into this:
Author: Jeff King
Email: peff@peff.net
I think we probably should, and remove the one that does so from the
reader.
^ permalink raw reply
* Re: [PATCH] pathspec: removed unnecessary function prototypes
From: Brandon Williams @ 2016-09-14 19:30 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20160914192341.mgpcc35kgmjqunbh@sigill.intra.peff.net>
On Wed, Sep 14, 2016 at 12:23 PM, Jeff King <peff@peff.net> wrote:
> On Tue, Sep 13, 2016 at 11:15:52AM -0700, Jeff King wrote:
> I should have done a better job of not just providing the answer, but
> showing how. The easiest tool here is "git log -S":
>
> git log -1 -p -Scheck_path_for_gitlink
>
> (and then you can see that the whole function went away there).
>
> -Peff
Perfect thanks! There's still a lot of little features like this that
I'm unaware
of so I really appreciate the pointer.
-Brandon
^ permalink raw reply
* Re: git submodule add spits unrelated to actual problem error msg about .gitignore
From: Stefan Beller @ 2016-09-14 19:32 UTC (permalink / raw)
To: Yaroslav Halchenko; +Cc: git@vger.kernel.org
In-Reply-To: <20160914140318.GB9833@onerussian.com>
On Wed, Sep 14, 2016 at 7:03 AM, Yaroslav Halchenko <yoh@onerussian.com> wrote:
> I have spent some time chasing the wild goose (well - the .gitignore
> file) after getting:
>
> $> git-submodule add --name fcx-1 ./fcx-1/ ./fcx-1/
> The following path is ignored by one of your .gitignore files:
> fcx-1
> Use -f if you really want to add it.
>
> long story short -- the culprit is this piece of code in git-submodule:
>
> if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" > /dev/null 2>&1
> then
> eval_gettextln "The following path is ignored by one of your .gitignore files:
> \$sm_path
> Use -f if you really want to add it." >&2
> exit 1
> fi
>
>
> so if anything goes wrong in git add, it just reports this error
> message.
Thanks for the bug report!
I think we could chop off "2>&1" as that would have exposed the
underlying error.
Another way to go would be to use verbose git-add and grep for
the string "add '$sm_path'".
if test -z "$force" && ! git add --verbose --dry-run
--ignore-missing "$sm_path" |grep "add $sm_path"
git-add already gives the correct (the same error message) for the
ignored files, so maybe we'd just do:
# no need for a if, but this single line will do:
test -z "$force" && git add --dry-run git.o >/dev/null || exit 1
^ permalink raw reply
* Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields
From: Jeff King @ 2016-09-14 19:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Kevin Daudt, git
In-Reply-To: <xmqqfup2qny9.fsf@gitster.mtv.corp.google.com>
On Wed, Sep 14, 2016 at 12:30:06PM -0700, Junio C Hamano wrote:
> Another small thing I am not sure about is if the \ quoting can hide
> an embedded newline in the author name. Would we end up turning
>
> From: "Jeff \
> King" <peff@peff.net>
>
> or somesuch into
>
> Author: Jeff
> King
> Email: peff@peff.net
>
> ;-)
Heh, yeah. That is another reason to clean up and sanitize as much as
possible before stuffing it into another text format that will be
parsed.
> So let's roll the \" -> " into mailinfo.
>
> I am not sure if we also should remove the surrounding "", i.e. we
> currently do not turn this
>
> From: "Jeff King" <peff@peff.net>
>
> into this:
>
> Author: Jeff King
> Email: peff@peff.net
>
> I think we probably should, and remove the one that does so from the
> reader.
I think you have to, or else you cannot tell the difference between
surrounding quotes that need to be stripped, and ones that were
backslash-escaped. Like:
From: "Jeff King" <peff@peff.net>
From: \"Jeff King\" <peff@peff.net>
which would both become:
Author: "Jeff King"
Email: peff@peff.net
though I am not sure the latter one is actually valid; you might need to
be inside syntactic quotes in order to include backslashed quotes. I
haven't read rfc2822 carefully recently enough to know.
Anyway, I think that:
From: One "Two \"Three\" Four" Five
may also be valid. So the quote-stripping in the reader is not just "at
the outside", but may need to handle interior syntactic quotes, too. So
it really makes sense for me to clean and sanitize as much as possible
in one step, and then make the parser of mailinfo as dumb as possible.
-Peff
^ permalink raw reply
* Re: [PATCH 2/2] serialize collection of refs that contain submodule changes
From: Heiko Voigt @ 2016-09-14 19:46 UTC (permalink / raw)
To: Jeff King
Cc: Stefan Beller, Junio C Hamano, git@vger.kernel.org, Jens Lehmann,
Fredrik Gustafsson, Leandro Lucarella
In-Reply-To: <20160914175130.GB7613@sandbox>
On Wed, Sep 14, 2016 at 07:51:30PM +0200, Heiko Voigt wrote:
> Here are some numbers (using the my development clone of git
> itself) from my local machine:
>
> rm -rf <test-git> && mkdir <test-git> &&
> (cd <test-git> && git init) &&
> time git push --mirror <test-git>
>
> real 0m16.056s
> user 0m24.424s
> sys 0m1.380s
>
> real 0m15.885s
> user 0m24.204s
> sys 0m1.296s
>
> real 0m16.731s
> user 0m24.176s
> sys 0m1.244s
>
> rm -rf <test-git> && mkdir <test-git> &&
> (cd <test-git> && git init) &&
> time git push --mirror --recurse-submodules=check <test-git>
>
> real 0m21.441s
> user 0m29.560s
> sys 0m1.480s
>
> real 0m21.319s
> user 0m29.484s
> sys 0m1.464s
>
> real 0m21.261s
> user 0m29.252s
> sys 0m1.592s
>
> Without my patches and --recurse-submodules=check the numbers are
> basically the same. I stopped the test with --recurse-submodules=check
> after ~ 9 minutes.
Fun fact, I let the push without my patch and with
--recurse-submodules=check finish:
real 27m7.962s
user 27m15.568s
sys 0m2.016s
Thats quite some time...
Cheers Heiko
^ permalink raw reply
* Re: [PATCH 2/2] serialize collection of refs that contain submodule changes
From: Stefan Beller @ 2016-09-14 20:04 UTC (permalink / raw)
To: Heiko Voigt
Cc: Jeff King, Junio C Hamano, git@vger.kernel.org, Jens Lehmann,
Fredrik Gustafsson, Leandro Lucarella
In-Reply-To: <20160914194643.GC7613@sandbox>
On Wed, Sep 14, 2016 at 12:46 PM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
> On Wed, Sep 14, 2016 at 07:51:30PM +0200, Heiko Voigt wrote:
>> Here are some numbers (using the my development clone of git
>> itself) from my local machine:
>>
>> rm -rf <test-git> && mkdir <test-git> &&
>> (cd <test-git> && git init) &&
>> time git push --mirror <test-git>
>>
>> real 0m16.056s
>> user 0m24.424s
>> sys 0m1.380s
>>
>> real 0m15.885s
>> user 0m24.204s
>> sys 0m1.296s
>>
>> real 0m16.731s
>> user 0m24.176s
>> sys 0m1.244s
>>
>> rm -rf <test-git> && mkdir <test-git> &&
>> (cd <test-git> && git init) &&
>> time git push --mirror --recurse-submodules=check <test-git>
>>
>> real 0m21.441s
>> user 0m29.560s
>> sys 0m1.480s
>>
>> real 0m21.319s
>> user 0m29.484s
>> sys 0m1.464s
>>
>> real 0m21.261s
>> user 0m29.252s
>> sys 0m1.592s
>>
>> Without my patches and --recurse-submodules=check the numbers are
>> basically the same. I stopped the test with --recurse-submodules=check
>> after ~ 9 minutes.
>
> Fun fact, I let the push without my patch and with
> --recurse-submodules=check finish:
Thanks for the numbers, one of the major push backs for
origin/sb/push-make-submodule-check-the-default
was that it introduced slowness; this patch might help a bit there.
^ permalink raw reply
* Re: git submodule add spits unrelated to actual problem error msg about .gitignore
From: Yaroslav Halchenko @ 2016-09-14 20:23 UTC (permalink / raw)
To: Stefan Beller; +Cc: git@vger.kernel.org
In-Reply-To: <CAGZ79kbdfWHDGzoe21LVqt6naMJPWGf45S1oknrAp6=Z-Qm8dQ@mail.gmail.com>
On September 14, 2016 3:32:11 PM EDT, Stefan Beller <sbeller@google.com> wrote:
!
>I think we could chop off "2>&1" as that would have exposed the
>underlying error.
>
>Another way to go would be to use verbose git-add and grep for
>the string "add '$sm_path'".
>
> if test -z "$force" && ! git add --verbose --dry-run
>--ignore-missing "$sm_path" |grep "add $sm_path"
>
>git-add already gives the correct (the same error message) for the
>ignored files, so maybe we'd just do:
>
> # no need for a if, but this single line will do:
> test -z "$force" && git add --dry-run git.o >/dev/null || exit 1
FWIW Imho exposing error is good but not sufficient alone, since custom gitignore message would still be confusing.
--
Sent from a phone which beats iPhone.
^ permalink raw reply
* Re: Bug Report: "git submodule deinit" fails right after a clone
From: Heiko Voigt @ 2016-09-14 20:29 UTC (permalink / raw)
To: Thomas Bétous; +Cc: git
In-Reply-To: <CAPOqYV+C-P9M2zcUBBkD2LALPm4K3sxSut+BjAkZ9T1AKLEr+A@mail.gmail.com>
On Tue, Aug 30, 2016 at 01:45:56PM +0200, Thomas Bétous wrote:
> Are you able to reproduce this problem?
No. I just did a clone and an immediate deinit afterwards and no error.
Maybe you can provide a script to reproduce? Which System was this on?
Cheers Heiko
^ permalink raw reply
* [PATCH v4 0/4] git add --chmod: always change the file
From: Thomas Gummerer @ 2016-09-14 21:07 UTC (permalink / raw)
To: git
Cc: Johannes Schindelin, Jeff King, Jan Keromnes, Ingo Brückl,
Edward Thomson, Junio C Hamano, Thomas Gummerer
In-Reply-To: <20160912210818.26282-1-t.gummerer@gmail.com>
Thanks Junio for the review of my last round.
Changes since then:
[1/4]: patch unchanged
[2/4]: Only adds a test now, and corrects the type of the argument of
chmod_path, but leaves the rest of the patch unchanged.
[3/4]: chmod_index_entry now takes a char as argument which can either
be + or -, and changes the mode based on that, instead of using
the 0777 or 0666 mode that was passed in from the outside.
[4/4]: Adapted to the different behaviour of chmod_index_entry and
added tests as suggested by Junio.
Thomas Gummerer (4):
add: document the chmod option
update-index: add test for chmod flags
read-cache: introduce chmod_index_entry
add: modify already added files when --chmod is given
Documentation/git-add.txt | 7 +++++-
builtin/add.c | 47 ++++++++++++++++++++++++----------------
builtin/checkout.c | 2 +-
builtin/commit.c | 2 +-
builtin/update-index.c | 18 +++-------------
cache.h | 12 ++++++-----
read-cache.c | 43 ++++++++++++++++++++++++++++++-------
t/t2107-update-index-basic.sh | 13 +++++++++++
t/t3700-add.sh | 50 +++++++++++++++++++++++++++++++++++++++++++
9 files changed, 144 insertions(+), 50 deletions(-)
--
2.10.0.304.gf2ff484
^ permalink raw reply
* [PATCH v4 1/4] add: document the chmod option
From: Thomas Gummerer @ 2016-09-14 21:07 UTC (permalink / raw)
To: git
Cc: Johannes Schindelin, Jeff King, Jan Keromnes, Ingo Brückl,
Edward Thomson, Junio C Hamano, Thomas Gummerer
In-Reply-To: <20160914210747.15485-1-t.gummerer@gmail.com>
The git add --chmod option was introduced in 4e55ed3 ("add: add
--chmod=+x / --chmod=-x options", 2016-05-31), but was never
documented. Document the feature.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
Documentation/git-add.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 6a96a66..7ed63dc 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -11,7 +11,7 @@ SYNOPSIS
'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
[--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
- [--] [<pathspec>...]
+ [--chmod=(+|-)x] [--] [<pathspec>...]
DESCRIPTION
-----------
@@ -165,6 +165,11 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files.
be ignored, no matter if they are already present in the work
tree or not.
+--chmod=(+|-)x::
+ Override the executable bit of the added files. The executable
+ bit is only changed in the index, the files on disk are left
+ unchanged.
+
\--::
This option can be used to separate command-line options from
the list of files, (useful when filenames might be mistaken
--
2.10.0.304.gf2ff484
^ permalink raw reply related
* [PATCH v4 2/4] update-index: add test for chmod flags
From: Thomas Gummerer @ 2016-09-14 21:07 UTC (permalink / raw)
To: git
Cc: Johannes Schindelin, Jeff King, Jan Keromnes, Ingo Brückl,
Edward Thomson, Junio C Hamano, Thomas Gummerer
In-Reply-To: <20160914210747.15485-1-t.gummerer@gmail.com>
Currently there is no test checking the expected behaviour when multiple
chmod flags with different arguments are passed. As argument handling
is not in line with other git commands it's easy to miss and
accidentally change the current behaviour.
While there, fix the argument type of chmod_path, which takes an int,
but had a char passed in.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
builtin/update-index.c | 2 +-
t/t2107-update-index-basic.sh | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index ba04b19..bbdf0d9 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -419,7 +419,7 @@ static int add_cacheinfo(unsigned int mode, const unsigned char *sha1,
return 0;
}
-static void chmod_path(int flip, const char *path)
+static void chmod_path(char flip, const char *path)
{
int pos;
struct cache_entry *ce;
diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh
index dfe02f4..32ac6e0 100755
--- a/t/t2107-update-index-basic.sh
+++ b/t/t2107-update-index-basic.sh
@@ -80,4 +80,17 @@ test_expect_success '.lock files cleaned up' '
)
'
+test_expect_success '--chmod=+x and chmod=-x in the same argument list' '
+ >A &&
+ >B &&
+ git add A B &&
+ git update-index --chmod=+x A --chmod=-x B &&
+ cat >expect <<-\EOF &&
+ 100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 A
+ 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 B
+ EOF
+ git ls-files --stage A B >actual &&
+ test_cmp expect actual
+'
+
test_done
--
2.10.0.304.gf2ff484
^ permalink raw reply related
* [PATCH v4 3/4] read-cache: introduce chmod_index_entry
From: Thomas Gummerer @ 2016-09-14 21:07 UTC (permalink / raw)
To: git
Cc: Johannes Schindelin, Jeff King, Jan Keromnes, Ingo Brückl,
Edward Thomson, Junio C Hamano, Thomas Gummerer
In-Reply-To: <20160914210747.15485-1-t.gummerer@gmail.com>
As there are chmod options for both add and update-index, introduce a
new chmod_index_entry function to do the work. Use it in update-index,
while it will be used in add in the next patch.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
builtin/update-index.c | 16 ++--------------
cache.h | 2 ++
read-cache.c | 29 +++++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index bbdf0d9..9e9e040 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -423,26 +423,14 @@ static void chmod_path(char flip, const char *path)
{
int pos;
struct cache_entry *ce;
- unsigned int mode;
pos = cache_name_pos(path, strlen(path));
if (pos < 0)
goto fail;
ce = active_cache[pos];
- mode = ce->ce_mode;
- if (!S_ISREG(mode))
- goto fail;
- switch (flip) {
- case '+':
- ce->ce_mode |= 0111; break;
- case '-':
- ce->ce_mode &= ~0111; break;
- default:
+ if (chmod_cache_entry(ce, flip) < 0)
goto fail;
- }
- cache_tree_invalidate_path(&the_index, path);
- ce->ce_flags |= CE_UPDATE_IN_BASE;
- active_cache_changed |= CE_ENTRY_CHANGED;
+
report("chmod %cx '%s'", flip, path);
return;
fail:
diff --git a/cache.h b/cache.h
index 6738050..35c8d1c 100644
--- a/cache.h
+++ b/cache.h
@@ -369,6 +369,7 @@ extern void free_name_hash(struct index_state *istate);
#define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags), 0)
#define add_file_to_cache(path, flags) add_file_to_index(&the_index, (path), (flags), 0)
+#define chmod_cache_entry(ce, flip) chmod_index_entry(&the_index, (ce), (flip))
#define refresh_cache(flags) refresh_index(&the_index, (flags), NULL, NULL, NULL)
#define ce_match_stat(ce, st, options) ie_match_stat(&the_index, (ce), (st), (options))
#define ce_modified(ce, st, options) ie_modified(&the_index, (ce), (st), (options))
@@ -584,6 +585,7 @@ extern int remove_file_from_index(struct index_state *, const char *path);
extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags, int force_mode);
extern int add_file_to_index(struct index_state *, const char *path, int flags, int force_mode);
extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, unsigned int refresh_options);
+extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char flip);
extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
extern void set_object_name_for_intent_to_add_entry(struct cache_entry *ce);
extern int index_name_is_other(const struct index_state *, const char *, int);
diff --git a/read-cache.c b/read-cache.c
index 491e52d..8924f2e 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -756,6 +756,35 @@ struct cache_entry *make_cache_entry(unsigned int mode,
return ret;
}
+/*
+ * Chmod an index entry with either +x or -x.
+ *
+ * Returns -1 if the chmod for the particular cache entry failed (if it's
+ * not a regular file), -2 if an invalid flip argument is passed in, 0
+ * otherwise.
+ */
+int chmod_index_entry(struct index_state *istate, struct cache_entry *ce,
+ char flip)
+{
+ if (!S_ISREG(ce->ce_mode))
+ return -1;
+ switch (flip) {
+ case '+':
+ ce->ce_mode |= 0111;
+ break;
+ case '-':
+ ce->ce_mode &= ~0111;
+ break;
+ default:
+ return -2;
+ }
+ cache_tree_invalidate_path(&the_index, ce->name);
+ ce->ce_flags |= CE_UPDATE_IN_BASE;
+ istate->cache_changed |= CE_ENTRY_CHANGED;
+
+ return 0;
+}
+
int ce_same_name(const struct cache_entry *a, const struct cache_entry *b)
{
int len = ce_namelen(a);
--
2.10.0.304.gf2ff484
^ permalink raw reply related
* [PATCH v4 4/4] add: modify already added files when --chmod is given
From: Thomas Gummerer @ 2016-09-14 21:07 UTC (permalink / raw)
To: git
Cc: Johannes Schindelin, Jeff King, Jan Keromnes, Ingo Brückl,
Edward Thomson, Junio C Hamano, Thomas Gummerer
In-Reply-To: <20160914210747.15485-1-t.gummerer@gmail.com>
When the chmod option was added to git add, it was hooked up to the diff
machinery, meaning that it only works when the version in the index
differs from the version on disk.
As the option was supposed to mirror the chmod option in update-index,
which always changes the mode in the index, regardless of the status of
the file, make sure the option behaves the same way in git add.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
builtin/add.c | 47 ++++++++++++++++++++++++++++-------------------
builtin/checkout.c | 2 +-
builtin/commit.c | 2 +-
cache.h | 10 +++++-----
read-cache.c | 14 ++++++--------
t/t3700-add.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 91 insertions(+), 34 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c
index b1dddb4..595a0b2 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -26,10 +26,25 @@ static int patch_interactive, add_interactive, edit_interactive;
static int take_worktree_changes;
struct update_callback_data {
- int flags, force_mode;
+ int flags;
int add_errors;
};
+static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
+{
+ int i;
+
+ for (i = 0; i < active_nr; i++) {
+ struct cache_entry *ce = active_cache[i];
+
+ if (pathspec && !ce_path_match(ce, pathspec, NULL))
+ continue;
+
+ if (chmod_cache_entry(ce, force_mode) < 0)
+ fprintf(stderr, "cannot chmod '%s'", ce->name);
+ }
+}
+
static int fix_unmerged_status(struct diff_filepair *p,
struct update_callback_data *data)
{
@@ -65,8 +80,7 @@ static void update_callback(struct diff_queue_struct *q,
die(_("unexpected diff status %c"), p->status);
case DIFF_STATUS_MODIFIED:
case DIFF_STATUS_TYPE_CHANGED:
- if (add_file_to_index(&the_index, path,
- data->flags, data->force_mode)) {
+ if (add_file_to_index(&the_index, path, data->flags)) {
if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
die(_("updating files failed"));
data->add_errors++;
@@ -84,15 +98,14 @@ static void update_callback(struct diff_queue_struct *q,
}
}
-int add_files_to_cache(const char *prefix, const struct pathspec *pathspec,
- int flags, int force_mode)
+int add_files_to_cache(const char *prefix,
+ const struct pathspec *pathspec, int flags)
{
struct update_callback_data data;
struct rev_info rev;
memset(&data, 0, sizeof(data));
data.flags = flags;
- data.force_mode = force_mode;
init_revisions(&rev, prefix);
setup_revisions(0, NULL, &rev, NULL);
@@ -281,7 +294,7 @@ static int add_config(const char *var, const char *value, void *cb)
return git_default_config(var, value, cb);
}
-static int add_files(struct dir_struct *dir, int flags, int force_mode)
+static int add_files(struct dir_struct *dir, int flags)
{
int i, exit_status = 0;
@@ -294,8 +307,7 @@ static int add_files(struct dir_struct *dir, int flags, int force_mode)
}
for (i = 0; i < dir->nr; i++)
- if (add_file_to_index(&the_index, dir->entries[i]->name,
- flags, force_mode)) {
+ if (add_file_to_index(&the_index, dir->entries[i]->name, flags)) {
if (!ignore_add_errors)
die(_("adding files failed"));
exit_status = 1;
@@ -308,7 +320,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
int exit_status = 0;
struct pathspec pathspec;
struct dir_struct dir;
- int flags, force_mode;
+ int flags;
int add_new_files;
int require_pathspec;
char *seen = NULL;
@@ -342,13 +354,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
if (!show_only && ignore_missing)
die(_("Option --ignore-missing can only be used together with --dry-run"));
- if (!chmod_arg)
- force_mode = 0;
- else if (!strcmp(chmod_arg, "-x"))
- force_mode = 0666;
- else if (!strcmp(chmod_arg, "+x"))
- force_mode = 0777;
- else
+ if (chmod_arg && ((chmod_arg[0] != '-' && chmod_arg[0] != '+') ||
+ chmod_arg[1] != 'x' || chmod_arg[2]))
die(_("--chmod param '%s' must be either -x or +x"), chmod_arg);
add_new_files = !take_worktree_changes && !refresh_only;
@@ -441,11 +448,13 @@ int cmd_add(int argc, const char **argv, const char *prefix)
plug_bulk_checkin();
- exit_status |= add_files_to_cache(prefix, &pathspec, flags, force_mode);
+ exit_status |= add_files_to_cache(prefix, &pathspec, flags);
if (add_new_files)
- exit_status |= add_files(&dir, flags, force_mode);
+ exit_status |= add_files(&dir, flags);
+ if (chmod_arg && pathspec.nr)
+ chmod_pathspec(&pathspec, chmod_arg[0]);
unplug_bulk_checkin();
finish:
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 8672d07..a83c78f 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -548,7 +548,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
* entries in the index.
*/
- add_files_to_cache(NULL, NULL, 0, 0);
+ add_files_to_cache(NULL, NULL, 0);
/*
* NEEDSWORK: carrying over local changes
* when branches have different end-of-line
diff --git a/builtin/commit.c b/builtin/commit.c
index bb9f79b..1cba3b7 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -397,7 +397,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix
*/
if (all || (also && pathspec.nr)) {
hold_locked_index(&index_lock, 1);
- add_files_to_cache(also ? prefix : NULL, &pathspec, 0, 0);
+ add_files_to_cache(also ? prefix : NULL, &pathspec, 0);
refresh_cache_or_die(refresh_flags);
update_main_cache_tree(WRITE_TREE_SILENT);
if (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))
diff --git a/cache.h b/cache.h
index 35c8d1c..cd8e9fe 100644
--- a/cache.h
+++ b/cache.h
@@ -367,8 +367,8 @@ extern void free_name_hash(struct index_state *istate);
#define rename_cache_entry_at(pos, new_name) rename_index_entry_at(&the_index, (pos), (new_name))
#define remove_cache_entry_at(pos) remove_index_entry_at(&the_index, (pos))
#define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
-#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags), 0)
-#define add_file_to_cache(path, flags) add_file_to_index(&the_index, (path), (flags), 0)
+#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags))
+#define add_file_to_cache(path, flags) add_file_to_index(&the_index, (path), (flags))
#define chmod_cache_entry(ce, flip) chmod_index_entry(&the_index, (ce), (flip))
#define refresh_cache(flags) refresh_index(&the_index, (flags), NULL, NULL, NULL)
#define ce_match_stat(ce, st, options) ie_match_stat(&the_index, (ce), (st), (options))
@@ -582,8 +582,8 @@ extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_IGNORE_ERRORS 4
#define ADD_CACHE_IGNORE_REMOVAL 8
#define ADD_CACHE_INTENT 16
-extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags, int force_mode);
-extern int add_file_to_index(struct index_state *, const char *path, int flags, int force_mode);
+extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags);
+extern int add_file_to_index(struct index_state *, const char *path, int flags);
extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, unsigned int refresh_options);
extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char flip);
extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
@@ -1821,7 +1821,7 @@ void packet_trace_identity(const char *prog);
* return 0 if success, 1 - if addition of a file failed and
* ADD_FILES_IGNORE_ERRORS was specified in flags
*/
-int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int flags, int force_mode);
+int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int flags);
/* diff.c */
extern int diff_auto_refresh_index;
diff --git a/read-cache.c b/read-cache.c
index 8924f2e..016bbcb 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -627,7 +627,7 @@ void set_object_name_for_intent_to_add_entry(struct cache_entry *ce)
hashcpy(ce->sha1, sha1);
}
-int add_to_index(struct index_state *istate, const char *path, struct stat *st, int flags, int force_mode)
+int add_to_index(struct index_state *istate, const char *path, struct stat *st, int flags)
{
int size, namelen, was_same;
mode_t st_mode = st->st_mode;
@@ -656,11 +656,10 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
else
ce->ce_flags |= CE_INTENT_TO_ADD;
- if (S_ISREG(st_mode) && force_mode)
- ce->ce_mode = create_ce_mode(force_mode);
- else if (trust_executable_bit && has_symlinks)
+
+ if (trust_executable_bit && has_symlinks) {
ce->ce_mode = create_ce_mode(st_mode);
- else {
+ } else {
/* If there is an existing entry, pick the mode bits and type
* from it, otherwise assume unexecutable regular file.
*/
@@ -719,13 +718,12 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
return 0;
}
-int add_file_to_index(struct index_state *istate, const char *path,
- int flags, int force_mode)
+int add_file_to_index(struct index_state *istate, const char *path, int flags)
{
struct stat st;
if (lstat(path, &st))
die_errno("unable to stat '%s'", path);
- return add_to_index(istate, path, &st, flags, force_mode);
+ return add_to_index(istate, path, &st, flags);
}
struct cache_entry *make_cache_entry(unsigned int mode,
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 2978cb9..0a962a6 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -349,4 +349,54 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '
test_mode_in_index 100755 foo2
'
+test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
+ echo foo >foo3 &&
+ git add foo3 &&
+ git add --chmod=+x foo3 &&
+ test_mode_in_index 100755 foo3 &&
+ echo foo >xfoo3 &&
+ chmod 755 xfoo3 &&
+ git add xfoo3 &&
+ git add --chmod=-x xfoo3 &&
+ test_mode_in_index 100644 xfoo3
+'
+
+test_expect_success 'file status is changed after git add --chmod=+x' '
+ echo "AM foo4" >expected &&
+ echo foo >foo4 &&
+ git add foo4 &&
+ git add --chmod=+x foo4 &&
+ git status -s foo4 >actual &&
+ test_cmp expected actual
+'
+
+test_expect_success 'no file status change if no pathspec is given' '
+ >foo5 &&
+ >foo6 &&
+ git add foo5 foo6 &&
+ git add --chmod=+x &&
+ test_mode_in_index 100644 foo5 &&
+ test_mode_in_index 100644 foo6
+'
+
+test_expect_success 'no file status change if no pathspec is given in subdir' '
+ mkdir sub &&
+ (
+ cd sub &&
+ >sub-foo1 &&
+ >sub-foo2 &&
+ git add . &&
+ git add --chmod=+x &&
+ test_mode_in_index 100644 sub-foo1 &&
+ test_mode_in_index 100644 sub-foo2
+ )
+'
+
+test_expect_success 'all statuses changed in folder if . is given' '
+ git add --chmod=+x . &&
+ test $(git ls-files --stage | grep ^100644 | wc -l) -eq 0 &&
+ git add --chmod=-x . &&
+ test $(git ls-files --stage | grep ^100755 | wc -l) -eq 0
+'
+
test_done
--
2.10.0.304.gf2ff484
^ permalink raw reply related
* Re: [PATCH v4 3/4] read-cache: introduce chmod_index_entry
From: Junio C Hamano @ 2016-09-14 21:46 UTC (permalink / raw)
To: Thomas Gummerer
Cc: git, Johannes Schindelin, Jeff King, Jan Keromnes,
Ingo Brückl, Edward Thomson
In-Reply-To: <20160914210747.15485-4-t.gummerer@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
> As there are chmod options for both add and update-index, introduce a
> new chmod_index_entry function to do the work. Use it in update-index,
> while it will be used in add in the next patch.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> ---
> builtin/update-index.c | 16 ++--------------
> cache.h | 2 ++
> read-cache.c | 29 +++++++++++++++++++++++++++++
> 3 files changed, 33 insertions(+), 14 deletions(-)
>
> diff --git a/builtin/update-index.c b/builtin/update-index.c
> index bbdf0d9..9e9e040 100644
> --- a/builtin/update-index.c
> +++ b/builtin/update-index.c
> @@ -423,26 +423,14 @@ static void chmod_path(char flip, const char *path)
> {
> ...
> - mode = ce->ce_mode;
> - if (!S_ISREG(mode))
> - goto fail;
> - switch (flip) {
> - case '+':
> - ce->ce_mode |= 0111; break;
> - case '-':
> - ce->ce_mode &= ~0111; break;
> - default:
> + if (chmod_cache_entry(ce, flip) < 0)
> goto fail;
> - }
> - cache_tree_invalidate_path(&the_index, path);
This used to always work on the default index, hence the_index
reference is here, but ...
> +int chmod_index_entry(struct index_state *istate, struct cache_entry *ce,
> + char flip)
> +{
> + if (!S_ISREG(ce->ce_mode))
> + return -1;
> + switch (flip) {
> + case '+':
> + ce->ce_mode |= 0111;
> + break;
> + case '-':
> + ce->ce_mode &= ~0111;
> + break;
> + default:
> + return -2;
> + }
> + cache_tree_invalidate_path(&the_index, ce->name);
... this one takes istate, so you need to use it, instead of the
hard-coded the_index reference.
> + ce->ce_flags |= CE_UPDATE_IN_BASE;
> + istate->cache_changed |= CE_ENTRY_CHANGED;
> +
> + return 0;
> +}
> +
> int ce_same_name(const struct cache_entry *a, const struct cache_entry *b)
> {
> int len = ce_namelen(a);
Other than that, this looks good to me.
^ permalink raw reply
* Re: [PATCH v4 4/4] add: modify already added files when --chmod is given
From: Junio C Hamano @ 2016-09-14 21:54 UTC (permalink / raw)
To: Thomas Gummerer
Cc: git, Johannes Schindelin, Jeff King, Jan Keromnes,
Ingo Brückl, Edward Thomson
In-Reply-To: <20160914210747.15485-5-t.gummerer@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
> When the chmod option was added to git add, it was hooked up to the diff
> machinery, meaning that it only works when the version in the index
> differs from the version on disk.
>
> As the option was supposed to mirror the chmod option in update-index,
> which always changes the mode in the index, regardless of the status of
> the file, make sure the option behaves the same way in git add.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> ---
This change essentially reverts most of what 4e55ed32 ("add: add
--chmod=+x / --chmod=-x options", 2016-05-31) did, except that it
keeps the command line option and adjusts its validation, and adds a
separate phase to "fix-up" the executable bits for all paths that
match the given pathspec, whether they were new or modified or
unchanged.
The patch makes sense to me. Thanks.
^ permalink raw reply
* Re: Bug
From: Dennis Kaarsemaker @ 2016-09-14 22:14 UTC (permalink / raw)
To: Mike Hawes, git; +Cc: mh351681
In-Reply-To: <B1BB8E37-C36E-4F4A-BC5F-FDA32CE162AF@gmail.com>
On Tue, 2016-09-13 at 13:18 -0400, Mike Hawes wrote:
> To whom this may concern,
>
> I found a bug in git while trying to push my website.
> I redid the process and it happened again.
> I also tried it on another computer and it happened again.
> I was wondering how to claim a bug?
Hi Mike,
When you think git does not behave as you expect, please do not stop
your bug report with just "git does not work". "I used git in this
way, but it did not work" is not much better, neither is "I used git
in this way, and X happend, which is broken". It often is that git is
correct to cause X happen in such a case, and it is your expectation
that is broken. People would not know what other result Y you expected
to see instead of X, if you left it unsaid.
Please remember to always state
- what you wanted to achieve;
- what you did (the version of git and the command sequence to reproduce
the behavior);
- what you saw happen (X above);
- what you expected to see (Y above); and
- how the last two are different.
See http://www.chiark.greenend.org.uk/~sgtatham/bugs.html for further
hints.
(The above was shamelessly copied from the "A note from the maintainer" mails)
D.
^ permalink raw reply
* Re: [PATCH 1/2] serialize collection of changed submodules
From: Junio C Hamano @ 2016-09-14 22:30 UTC (permalink / raw)
To: Heiko Voigt
Cc: Jeff King, Stefan Beller, git@vger.kernel.org, Jens Lehmann,
Fredrik Gustafsson, Leandro Lucarella
In-Reply-To: <20160914173124.GA7613@sandbox>
Heiko Voigt <hvoigt@hvoigt.net> writes:
> Sorry about the late reply. I was not able to process emails until now.
> Here are two patches that should help to improve the situation and batch
> up some processing. This one is for repositories with submodules, so
> that they do not iterate over the same submodule twice with the same
> hash.
>
> The second one will be the one people without submodules are interested
> in.
Thanks. Will take a look at later as I'm already deep in today's
integration cycle. Very much appreciated.
^ permalink raw reply
* Re: [PATCH v4 3/4] read-cache: introduce chmod_index_entry
From: Junio C Hamano @ 2016-09-14 22:54 UTC (permalink / raw)
To: Thomas Gummerer
Cc: git, Johannes Schindelin, Jeff King, Jan Keromnes,
Ingo Brückl, Edward Thomson
In-Reply-To: <xmqqbmzqqhm7.fsf@gitster.mtv.corp.google.com>
I've queued this trivial SQUASH??? on top, which I think should be
squashed into 3/4.
Thanks.
read-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/read-cache.c b/read-cache.c
index 2445e30..c2b2e97 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -779,7 +779,7 @@ int chmod_index_entry(struct index_state *istate, struct cache_entry *ce,
default:
return -2;
}
- cache_tree_invalidate_path(&the_index, ce->name);
+ cache_tree_invalidate_path(istate, ce->name);
ce->ce_flags |= CE_UPDATE_IN_BASE;
istate->cache_changed |= CE_ENTRY_CHANGED;
--
2.10.0-458-g8cce42d
^ permalink raw reply related
* Re: [PATCH] Move format-patch base commit and prerequisites before email signature
From: Junio C Hamano @ 2016-09-14 22:57 UTC (permalink / raw)
To: Josh Triplett; +Cc: Jeff King, git
In-Reply-To: <xmqq7fakai5k.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> I do not mind doing it myself, but I am already in today's
> integration cycle (which will merge a handful of topics to
> 'master'), so I won't get around to it for some time. If you are
> inclined to, please be my guest ;-)
I queued this on top for now; I think it can be just squashed into
your patch. Please say "I agree" and I'll make it happen, or say
"that's wrong" followed by a replacement patch ;-).
Thanks.
builtin/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/log.c b/builtin/log.c
index d69d5e6..cd9c4a4 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1360,7 +1360,7 @@ static void print_bases(struct base_tree_info *bases, FILE *file)
return;
/* Show the base commit */
- fprintf(file, "base-commit: %s\n", oid_to_hex(&bases->base_commit));
+ fprintf(file, "\nbase-commit: %s\n", oid_to_hex(&bases->base_commit));
/* Show the prerequisite patches */
for (i = bases->nr_patch_id - 1; i >= 0; i--)
--
2.10.0-458-g8cce42d
^ permalink raw reply related
* Re: Left with empty files after "git stash pop" when system hung
From: Jeff King @ 2016-09-14 22:58 UTC (permalink / raw)
To: Daniel Hahler; +Cc: git
In-Reply-To: <5b203a8e-faa8-9f6e-8cdd-1024194e74a3@thequod.de>
On Tue, Sep 13, 2016 at 11:39:56PM +0200, Daniel Hahler wrote:
> I have used "git stash --include-untracked", checked out another branch,
> went back, and "git stash pop"ed the changes.
> Then my system crashed/hung (music that was playing was repeated in a
> loop). I have waited for some minutes, and then turned it off.
>
> Afterwards, the repository in question was in a state where all files
> contained in the stash were empty.
> "git status" looked good on first sight: all the untracked and modified
> files were listed there; but they were empty.
>
> % git fsck --lost-found
> error: object file .git/objects/04/1e659b5dbfd3f0be351a782b54743692875aec is empty
> error: object file .git/objects/04/1e659b5dbfd3f0be351a782b54743692875aec is empty
> fatal: loose object 041e659b5dbfd3f0be351a782b54743692875aec (stored in .git/objects/04/1e659b5dbfd3f0be351a782b54743692875aec) is corrupt
> % find .git/objects -size 0|wc -l
> 12
>
> [...]
> The filesystem in question is ext4, and I am using Arch Linux.
Is your filesystem mounted with data=writeback? Git should never write
an empty object file; it writes the content to a temporary file, and
then hardlinks it into place. If your filesystem does not order data and
metadata writes (i.e., the hardlink may get journaled and picked
up, even though the data did not hit the disk), then you can end up with
empty files. If you set core.fsyncobjectfiles in your config file, then
Git will fsync each object write (at the cost of some performance).
> I would have assumed that the "stash pop" operation would be "atomic",
> i.e. it should not remove the stash object before other objects have
> been written successfully.
Stash does not remove any objects at all; it should only be updating the
stash reflog to delete the entry (which also happens via write to a
tempfile and rename, though I don't think we ever fsync it, even with
core.fsyncobjectfiles).
The empty object you found is probably the result of a write too close
to the crash. In general I wouldn't expect "stash pop" to write, but I
suspect it may in order to populate the index.
> I have removed all empty files in .git/objects and tried to find the
> previous stash with `gitk --all $( git fsck | awk '{print $3}' )` then,
> but it appears to have disappeared.
fsck won't mention the object as dangling if it's reachable from a
reflog. Did you try "git stash list" (or just "git log -g refs/stash")?
-Peff
^ permalink raw reply
* What's cooking in git.git (Sep 2016, #04; Wed, 14)
From: Junio C Hamano @ 2016-09-14 23:01 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'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
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
--------------------------------------------------
[Graduated to "master"]
* ep/use-git-trace-curl-in-tests (2016-09-07) 4 commits
(merged to 'next' on 2016-09-08 at 04372de)
+ t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var
+ t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var
+ test-lib.sh: preserve GIT_TRACE_CURL from the environment
+ t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var
Update a few tests that used to use GIT_CURL_VERBOSE to use the
newer GIT_TRACE_CURL.
* jc/am-read-author-file (2016-08-30) 1 commit
(merged to 'next' on 2016-09-08 at d2db42f)
+ am: refactor read_author_script()
Extract a small helper out of the function that reads the authors
script file "git am" internally uses.
This by itself is not useful until a second caller appears in the
future for "rebase -i" helper.
* jc/forbid-symbolic-ref-d-HEAD (2016-09-02) 1 commit
(merged to 'next' on 2016-09-08 at cd8c1b3)
+ symbolic-ref -d: do not allow removal of HEAD
"git symbolic-ref -d HEAD" happily removes the symbolic ref, but
the resulting repository becomes an invalid one. Teach the command
to forbid removal of HEAD.
* jc/submodule-anchor-git-dir (2016-09-01) 1 commit
(merged to 'next' on 2016-09-08 at b6f20cf)
+ submodule: avoid auto-discovery in prepare_submodule_repo_env()
Having a submodule whose ".git" repository is somehow corrupt
caused a few commands that recurse into submodules loop forever.
* jk/diff-submodule-diff-inline (2016-08-31) 8 commits
(merged to 'next' on 2016-09-02 at 734e42c)
+ diff: teach diff to display submodule difference with an inline diff
+ submodule: refactor show_submodule_summary with helper function
+ submodule: convert show_submodule_summary to use struct object_id *
+ allow do_submodule_path to work even if submodule isn't checked out
+ diff: prepare for additional submodule formats
+ graph: add support for --line-prefix on all graph-aware output
+ diff.c: remove output_prefix_length field
+ cache: add empty_tree_oid object and helper function
The "git diff --submodule={short,log}" mechanism has been enhanced
to allow "--submodule=diff" to show the patch between the submodule
commits bound to the superproject.
* jk/squelch-false-warning-from-gcc-o3 (2016-08-31) 2 commits
(merged to 'next' on 2016-09-08 at c9a2af6)
+ color_parse_mem: initialize "struct color" temporary
+ error_errno: use constant return similar to error()
Compilation fix.
* jk/test-lib-drop-pid-from-results (2016-08-30) 1 commit
(merged to 'next' on 2016-09-08 at 0967b0b)
+ test-lib: drop PID from test-results/*.count
The test framework left the number of tests and success/failure
count in the t/test-results directory, keyed by the name of the
test script plus the process ID. The latter however turned out not
to serve any useful purpose. The process ID part of the filename
has been removed.
* js/t6026-clean-up (2016-09-07) 1 commit
(merged to 'next' on 2016-09-08 at 5ad2fc1)
+ t6026-merge-attr: clean up background process at end of test case
A test spawned a short-lived background process, which sometimes
prevented the test directory from getting removed at the end of the
script on some platforms.
* js/t9903-chaining (2016-09-07) 1 commit
(merged to 'next' on 2016-09-08 at 162a3c9)
+ t9903: fix broken && chain
Test fix.
* rs/compat-strdup (2016-09-07) 1 commit
(merged to 'next' on 2016-09-08 at 46acfdf)
+ compat: move strdup(3) replacement to its own file
Code cleanup.
* rs/hex2chr (2016-09-07) 1 commit
(merged to 'next' on 2016-09-08 at 7266d5b)
+ introduce hex2chr() for converting two hexadecimal digits to a character
Code cleanup.
* sb/transport-report-missing-submodule-on-stderr (2016-09-08) 1 commit
(merged to 'next' on 2016-09-08 at 3550831)
+ transport: report missing submodule pushes consistently on stderr
Message cleanup.
* sb/xdiff-remove-unused-static-decl (2016-09-07) 1 commit
(merged to 'next' on 2016-09-08 at 39e41dd)
+ xdiff: remove unneeded declarations
Code cleanup.
--------------------------------------------------
[New Topics]
* et/add-chmod-x (2016-09-12) 1 commit
- add: document the chmod option
(this branch is used by tg/add-chmod+x-fix.)
"git add --chmod=+x" added recently lacked documentation, which has
been corrected.
Will merge to 'next'.
* js/libify-require-clean-work-tree (2016-09-12) 5 commits
- wt-status: teach has_{unstaged,uncommitted}_changes() about submodules
- Export also the has_un{staged,committed}_changed() functions
- Make the require_clean_work_tree() function truly reusable
- pull: make code more similar to the shell script again
- pull: drop confusing prefix parameter of die_on_unclean_work_tree()
The require_clean_work_tree() helper was recreated in C when "git
pull" was rewritten from shell; the helper is now made available to
other callers in preparation for upcoming "rebase -i" work.
Waiting for comments.
Modulo a few minor nits, this looked almost ready.
cf. <xmqqtwdl2bhm.fsf@gitster.mtv.corp.google.com>
cf. <xmqqpoo92bdr.fsf@gitster.mtv.corp.google.com>
* ks/perf-build-with-autoconf (2016-09-13) 1 commit
- t/perf/run: Don't forget to copy config.mak.autogen & friends
Performance tests done via "t/perf" did not use the same set of
build configuration if the user relied on autoconf generated
configuration.
Will merge to 'next'.
* tg/add-chmod+x-fix (2016-09-14) 5 commits
- SQUASH???
- add: modify already added files when --chmod is given
- read-cache: introduce chmod_index_entry
- update-index: add test for chmod flags
- Merge branch 'ib/t3700-add-chmod-x-updates' into tg/add-chmod+x-fix
(this branch uses et/add-chmod-x.)
"git add --chmod=+x <pathspec>" added recently only toggled the
executable bit for paths that are either new or modified. This has
been corrected to flip the executable bit for all paths that match
the given pathspec.
Waiting for an ack for SQUASH???
* bw/ls-files-recurse-submodules (2016-09-13) 3 commits
- SQUASH??? Undecided
- SQUASH???
- ls-files: adding support for submodules
"git ls-files" learned "--recurse-submodules" option that can be
used to get a listing of tracked files across submodules (i.e. this
only works with "--cached" option, not for listing untracked or
ignored files). This would be a useful tool to sit on the upstream
side of a pipe that is read with xargs to work on all working tree
files from the top-level superproject.
Waiting for the discussion to conclude.
* bw/pathspec-remove-unused-extern-decl (2016-09-13) 1 commit
- pathspec: remove unnecessary function prototypes
Code cleanup.
Will merge to 'next'.
* ew/http-do-not-forget-to-call-curl-multi-remove-handle (2016-09-13) 3 commits
- http: always remove curl easy from curlm session on release
- http: consolidate #ifdefs for curl_multi_remove_handle
- http: warn on curl_multi_add_handle failures
The http transport (with curl-multi option, which is the default
these days) failed to remove curl-easy handle from a curlm session,
which led to unnecessary API failures.
Will merge to 'next'.
* jk/delta-base-cache (2016-09-12) 1 commit
- add_delta_base_cache: use list_for_each_safe
Recently we updated the code to manage the in-core cache that holds
objects that have recently been used to reconstitute other objects
that are stored as deltas against them, but the update used an
incorrect API function to manage the list of these objects. This
has been fixed.
Will merge to 'next'.
This is a last-minute fix to a topic that graduated to 'master'
post 2.10 release.
* jk/setup-sequence-update (2016-09-13) 16 commits
- t1007: factor out repeated setup
- init: reset cached config when entering new repo
- init: expand comments explaining config trickery
- config: only read .git/config from configured repos
- test-config: setup git directory
- t1302: use "git -C"
- pager: handle early config
- pager: use callbacks instead of configset
- pager: make pager_program a file-local static
- pager: stop loading git_default_config()
- pager: remove obsolete comment
- diff: always try to set up the repository
- diff: handle --no-index prefixes consistently
- diff: skip implicit no-index check when given --no-index
- patch-id: use RUN_SETUP_GENTLY
- hash-object: always try to set up the git repository
There were numerous corner cases in which the configuration files
are read and used or not read at all depending on the directory a
Git command was run, leading to inconsistent behaviour. The code
to set-up repository access at the beginning of a Git process has
been updated to fix them.
Will merge to 'next'.
* ls/filter-process (2016-09-13) 10 commits
- convert: add filter.<driver>.process option
- convert: make apply_filter() adhere to standard Git error handling
- convert: modernize tests
- convert: quote filter names in error messages
- pkt-line: add functions to read/write flush terminated packet streams
- pkt-line: add packet_write_gently()
- pkt-line: add packet_flush_gently()
- pkt-line: add packet_write_fmt_gently()
- pkt-line: extract set_packet_header()
- pkt-line: rename packet_write() to packet_write_fmt()
The smudge/clean filter API expect an external process is spawned
to filter the contents for each path that has a filter defined. A
new type of "process" filter API has been added to allow the first
request to run the filter for a path to spawn a single process, and
all filtering need is served by this single process for multiple
paths, reducing the process creation overhead.
Waiting for the discussion to conclude.
cf. <20160910062919.GB11001@tb-raspi> etc.
* rs/checkout-some-states-are-const (2016-09-13) 1 commit
- checkout: constify parameters of checkout_stage() and checkout_merged()
Code cleanup.
Will merge to 'next'.
* rs/pack-sort-with-llist-mergesort (2016-09-13) 1 commit
- sha1_file: use llist_mergesort() for sorting packs
Code cleanup.
Will merge to 'next'.
* rs/strbuf-remove-fix (2016-09-13) 1 commit
- strbuf: use valid pointer in strbuf_remove()
Code cleanup.
Will merge to 'next'.
* rs/unpack-trees-reduce-file-scope-global (2016-09-13) 1 commit
- unpack-trees: pass checkout state explicitly to check_updates()
Code cleanup.
Will merge to 'next'.
* mr/vcs-svn-printf-ulong (2016-09-14) 1 commit
- vcs-svn/fast_export: fix timestamp fmt specifiers
Code cleanup.
Will merge to 'next'.
* hv/submodule-not-yet-pushed-fix (2016-09-14) 2 commits
- serialize collection of refs that contain submodule changes
- serialize collection of changed submodules
--------------------------------------------------
[Stalled]
* jc/bundle (2016-03-03) 6 commits
- index-pack: --clone-bundle option
- Merge branch 'jc/index-pack' into jc/bundle
- bundle v3: the beginning
- bundle: keep a copy of bundle file name in the in-core bundle header
- bundle: plug resource leak
- bundle doc: 'verify' is not about verifying the bundle
The beginning of "split bundle", which could be one of the
ingredients to allow "git clone" traffic off of the core server
network to CDN.
While I think it would make it easier for people to experiment and
build on if the topic is merged to 'next', I am at the same time a
bit reluctant to merge an unproven new topic that introduces a new
file format, which we may end up having to support til the end of
time. It is likely that to support a "prime clone from CDN", it
would need a lot more than just "these are the heads and the pack
data is over there", so this may not be sufficient.
Will discard.
* jc/blame-reverse (2016-06-14) 2 commits
- blame: dwim "blame --reverse OLD" as "blame --reverse OLD.."
- blame: improve diagnosis for "--reverse NEW"
It is a common mistake to say "git blame --reverse OLD path",
expecting that the command line is dwimmed as if asking how lines
in path in an old revision OLD have survived up to the current
commit.
Has been waiting for positive responses without seeing any.
Will discard.
* jc/attr (2016-05-25) 18 commits
- attr: support quoting pathname patterns in C style
- attr: expose validity check for attribute names
- attr: add counted string version of git_attr()
- attr: add counted string version of git_check_attr()
- attr: retire git_check_attrs() API
- attr: convert git_check_attrs() callers to use the new API
- attr: convert git_all_attrs() to use "struct git_attr_check"
- attr: (re)introduce git_check_attr() and struct git_attr_check
- attr: rename function and struct related to checking attributes
- attr.c: plug small leak in parse_attr_line()
- attr.c: tighten constness around "git_attr" structure
- attr.c: simplify macroexpand_one()
- attr.c: mark where #if DEBUG ends more clearly
- attr.c: complete a sentence in a comment
- attr.c: explain the lack of attr-name syntax check in parse_attr()
- attr.c: update a stale comment on "struct match_attr"
- attr.c: use strchrnul() to scan for one line
- commit.c: use strchrnul() to scan for one line
(this branch is used by jc/attr-more, sb/pathspec-label and sb/submodule-default-paths.)
The attributes API has been updated so that it can later be
optimized using the knowledge of which attributes are queried.
I wanted to polish this topic further to make the attribute
subsystem thread-ready, but because other topics depend on this
topic and they do not (yet) need it to be thread-ready.
As the authors of topics that depend on this seem not in a hurry,
let's discard this and dependent topics and restart them some other
day.
Will discard.
* jc/attr-more (2016-06-09) 8 commits
- attr.c: outline the future plans by heavily commenting
- attr.c: always pass check[] to collect_some_attrs()
- attr.c: introduce empty_attr_check_elems()
- attr.c: correct ugly hack for git_all_attrs()
- attr.c: rename a local variable check
- fixup! d5ad6c13
- attr.c: pass struct git_attr_check down the callchain
- attr.c: add push_stack() helper
(this branch uses jc/attr; is tangled with sb/pathspec-label and sb/submodule-default-paths.)
The beginning of long and tortuous journey to clean-up attribute
subsystem implementation.
Needs to be redone.
Will discard.
* sb/submodule-default-paths (2016-06-20) 5 commits
- completion: clone can recurse into submodules
- clone: add --init-submodule=<pathspec> switch
- submodule update: add `--init-default-path` switch
- Merge branch 'sb/pathspec-label' into sb/submodule-default-paths
- Merge branch 'jc/attr' into sb/submodule-default-paths
(this branch uses jc/attr and sb/pathspec-label; is tangled with jc/attr-more.)
Allow specifying the set of submodules the user is interested in on
the command line of "git clone" that clones the superproject.
Will discard.
* sb/pathspec-label (2016-06-03) 6 commits
- pathspec: disable preload-index when attribute pathspec magic is in use
- pathspec: allow escaped query values
- pathspec: allow querying for attributes
- pathspec: move prefix check out of the inner loop
- pathspec: move long magic parsing out of prefix_pathspec
- Documentation: fix a typo
(this branch is used by sb/submodule-default-paths; uses jc/attr; is tangled with jc/attr-more.)
The pathspec mechanism learned ":(attr:X)$pattern" pathspec magic
to limit paths that match $pattern further by attribute settings.
The preload-index mechanism is disabled when the new pathspec magic
is in use (at least for now), because the attribute subsystem is
not thread-ready.
Will discard.
* mh/connect (2016-06-06) 10 commits
- connect: [host:port] is legacy for ssh
- connect: move ssh command line preparation to a separate function
- connect: actively reject git:// urls with a user part
- connect: change the --diag-url output to separate user and host
- connect: make parse_connect_url() return the user part of the url as a separate value
- connect: group CONNECT_DIAG_URL handling code
- connect: make parse_connect_url() return separated host and port
- connect: re-derive a host:port string from the separate host and port variables
- connect: call get_host_and_port() earlier
- connect: document why we sometimes call get_port after get_host_and_port
Rewrite Git-URL parsing routine (hopefully) without changing any
behaviour.
It has been two months without any support. We may want to discard
this.
* sb/bisect (2016-04-15) 22 commits
. SQUASH???
. bisect: get back halfway shortcut
. bisect: compute best bisection in compute_relevant_weights()
. bisect: use a bottom-up traversal to find relevant weights
. bisect: prepare for different algorithms based on find_all
. bisect: rename count_distance() to compute_weight()
. bisect: make total number of commits global
. bisect: introduce distance_direction()
. bisect: extract get_distance() function from code duplication
. bisect: use commit instead of commit list as arguments when appropriate
. bisect: replace clear_distance() by unique markers
. bisect: use struct node_data array instead of int array
. bisect: get rid of recursion in count_distance()
. bisect: make algorithm behavior independent of DEBUG_BISECT
. bisect: make bisect compile if DEBUG_BISECT is set
. bisect: plug the biggest memory leak
. bisect: add test for the bisect algorithm
. t6030: generalize test to not rely on current implementation
. t: use test_cmp_rev() where appropriate
. t/test-lib-functions.sh: generalize test_cmp_rev
. bisect: allow 'bisect run' if no good commit is known
. bisect: write about `bisect next` in documentation
The internal algorithm used in "git bisect" to find the next commit
to check has been optimized greatly.
Was expecting a reroll, but now pb/bisect topic starts removinging
more and more parts from git-bisect.sh, this needs to see a fresh
reroll.
Will discard.
cf. <1460294354-7031-1-git-send-email-s-beyer@gmx.net>
* sg/completion-updates (2016-02-28) 21 commits
. completion: cache the path to the repository
. completion: extract repository discovery from __gitdir()
. completion: don't guard git executions with __gitdir()
. completion: consolidate silencing errors from git commands
. completion: don't use __gitdir() for git commands
. completion: respect 'git -C <path>'
. completion: fix completion after 'git -C <path>'
. completion: don't offer commands when 'git --opt' needs an argument
. rev-parse: add '--absolute-git-dir' option
. completion: list short refs from a remote given as a URL
. completion: don't list 'HEAD' when trying refs completion outside of a repo
. completion: list refs from remote when remote's name matches a directory
. completion: respect 'git --git-dir=<path>' when listing remote refs
. completion: fix most spots not respecting 'git --git-dir=<path>'
. completion: ensure that the repository path given on the command line exists
. completion tests: add tests for the __git_refs() helper function
. completion tests: check __gitdir()'s output in the error cases
. completion tests: consolidate getting path of current working directory
. completion tests: make the $cur variable local to the test helper functions
. completion tests: don't add test cruft to the test repository
. completion: improve __git_refs()'s in-code documentation
Has been waiting for a reroll for too long.
cf. <1456754714-25237-1-git-send-email-szeder@ira.uka.de>
Will discard.
* ec/annotate-deleted (2015-11-20) 1 commit
- annotate: skip checking working tree if a revision is provided
Usability fix for annotate-specific "<file> <rev>" syntax with deleted
files.
Has been waiting for a review for too long without seeing anything.
Will discard.
* dk/gc-more-wo-pack (2016-01-13) 4 commits
- gc: clean garbage .bitmap files from pack dir
- t5304: ensure non-garbage files are not deleted
- t5304: test .bitmap garbage files
- prepare_packed_git(): find more garbage
Follow-on to dk/gc-idx-wo-pack topic, to clean up stale
.bitmap and .keep files.
Has been waiting for a reroll for too long.
cf. <xmqq60ypbeng.fsf@gitster.mtv.corp.google.com>
Will discard.
* jc/diff-b-m (2015-02-23) 5 commits
. WIPWIP
. WIP: diff-b-m
- diffcore-rename: allow easier debugging
- diffcore-rename.c: add locate_rename_src()
- diffcore-break: allow debugging
"git diff -B -M" produced incorrect patch when the postimage of a
completely rewritten file is similar to the preimage of a removed
file; such a resulting file must not be expressed as a rename from
other place.
The fix in this patch is broken, unfortunately.
Will discard.
--------------------------------------------------
[Cooking]
* jk/patch-ids-no-merges (2016-09-12) 2 commits
- patch-ids: refuse to compute patch-id for merge commit
- patch-ids: turn off rename detection
"git log --cherry-pick" used to include merge commits as candidates
to be matched up with other commits, resulting a lot of wasted time.
The patch-id generation logic has been updated to ignore merges to
avoid the wastage.
Will merge to 'next'.
* js/git-gui-commit-gpgsign (2016-09-11) 2 commits
(merged to 'next' on 2016-09-12 at 05350ab)
+ Merge branch 'js/commit-gpgsign' of ../git-gui into js/git-gui-commit-gpgsign
+ git-gui: respect commit.gpgsign again
"git commit-tree" stopped reading commit.gpgsign configuration
variable that was meant for Porcelain "git commit" in Git 2.9; we
forgot to update "git gui" to look at the configuration to match
this change.
Will merge to 'master'.
* bc/object-id (2016-09-07) 20 commits
- builtin/reset: convert to use struct object_id
- builtin/commit-tree: convert to struct object_id
- builtin/am: convert to struct object_id
- refs: add an update_ref_oid function.
- sha1_name: convert get_sha1_mb to struct object_id
- builtin/update-index: convert file to struct object_id
- notes: convert init_notes to use struct object_id
- builtin/rm: convert to use struct object_id
- builtin/blame: convert file to use struct object_id
- Convert read_mmblob to take struct object_id.
- notes-merge: convert struct notes_merge_pair to struct object_id
- builtin/checkout: convert some static functions to struct object_id
- streaming: make stream_blob_to_fd take struct object_id
- builtin: convert textconv_object to use struct object_id
- builtin/cat-file: convert some static functions to struct object_id
- builtin/cat-file: convert struct expand_data to use struct object_id
- builtin/log: convert some static functions to use struct object_id
- builtin/blame: convert struct origin to use struct object_id
- builtin/apply: convert static functions to struct object_id
- cache: convert struct cache_entry to use struct object_id
The "unsigned char sha1[20]" to "struct object_id" conversion
continues. Notable changes in this round includes that ce->sha1,
i.e. the object name recorded in the cache_entry, turns into an
object_id.
It had merge conflicts with a few topics in flight (Christian's
"apply.c split", Dscho's "cat-file --filters" and Jeff Hostetler's
"status --porcelain-v2"). Extra sets of eyes double-checking for
mismerges are highly appreciated.
Will merge to 'next'.
* jk/pack-tag-of-tag (2016-09-07) 5 commits
(merged to 'next' on 2016-09-12 at 62c62c0)
+ pack-objects: walk tag chains for --include-tag
+ t5305: simplify packname handling
+ t5305: use "git -C"
+ t5305: drop "dry-run" of unpack-objects
+ t5305: move cleanup into test block
"git pack-objects --include-tag" was taught that when we know that
we are sending an object C, we want a tag B that directly points at
C but also a tag A that points at the tag B. We used to miss the
intermediate tag B in some cases.
Will merge to 'master'.
* jt/accept-capability-advertisement-when-fetching-from-void (2016-09-09) 3 commits
- connect: advertized capability is not a ref
- connect: tighten check for unexpected early hang up
- tests: move test_lazy_prereq JGIT to test-lib.sh
JGit can show a fake ref "capabilities^{}" to "git fetch" when it
does not advertise any refs, but "git fetch" was not prepared to
see such an advertisement. When the other side disconnects without
giving any ref advertisement, we used to say "there may not be a
repository at that URL", but we may have seen other advertisement
like "shallow" and ".have" in which case we definitely know that a
repository is there. The code to detect this case has also been
updated.
Will merge to 'next'.
* rt/rebase-i-broken-insn-advise (2016-09-07) 1 commit
- rebase -i: improve advice on bad instruction lines
When "git rebase -i" is given a broken instruction, it told the
user to fix it with "--edit-todo", but didn't say what the step
after that was (i.e. "--continue").
Will hold.
Dscho's "rebase -i" hopefully will become available in 'pu', by
which time an equivalent of this fix would be ported to C. This is
queued merely as a reminder.
* sy/git-gui-i18n-ja (2016-09-07) 7 commits
(merged to 'next' on 2016-09-12 at 4a701c2)
+ Merge branch 'sy/i18n' of git-gui
+ git-gui: update Japanese information
+ git-gui: update Japanese translation
+ git-gui: add Japanese language code
+ git-gui: apply po template to Japanese translation
+ git-gui: consistently use the same word for "blame" in Japanese
+ git-gui: consistently use the same word for "remote" in Japanese
Update Japanese translation for "git-gui".
Will merge to 'master'.
* ah/misc-message-fixes (2016-09-08) 5 commits
(merged to 'next' on 2016-09-12 at a113aea)
+ unpack-trees: do not capitalize "working"
+ git-merge-octopus: do not capitalize "octopus"
+ git-rebase--interactive: fix English grammar
+ cat-file: put spaces around pipes in usage string
+ am: put spaces around pipe in usage string
Message cleanup.
Will merge to 'master'.
* jk/fix-remote-curl-url-wo-proto (2016-09-08) 1 commit
(merged to 'next' on 2016-09-12 at 7845867)
+ remote-curl: handle URLs without protocol
"git fetch http::/site/path" did not die correctly and segfaulted
instead.
Will merge to 'master'.
* jt/format-patch-base-info-above-sig (2016-09-14) 2 commits
- SQUASH???
- format-patch: show base info before email signature
"git format-patch --base=..." feature that was recently added
showed the base commit information after "-- " e-mail signature
line, which turned out to be inconvenient. The base information
has been moved above the signature line.
Waiting for an ack for SQUASH???
* nd/checkout-disambiguation (2016-09-09) 4 commits
- fixup! checkout.txt: document a common case that ignores ambiguation rules
- checkout: fix ambiguity check in subdir
- checkout.txt: document a common case that ignores ambiguation rules
- checkout: add some spaces between code and comment
"git checkout <word>" does not follow the usual disambiguation
rules when the <word> can be both a rev and a path, to allow
checking out a branch 'foo' in a project that happens to have a
file 'foo' in the working tree without having to disambiguate.
This was poorly documented and the check was incorrect when the
command was run from a subdirectory.
Waiting for an Ack for fixup!
* sb/diff-cleanup (2016-09-08) 3 commits
(merged to 'next' on 2016-09-12 at 5d16b28)
+ diff: remove dead code
+ diff: omit found pointer from emit_callback
+ diff.c: use diff_options directly
Code cleanup.
Will merge to 'master'.
* sg/fix-versioncmp-with-common-suffix (2016-09-08) 5 commits
- versioncmp: cope with common leading parts in versionsort.prereleaseSuffix
- versioncmp: pass full tagnames to swap_prereleases()
- t7004-tag: add version sort tests to show prerelease reordering issues
- t7004-tag: use test_config helper
- t7004-tag: delete unnecessary tags with test_when_finished
The prereleaseSuffix feature of version comparison that is used in
"git tag -l" did not correctly when two or more prereleases for the
same release were present (e.g. when 2.0, 2.0-beta1, and 2.0-beta2
are there and the code needs to compare 2.0-beta1 and 2.0-beta2).
Waiting for a reroll.
cf. <20160908223727.Horde.jVOOJ278ssZ3qkyjkmyqZD-@webmail.informatik.kit.edu>
* va/i18n (2016-09-11) 11 commits
- i18n: update-index: mark warning for translation
- i18n: show-branch: mark error messages for translation
- i18n: receive-pack: mark messages for translation
- notes: downcase the first word of error messages
- i18n: notes: mark error messages for translation
- i18n: merge-recursive: mark verbose message for translation
- i18n: merge-recursive: mark error messages for translation
- i18n: config: mark error message for translation
- i18n: branch: mark option description for translation
- SQUASH???
- i18n: blame: mark error messages for translation
More i18n.
Waiting for a reroll.
Some of them need to use Q_(); even when they always show numbers
that are greater than 1, some languages have different plural forms.
cf. <17140652.xHVhzLXte8@cayenne> etc.
* js/sequencer-wo-die (2016-09-09) 17 commits
(merged to 'next' on 2016-09-12 at d2154ea)
+ sequencer: ensure to release the lock when we could not read the index
+ sequencer: lib'ify checkout_fast_forward()
+ sequencer: lib'ify fast_forward_to()
+ sequencer: lib'ify save_opts()
+ sequencer: lib'ify save_todo()
+ sequencer: lib'ify save_head()
+ sequencer: lib'ify create_seq_dir()
+ sequencer: lib'ify read_populate_opts()
+ sequencer: lib'ify read_populate_todo()
+ sequencer: lib'ify read_and_refresh_cache()
+ sequencer: lib'ify prepare_revs()
+ sequencer: lib'ify walk_revs_populate_todo()
+ sequencer: lib'ify do_pick_commit()
+ sequencer: lib'ify do_recursive_merge()
+ sequencer: lib'ify write_message()
+ sequencer: do not die() in do_pick_commit()
+ sequencer: lib'ify sequencer_pick_revisions()
Lifts calls to exit(2) and die() higher in the callchain in
sequencer.c files so that more helper functions in it can be used
by callers that want to handle error conditions themselves.
Will merge to 'master'.
* cp/completion-negative-refs (2016-08-24) 1 commit
- completion: support excluding refs
The command-line completion script (in contrib/) learned to
complete "git cmd ^mas<HT>" to complete the negative end of
reference to "git cmd ^master".
Needs review.
* js/cat-file-filters (2016-09-11) 4 commits
- cat-file: support --textconv/--filters in batch mode
- cat-file --textconv/--filters: allow specifying the path separately
- cat-file: introduce the --filters option
- cat-file: fix a grammo in the man page
Even though "git hash-objects", which is a tool to take an
on-filesystem data stream and put it into the Git object store,
allowed to perform the "outside-world-to-Git" conversions (e.g.
end-of-line conversions and application of the clean-filter), and
it had the feature on by default from very early days, its reverse
operation "git cat-file", which takes an object from the Git object
store and externalize for the consumption by the outside world,
lacked an equivalent mechanism to run the "Git-to-outside-world"
conversion. The command learned the "--filters" option to do so.
Will merge to 'next'.
* sb/push-make-submodule-check-the-default (2016-08-24) 1 commit
- push: change submodule default to check
Turn the default of "push.recurseSubmodules" to "check".
Alas, this reveals that the "check" mode is too inefficient to use
in real projects, even in ones as small as git itself.
cf. <xmqqh9aaot49.fsf@gitster.mtv.corp.google.com>
* ak/curl-imap-send-explicit-scheme (2016-08-17) 1 commit
- imap-send: Tell cURL to use imap:// or imaps://
When we started cURL to talk to imap server when a new enough
version of cURL library is available, we forgot to explicitly add
imap(s):// before the destination. To some folks, that didn't work
and the library tried to make HTTP(s) requests instead.
Needs review and testing.
* jk/reduce-gc-aggressive-depth (2016-08-11) 1 commit
(merged to 'next' on 2016-08-11 at 6810c6f)
+ gc: default aggressive depth to 50
"git gc --aggressive" used to limit the delta-chain length to 250,
which is way too deep for gaining additional space savings and is
detrimental for runtime performance. The limit has been reduced to
50.
Will hold to see if people scream.
* ks/pack-objects-bitmap (2016-09-12) 2 commits
- pack-objects: use reachability bitmap index when generating non-stdout pack
- pack-objects: respect --local/--honor-pack-keep/--incremental when bitmap is in use
Some codepaths in "git pack-objects" were not ready to use an
existing pack bitmap; now they are and as the result they have
become faster.
Will merge to 'next'.
* mh/diff-indent-heuristic (2016-09-07) 9 commits
- SQAUSH???
- blame: honor the diff heuristic options and config
- parse-options: add parse_opt_unknown_cb()
- diff: improve positioning of add/delete blocks in diffs
- xdl_change_compact(): introduce the concept of a change group
- recs_match(): take two xrecord_t pointers as arguments
- is_blank_line(): take a single xrecord_t as argument
- xdl_change_compact(): only use heuristic if group can't be matched
- xdl_change_compact(): fix compaction heuristic to adjust ixo
Output from "git diff" can be made easier to read by selecting
which lines are common and which lines are added/deleted
intelligently when the lines before and after the changed section
are the same. A command line option is added to help with the
experiment to find a good heuristics.
Waiting for an ack to SQUASH??? Otherwise looked OK.
* cc/apply-am (2016-09-07) 41 commits
(merged to 'next' on 2016-09-12 at 854edde)
+ builtin/am: use apply API in run_apply()
+ apply: learn to use a different index file
+ apply: pass apply state to build_fake_ancestor()
+ apply: refactor `git apply` option parsing
+ apply: change error_routine when silent
+ usage: add get_error_routine() and get_warn_routine()
+ usage: add set_warn_routine()
+ apply: don't print on stdout in verbosity_silent mode
+ apply: make it possible to silently apply
+ apply: use error_errno() where possible
+ apply: make some parsing functions static again
+ apply: move libified code from builtin/apply.c to apply.{c,h}
+ apply: rename and move opt constants to apply.h
+ builtin/apply: rename option parsing functions
+ builtin/apply: make create_one_file() return -1 on error
+ builtin/apply: make try_create_file() return -1 on error
+ builtin/apply: make write_out_results() return -1 on error
+ builtin/apply: make write_out_one_result() return -1 on error
+ builtin/apply: make create_file() return -1 on error
+ builtin/apply: make add_index_file() return -1 on error
+ builtin/apply: make add_conflicted_stages_file() return -1 on error
+ builtin/apply: make remove_file() return -1 on error
+ builtin/apply: make build_fake_ancestor() return -1 on error
+ builtin/apply: change die_on_unsafe_path() to check_unsafe_path()
+ builtin/apply: make gitdiff_*() return -1 on error
+ builtin/apply: make gitdiff_*() return 1 at end of header
+ builtin/apply: make parse_traditional_patch() return -1 on error
+ builtin/apply: make apply_all_patches() return 128 or 1 on error
+ builtin/apply: move check_apply_state() to apply.c
+ builtin/apply: make check_apply_state() return -1 instead of die()ing
+ apply: make init_apply_state() return -1 instead of exit()ing
+ builtin/apply: move init_apply_state() to apply.c
+ builtin/apply: make parse_ignorewhitespace_option() return -1 instead of die()ing
+ builtin/apply: make parse_whitespace_option() return -1 instead of die()ing
+ builtin/apply: make parse_single_patch() return -1 on error
+ builtin/apply: make parse_chunk() return a negative integer on error
+ builtin/apply: make find_header() return -128 instead of die()ing
+ builtin/apply: read_patch_file() return -1 instead of die()ing
+ builtin/apply: make apply_patch() return -1 or -128 instead of die()ing
+ apply: move 'struct apply_state' to apply.h
+ apply: make some names more specific
"git am" has been taught to make an internal call to "git apply"'s
innards without spawning the latter as a separate process.
Will merge to 'master'.
* jk/pack-objects-optim-mru (2016-08-11) 4 commits
(merged to 'next' on 2016-08-11 at c0a7dae)
+ pack-objects: use mru list when iterating over packs
+ pack-objects: break delta cycles before delta-search phase
+ sha1_file: make packed_object_info public
+ provide an initializer for "struct object_info"
"git pack-objects" in a repository with many packfiles used to
spend a lot of time looking for/at objects in them; the accesses to
the packfiles are now optimized by checking the most-recently-used
packfile first.
Will hold to see if people scream.
* jk/rebase-i-drop-ident-check (2016-07-29) 1 commit
(merged to 'next' on 2016-08-14 at 6891bcd)
+ rebase-interactive: drop early check for valid ident
Even when "git pull --rebase=preserve" (and the underlying "git
rebase --preserve") can complete without creating any new commit
(i.e. fast-forwards), it still insisted on having a usable ident
information (read: user.email is set correctly), which was less
than nice. As the underlying commands used inside "git rebase"
would fail with a more meaningful error message and advice text
when the bogus ident matters, this extra check was removed.
Will hold to see if people scream.
cf. <20160729224944.GA23242@sigill.intra.peff.net>
* dp/autoconf-curl-ssl (2016-06-28) 1 commit
- ./configure.ac: detect SSL in libcurl using curl-config
The ./configure script generated from configure.ac was taught how
to detect support of SSL by libcurl better.
Needs review.
* jc/pull-rebase-ff (2016-07-28) 1 commit
- pull: fast-forward "pull --rebase=true"
"git pull --rebase", when there is no new commits on our side since
we forked from the upstream, should be able to fast-forward without
invoking "git rebase", but it didn't.
Needs a real log message and a few tests.
* ex/deprecate-empty-pathspec-as-match-all (2016-06-22) 1 commit
(merged to 'next' on 2016-07-13 at d9ca7fb)
+ pathspec: warn on empty strings as pathspec
An empty string used as a pathspec element has always meant
'everything matches', but it is too easy to write a script that
finds a path to remove in $path and run 'git rm "$paht"', which
ends up removing everything. Start warning about this use of an
empty string used for 'everything matches' and ask users to use a
more explicit '.' for that instead.
The hope is that existing users will not mind this change, and
eventually the warning can be turned into a hard error, upgrading
the deprecation into removal of this (mis)feature.
Will hold to see if people scream.
* mh/ref-store (2016-09-09) 38 commits
(merged to 'next' on 2016-09-12 at 1b0bd3c)
+ refs: implement iteration over only per-worktree refs
+ refs: make lock generic
+ refs: add method to rename refs
+ refs: add methods to init refs db
+ refs: make delete_refs() virtual
+ refs: add method for initial ref transaction commit
+ refs: add methods for reflog
+ refs: add method iterator_begin
+ files_ref_iterator_begin(): take a ref_store argument
+ split_symref_update(): add a files_ref_store argument
+ lock_ref_sha1_basic(): add a files_ref_store argument
+ lock_ref_for_update(): add a files_ref_store argument
+ commit_ref_update(): add a files_ref_store argument
+ lock_raw_ref(): add a files_ref_store argument
+ repack_without_refs(): add a files_ref_store argument
+ refs: make peel_ref() virtual
+ refs: make create_symref() virtual
+ refs: make pack_refs() virtual
+ refs: make verify_refname_available() virtual
+ refs: make read_raw_ref() virtual
+ resolve_gitlink_ref(): rename path parameter to submodule
+ resolve_gitlink_ref(): avoid memory allocation in many cases
+ resolve_gitlink_ref(): implement using resolve_ref_recursively()
+ resolve_ref_recursively(): new function
+ read_raw_ref(): take a (struct ref_store *) argument
+ resolve_gitlink_packed_ref(): remove function
+ resolve_packed_ref(): rename function from resolve_missing_loose_ref()
+ refs: reorder definitions
+ refs: add a transaction_commit() method
+ {lock,commit,rollback}_packed_refs(): add files_ref_store arguments
+ resolve_missing_loose_ref(): add a files_ref_store argument
+ get_packed_ref(): add a files_ref_store argument
+ add_packed_ref(): add a files_ref_store argument
+ refs: create a base class "ref_store" for files_ref_store
+ refs: add a backend method structure
+ refs: rename struct ref_cache to files_ref_store
+ rename_ref_available(): add docstring
+ resolve_gitlink_ref(): eliminate temporary variable
The ref-store abstraction was introduced to the refs API so that we
can plug in different backends to store references.
Will merge to 'master'.
* nd/shallow-deepen (2016-06-13) 27 commits
- fetch, upload-pack: --deepen=N extends shallow boundary by N commits
- upload-pack: add get_reachable_list()
- upload-pack: split check_unreachable() in two, prep for get_reachable_list()
- t5500, t5539: tests for shallow depth excluding a ref
- clone: define shallow clone boundary with --shallow-exclude
- fetch: define shallow boundary with --shallow-exclude
- upload-pack: support define shallow boundary by excluding revisions
- refs: add expand_ref()
- t5500, t5539: tests for shallow depth since a specific date
- clone: define shallow clone boundary based on time with --shallow-since
- fetch: define shallow boundary with --shallow-since
- upload-pack: add deepen-since to cut shallow repos based on time
- shallow.c: implement a generic shallow boundary finder based on rev-list
- fetch-pack: use a separate flag for fetch in deepening mode
- fetch-pack.c: mark strings for translating
- fetch-pack: use a common function for verbose printing
- fetch-pack: use skip_prefix() instead of starts_with()
- upload-pack: move rev-list code out of check_non_tip()
- upload-pack: make check_non_tip() clean things up on error
- upload-pack: tighten number parsing at "deepen" lines
- upload-pack: use skip_prefix() instead of starts_with()
- upload-pack: move "unshallow" sending code out of deepen()
- upload-pack: remove unused variable "backup"
- upload-pack: move "shallow" sending code out of deepen()
- upload-pack: move shallow deepen code out of receive_needs()
- transport-helper.c: refactor set_helper_option()
- remote-curl.c: convert fetch_git() to use argv_array
The existing "git fetch --depth=<n>" option was hard to use
correctly when making the history of an existing shallow clone
deeper. A new option, "--deepen=<n>", has been added to make this
easier to use. "git clone" also learned "--shallow-since=<date>"
and "--shallow-exclude=<tag>" options to make it easier to specify
"I am interested only in the recent N months worth of history" and
"Give me only the history since that version".
Needs review.
Rerolled. What this topic attempts to achieve is worthwhile, I
would think.
* pb/bisect (2016-08-23) 27 commits
. bisect--helper: remove the dequote in bisect_start()
. bisect--helper: retire `--bisect-auto-next` subcommand
. bisect--helper: retire `--bisect-autostart` subcommand
. bisect--helper: retire `--check-and-set-terms` subcommand
. bisect--helper: retire `--bisect-write` subcommand
. bisect--helper: `bisect_replay` shell function in C
. bisect--helper: `bisect_log` shell function in C
. bisect--helper: retire `--write-terms` subcommand
. bisect--helper: retire `--check-expected-revs` subcommand
. bisect--helper: `bisect_state` & `bisect_head` shell function in C
. bisect--helper: `bisect_autostart` shell function in C
. bisect--helper: retire `--next-all` subcommand
. bisect--helper: retire `--bisect-clean-state` subcommand
. bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C
. bisect--helper: `bisect_start` shell function partially in C
. bisect--helper: `get_terms` & `bisect_terms` shell function in C
. bisect--helper: `bisect_next_check` & bisect_voc shell function in C
. bisect--helper: `check_and_set_terms` shell function in C
. bisect--helper: `bisect_write` shell function in C
. bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C
. bisect--helper: `bisect_reset` shell function in C
. wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()
. t6030: explicitly test for bisection cleanup
. bisect--helper: `bisect_clean_state` shell function in C
. bisect--helper: `write_terms` shell function in C
. bisect: rewrite `check_term_format` shell function in C
. bisect--helper: use OPT_CMDMODE instead of OPT_BOOL
GSoC "bisect" topic.
I'd prefer to see early part solidified so that reviews can focus
on the later part that is still in flux. We are almost there but
not quite yet.
* kn/ref-filter-branch-list (2016-05-17) 17 commits
- branch: implement '--format' option
- branch: use ref-filter printing APIs
- branch, tag: use porcelain output
- ref-filter: allow porcelain to translate messages in the output
- ref-filter: add `:dir` and `:base` options for ref printing atoms
- ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()
- ref-filter: introduce symref_atom_parser() and refname_atom_parser()
- ref-filter: introduce refname_atom_parser_internal()
- ref-filter: make "%(symref)" atom work with the ':short' modifier
- ref-filter: add support for %(upstream:track,nobracket)
- ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams
- ref-filter: introduce format_ref_array_item()
- ref-filter: move get_head_description() from branch.c
- ref-filter: modify "%(objectname:short)" to take length
- ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>)
- ref-filter: include reference to 'used_atom' within 'atom_value'
- ref-filter: implement %(if), %(then), and %(else) atoms
The code to list branches in "git branch" has been consolidated
with the more generic ref-filter API.
Rerolled.
Needs review.
* jc/merge-drop-old-syntax (2015-04-29) 1 commit
- merge: drop 'git merge <message> HEAD <commit>' syntax
Stop supporting "git merge <message> HEAD <commit>" syntax that has
been deprecated since October 2007, and issues a deprecation
warning message since v2.5.0.
It has been reported that git-gui still uses the deprecated syntax,
which needs to be fixed before this final step can proceed.
cf. <5671DB28.8020901@kdbg.org>
--------------------------------------------------
[Discarded]
* jn/fix-connect-unexpected-hangup-diag (2016-09-08) 1 commit
. connect: tighten check for unexpected early hang up
Now part of jt/accept-capability-advertisement-when-fetching-from-void
topic.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox