Git development
 help / color / mirror / Atom feed
* Re: [PATCH v2] sha1-file: remove OBJECT_INFO_SKIP_CACHED
From: Jonathan Nieder @ 2020-01-04  0:13 UTC (permalink / raw)
  To: Jonathan Tan; +Cc: git, gitster
In-Reply-To: <20200102201630.180969-1-jonathantanmy@google.com>

Jonathan Tan wrote:

> In a partial clone, if a user provides the hash of the empty tree ("git
> mktree </dev/null" - for SHA-1, this is 4b825d...) to a command which
> requires that that object be parsed, for example:
>
>   git diff-tree 4b825d <a non-empty tree>
>
> then Git will lazily fetch the empty tree, unnecessarily, because
> parsing of that object invokes repo_has_object_file(), which does not
> special-case the empty tree.
>
> Instead, teach repo_has_object_file() to consult find_cached_object()
> (which handles the empty tree), thus bringing it in line with the rest
> of the object-store-accessing functions. A cost is

Lovely, thank you.

> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
>  object-store.h |  2 --
>  sha1-file.c    | 38 ++++++++++++++++++--------------------
>  2 files changed, 18 insertions(+), 22 deletions(-)

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

To follow up on Junio's hint in his review: callers can inject
additional cached objects by using pretend_object_file.  Junio
described how this would make sense as a mechanism for building
the virtual ancestor object, but we don't do that.  In fact, the
only caller is fake_working_tree_commit in "git blame", a read-only
code path. *phew*

-- >8 --
Subject: sha1-file: document how to use pretend_object_file

Like in-memory alternates, pretend_object_file contains a trap for the
unwary: careless callers can use it to create references to an object
that does not exist in the on-disk object store.

Add a comment documenting how to use the function without risking such
problems.

The only current caller is blame, which uses pretend_object_file to
create an in-memory commit representing the working tree state.
Noticed during a discussion of how to safely use this function in
operations like "git merge" which, unlike blame, are not read-only.

Inspired-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 object-store.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/object-store.h b/object-store.h
index 55ee639350..d0fc7b091b 100644
--- a/object-store.h
+++ b/object-store.h
@@ -208,6 +208,14 @@ int hash_object_file_literally(const void *buf, unsigned long len,
 			       const char *type, struct object_id *oid,
 			       unsigned flags);
 
+/*
+ * Add an object file to the in-memory object store, without writing it
+ * to disk.
+ *
+ * Callers are responsible for calling write_object_file to record the
+ * object in persistent storage before writing any other new objects
+ * that reference it.
+ */
 int pretend_object_file(void *, unsigned long, enum object_type,
 			struct object_id *oid);
 
-- 
2.24.1.735.g03f4e72817


^ permalink raw reply related

* Git for Windows v2.25.0-rc1, was Re: [ANNOUNCE] Git v2.25.0-rc1
From: Johannes Schindelin @ 2020-01-03 22:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git-for-windows, git, git-packagers
In-Reply-To: <xmqqpng1cu2c.fsf@gitster-ct.c.googlers.com>

Team,

On Thu, 2 Jan 2020, Junio C Hamano wrote:

> A release candidate Git v2.25.0-rc1 is now available for testing
> at the usual places.  It is comprised of 540 non-merge commits
> since v2.24.0, contributed by 63 people, 24 of which are new faces.

The corresponding Git for Windows v2.25.0-rc1 can be found here:

	https://github.com/git-for-windows/git/releases/tag/v2.25.0-rc1.windows.1

Please test!

Thanks,
Johannes

^ permalink raw reply

* [PATCH 0/1] unpack-trees: exit check_updates() early if updates are not wanted
From: Elijah Newren via GitGitGadget @ 2020-01-03 21:42 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

In trying to understand check_updates(), I found I was able to simplify the
function by making it exit early when updates are not wanted.

Elijah Newren (1):
  unpack-trees: exit check_updates() early if updates are not wanted

 unpack-trees.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)


base-commit: 8679ef24ed64018bb62170c43ce73e0261c0600a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-686%2Fnewren%2Fsimplify-check-updates-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-686/newren/simplify-check-updates-v1
Pull-Request: https://github.com/git/git/pull/686
-- 
gitgitgadget

^ permalink raw reply

* [PATCH 1/1] unpack-trees: exit check_updates() early if updates are not wanted
From: Elijah Newren via GitGitGadget @ 2020-01-03 21:42 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Elijah Newren
In-Reply-To: <pull.686.git.git.1578087730.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

check_updates() has a lot of code that repeatedly checks whether
o->update or o->dry_run are set.  (Note that o->dry_run is a
near-synonym for !o->update, but not quite as per commit 2c9078d05bf2
("unpack-trees: add the dry_run flag to unpack_trees_options",
2011-05-25).)  In fact, this function almost turns into a no-op whenever
the condition
   !o->update || o->dry_run
is met.  Simplify the code by checking this condition at the beginning
of the function, and when it is true, do the few things that are
relevant and return early.

There are a few things that make the conversion not quite obvious:
  * The fact that check_updates() does not actually turn into a no-op
    when updates are not wanted may be slightly surprising.  However,
    commit 33ecf7eb61 (Discard "deleted" cache entries after using them
    to update the working tree, 2008-02-07) put the discarding of
    unused cache entries in check_updates() so we still need to keep
    the call to remove_marked_cache_entries().  It's possible this
    call belongs in another function, but it is certainly needed as
    tests will fail if it is removed.
  * The original called remove_scheduled_dirs() unconditionally.
    Technically, commit 7847892716 (unlink_entry(): introduce
    schedule_dir_for_removal(), 2009-02-09) should have made that call
    conditional, but it didn't matter in practice because
    remove_scheduled_dirs() becomes a no-op when all the calls to
    unlink_entry() are skipped.  As such, we do not need to call it.
  * When (o->dry_run && o->update), the original would have two calls
    to git_attr_set_direction() surrounding a bunch of skipped updates.
    These two calls to git_attr_set_direction() cancel each other out
    and thus can be omitted when o->dry_run is true just as they
    already are when !o->update.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 unpack-trees.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/unpack-trees.c b/unpack-trees.c
index 2399b6818b..4c68dbdb43 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -372,15 +372,20 @@ static int check_updates(struct unpack_trees_options *o)
 	state.refresh_cache = 1;
 	state.istate = index;
 
+	if (!o->update || o->dry_run) {
+		remove_marked_cache_entries(index, 0);
+		trace_performance_leave("check_updates");
+		return 0;
+	}
+
 	if (o->clone)
 		setup_collided_checkout_detection(&state, index);
 
 	progress = get_progress(o);
 
-	if (o->update)
-		git_attr_set_direction(GIT_ATTR_CHECKOUT);
+	git_attr_set_direction(GIT_ATTR_CHECKOUT);
 
-	if (should_update_submodules() && o->update && !o->dry_run)
+	if (should_update_submodules())
 		load_gitmodules_file(index, NULL);
 
 	for (i = 0; i < index->cache_nr; i++) {
@@ -388,18 +393,18 @@ static int check_updates(struct unpack_trees_options *o)
 
 		if (ce->ce_flags & CE_WT_REMOVE) {
 			display_progress(progress, ++cnt);
-			if (o->update && !o->dry_run)
-				unlink_entry(ce);
+			unlink_entry(ce);
 		}
 	}
+
 	remove_marked_cache_entries(index, 0);
 	remove_scheduled_dirs();
 
-	if (should_update_submodules() && o->update && !o->dry_run)
+	if (should_update_submodules())
 		load_gitmodules_file(index, &state);
 
 	enable_delayed_checkout(&state);
-	if (has_promisor_remote() && o->update && !o->dry_run) {
+	if (has_promisor_remote()) {
 		/*
 		 * Prefetch the objects that are to be checked out in the loop
 		 * below.
@@ -431,15 +436,12 @@ static int check_updates(struct unpack_trees_options *o)
 				    ce->name);
 			display_progress(progress, ++cnt);
 			ce->ce_flags &= ~CE_UPDATE;
-			if (o->update && !o->dry_run) {
-				errs |= checkout_entry(ce, &state, NULL, NULL);
-			}
+			errs |= checkout_entry(ce, &state, NULL, NULL);
 		}
 	}
 	stop_progress(&progress);
 	errs |= finish_delayed_checkout(&state, NULL);
-	if (o->update)
-		git_attr_set_direction(GIT_ATTR_CHECKIN);
+	git_attr_set_direction(GIT_ATTR_CHECKIN);
 
 	if (o->clone)
 		report_collided_checkout(index);
-- 
gitgitgadget

^ permalink raw reply related

* Re: [RFC] xl command for visualizing recent history
From: Junio C Hamano @ 2020-01-03 21:30 UTC (permalink / raw)
  To: Matthew DeVore
  Cc: Johannes Schindelin, Emily Shaffer, Matthew DeVore, git,
	Matthew DeVore, jonathantanmy, jrnieder, steadmon
In-Reply-To: <20200103201423.GA20975@comcast.net>

Matthew DeVore <matvore@comcast.net> writes:

> On Thu, Oct 31, 2019 at 09:26:48AM +0100, Johannes Schindelin wrote:
>> 
>> am stands for "apply mbox", and I think that the only reason it is not
>> called `git apply-mbox` is that the Linux maintainer uses it a lot and
>> wanted to save on keystrokes.

No need to give an incorrect speculation if you do not know the
history in this discussion.  Back then, the command to apply mbox
contents existed and was called "git applymbox".  "am" was invented
as a better replacement with more rational behaviour and set of
command line arguments.

>> Having said that, I do agree that `xl` is not a good name for this. It
>> is neither intuitive, nor is it particularly easy to type (on a
>> US-English keyboard, the `x` and the `l` key are far apart), and to add
>
> There is a subjective element to this, but I would consider it easy to type
> since it is using two different hands....

Give descriptive name to the command, define an alias of your choice
and use it privately.  Nobody would be able to guess what "git xl"
or "git extra-long" command would do ;-)

^ permalink raw reply

* Re: [RFC] xl command for visualizing recent history
From: Matthew DeVore @ 2020-01-03 20:14 UTC (permalink / raw)
  To: Johannes Schindelin
  Cc: Emily Shaffer, Matthew DeVore, git, Matthew DeVore, jonathantanmy,
	jrnieder, steadmon
In-Reply-To: <nycvar.QRO.7.76.6.1910310851300.46@tvgsbejvaqbjf.bet>

On Thu, Oct 31, 2019 at 09:26:48AM +0100, Johannes Schindelin wrote:
> 
> am stands for "apply mbox", and I think that the only reason it is not
> called `git apply-mbox` is that the Linux maintainer uses it a lot and
> wanted to save on keystrokes.
> 
> Having said that, I do agree that `xl` is not a good name for this. It
> is neither intuitive, nor is it particularly easy to type (on a
> US-English keyboard, the `x` and the `l` key are far apart), and to add

There is a subjective element to this, but I would consider it easy to type
since it is using two different hands. The property of "keys are far apart" is
only bad if it's the same or close fingers doing the typing (i.e. on qwerty
layout "ve" or "my")

I'm not trying to justify an unpopular name, though :) There are other reasons
to avoid "xl". I just found your statement surprising.

> insult to injury, _any_ two-letter command is likely to shadow
> already-existing aliases that users might have installed locally.
> 

"wip" seems more descriptive to me, or "logx", as I mentioned in the reply to
Emily.

> In addition, I would think that the introduction of ephemeral refs
> should deserve its own patch. Such ephemeral refs might come in handy
> for more things than just `xl` (or whatever better name we find).
> 
> The design of such ephemeral refs is thoroughly interesting, too.
> 
> One very obvious question is whether you want these refs to be
> worktree-specific or not. I would tend to answer "yes" to that question.

We could key each set of ephemeral refs off of the ttyname(3) or as you
suggested getsid(2). As you say, the Windows analog would be the handle of the
Win32 console. (I'm guessing there is no concept of a terminal multiplexer
unless you're using MinGW or WSL, in which case we can use getsid).

getsid(2) seems the least likely to overlap with previous "keys" so we may
prefer that one.

getppid would not work that well if anyone ran the command (or any git command
that refers to the ephemeral refs) in a wrapper script (I don't mean an
automated script, which we definitely don't want people to try).

I'm not so sure I would prefer this keying mechanism myself - I may be
compelled to turn it off. I sometimes have two terminals open, visible at the
same time, and expect them to share this kind of state. So I'm reserving
judgment about whether it should be configurable or not. But it should probably
be enabled (key by session ID) by default.

Now, if we key the refs off of the current session, it seems unnecessary to key
off the worktree as well. If someone remains in the current session, but cd to
a different worktree, it would be natural for them to assume that the ephemeral
refs that are still visible in the terminal window would stil work.

> 
> Further, another obvious question is what to do with those refs after a
> while. They are _clearly_ intended to be ephemeral, i.e. they should
> just vanish after a reasonably short time. Which raises the question:
> what is "reasonably short" in this context? We would probably want to
> come up with a good default and then offer a config setting to change
> it.

I would propose expiring refs as the user introduced more sessions (getsid
values) without using old ones, like and LRU cache, and to limit the repository
to holding 16 getsid keys at a time. This way, we don't have concept of a
real-world clock, and we let people go back to a terminal window which they
left open for a month and still use refs that were left there (assuming of
course they haven't been using the repository heavily otherwise, and the
terminal content is still showing those ref numbers for them to refer to).

Now, if in session 42, the user generated some ephemeral refs with
"git log --ephemeral-refs", these would automatically destroy any existing
ephemeral refs that were created by past invocations in session 42. I don't
know how important it is that we clean those up, but it seems like the right
thing to do anyway to save disk space (at least 40 bytes per commit).

> 
> Another important aspect is the naming. The naming schema you chose
> (`h/<counter>`) is short-and-sweet, and might very well be in use
> already, for totally different purposes. It would be a really good idea
> to open that schema to allow for avoiding clashes with already-existing
> refs.
> 
> A better alternative might be to choose a naming schema that cannot
> clash with existing refs because it would not make for valid ref names.
> I had a look at the ref name validation, and `^<counter>` might be a
> better naming schema to begin with: `^1` is not a valid ref name, for
> example.

I like having a new kind of syntax to make the ref names easier to type as well
as non-conflicting with current use cases. "^" is hard-to-type if you're not
a good touch-typist, but I guess that's fine. If you're a good touch-typist,
"^" seems a tad easier to type than "h/" IMO.

I don't see any mention of "%" in "gitrevisions(7)" so maybe that's OK to use?
That is a little more of an everyday symbol than "^" so users are likely used to
typing it, and is closer to the fingers' home position. But if I remember right
this has special meaning in Windows shell (expand variables), so I guess it's
not a good idea.

> 
> Side note: why `h/`? I really tried to think about possible motivations
> and came up empty.
> 

Mostly because it's easy to type and didn't require exotic new syntax :) And the
"h" stands for hash.

> I would like to caution against targeting scripts with this. It is too
> easy for two concurrently running scripts to stumble over each other.

I think my wording before was too confusing. I totally agree we should
discourage automated scripts. Convenience scripts that are meant to be used
interactively (e.g. glorified aliases and workflow-optimization scripts) should
be allowed, and I don't think we need to do anything special to make that work.

Thank you for the feedback!
- Matt

^ permalink raw reply

* Re: [ANNOUNCE] Git v2.25.0-rc0
From: Johannes Schindelin @ 2020-01-03 19:39 UTC (permalink / raw)
  To: Taylor Blau; +Cc: Junio C Hamano, git
In-Reply-To: <20200102221921.GA81596@syl.local>

Hi Taylor,

On Thu, 2 Jan 2020, Taylor Blau wrote:

> On Wed, Dec 25, 2019 at 01:44:54PM -0800, Junio C Hamano wrote:
>
> >  * The beginning of rewriting "git add -i" in C.
> >
> >  [snip]
> >
> >  * The effort to reimplement "git add -i" in C continues.
>
> I noticed while preparing GitHub's blog post for 2.25 that the work to
> rewrite "git add -i" in C was mentioned twice in the performance
> improvements section.
>
> I'm not sure if this is intentional, or if this was added twice during
> the merge(s) of and f7998d9793 (Merge branch 'js/builtin-add-i',
> 2019-12-05) and 3beff388b2 (Merge branch 'js/builtin-add-i-cmds',
> 2019-12-16).

If you mention this feature in the blog post, please note that the
built-in `git add -p` is not feature-complete until the
`js/add-p-leftover-bits` branch is merged.

And if you mention the built-in add -i/-p work, could I ask you to include
a note that it is based on one of the two Outreachy projects in winter
2018/2019?

Thanks,
Dscho

^ permalink raw reply

* Git Test Coverage Report (Jan 3, 2020)
From: Derrick Stolee @ 2020-01-03 18:49 UTC (permalink / raw)
  To: Git List

Here is today's test coverage report.

It appears that actually enabling the interactive add has actually covered a large
amount of those commits.

Thanks,
-Stolee

[1] https://derrickstolee.github.io/git-test-coverage/reports/2020-01-03-commits.txt
[2] https://derrickstolee.github.io/git-test-coverage/reports/2020-01-03.txt
[3] https://derrickstolee.github.io/git-test-coverage/reports/2020-01-03.htm

---

pu	bd265ff036f83d7427ffd08d6b4a93523a9b7b70
jch	09c6e718d25f033b1feb5d8d43d2871536ca70df
next	88dfdc41939891b16a5f8d00053e9c81d6d73f4e
master	8679ef24ed64018bb62170c43ce73e0261c0600a
master@{1}	0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6


Uncovered code in 'pu' not in 'jch'
--------------------------------------------------------

Commits introducing uncovered code:
Denton Liu	daf6b9e4 sequencer: use file strbuf for read_oneliner()
sequencer.c
daf6b9e4 439) goto done;
daf6b9e4 445) goto done;

Denton Liu	afc27b82 rebase: use read_oneliner()
builtin/rebase.c
afc27b82 648) } else if (!read_oneliner(&buf, state_dir_path("head", opts), 0, 1))

Denton Liu	d4e8a655 rebase: generify reset_head()
builtin/rebase.c
d4e8a655 904) reset_head(the_repository, &opts->orig_head, "checkout",
d4e8a655 905)    opts->head_name, 0,

Denton Liu	82c638ef rebase: use apply_autostash() from sequencer.c
builtin/rebase.c
82c638ef 1065) apply_autostash(state_dir_path("autostash", opts));

Denton Liu	f2096173 reset: extract reset_head() from rebase
reset.c
f2096173 37) ret = -1;
f2096173 38) goto leave_reset_head;
f2096173 43) goto leave_reset_head;
f2096173 65) goto leave_reset_head;
f2096173 71) goto leave_reset_head;
f2096173 76) goto leave_reset_head;
f2096173 80) ret = -1;
f2096173 81) goto leave_reset_head;
f2096173 89) goto leave_reset_head;
f2096173 108) } else if (old_orig)
f2096173 109) delete_ref(NULL, "ORIG_HEAD", old_orig, 0);

Johannes Schindelin	53fa2153 built-in add -p: handle Escape sequences in interactive.singlekey mode
compat/terminal.c
53fa2153 330) if (ch == '\033' /* ESC */) {
53fa2153 338) strbuf_splice(buf, buf->len - 1, 1, "^[", 2);
53fa2153 346) struct pollfd pfd = { .fd = 0, .events = POLLIN };
53fa2153 348) if (poll(&pfd, 1, 500) < 1)
53fa2153 349) break;
53fa2153 351) ch = getchar();
53fa2153 352) if (ch == EOF)
53fa2153 353) return 0;
53fa2153 354) strbuf_addch(buf, ch);

Johannes Schindelin	61131685 built-in add -p: handle Escape sequences more efficiently
compat/terminal.c
61131685 255) static int sequence_entry_cmp(const void *hashmap_cmp_fn_data,
61131685 260) return strcmp(e1->sequence, keydata ? keydata : e2->sequence);
61131685 263) static int is_known_escape_sequence(const char *sequence)
61131685 268) if (!initialized) {
61131685 269) struct child_process cp = CHILD_PROCESS_INIT;
61131685 270) struct strbuf buf = STRBUF_INIT;
61131685 273) hashmap_init(&sequences, (hashmap_cmp_fn)sequence_entry_cmp,
61131685 276) argv_array_pushl(&cp.args, "infocmp", "-L", "-1", NULL);
61131685 277) if (pipe_command(&cp, NULL, 0, &buf, 0, NULL, 0))
61131685 278) strbuf_setlen(&buf, 0);
61131685 280) for (eol = p = buf.buf; *p; p = eol + 1) {
61131685 281) p = strchr(p, '=');
61131685 282) if (!p)
61131685 283) break;
61131685 284) p++;
61131685 285) eol = strchrnul(p, '\n');
61131685 287) if (starts_with(p, "\\E")) {
61131685 288) char *comma = memchr(p, ',', eol - p);
61131685 291) p[0] = '^';
61131685 292) p[1] = '[';
61131685 293) FLEX_ALLOC_MEM(e, sequence, p, comma - p);
61131685 294) hashmap_entry_init(&e->entry,
61131685 295)    strhash(e->sequence));
61131685 296) hashmap_add(&sequences, &e->entry);
61131685 298) if (!*eol)
61131685 299) break;
61131685 301) initialized = 1;
61131685 304) return !!hashmap_get_from_hash(&sequences, strhash(sequence), sequence);
61131685 345) while (!is_known_escape_sequence(buf->buf)) {

Johannes Schindelin	74e42899 terminal: add a new function to read a single keystroke
compat/terminal.c
74e42899 64) static int enable_non_canonical(void)
74e42899 66) return disable_bits(ICANON | ECHO);
74e42899 307) int read_key_without_echo(struct strbuf *buf)
74e42899 312) if (warning_displayed || enable_non_canonical() < 0) {
74e42899 313) if (!warning_displayed) {
74e42899 316) warning_displayed = 1;
74e42899 319) return strbuf_getline(buf, stdin);
74e42899 322) strbuf_reset(buf);
74e42899 323) ch = getchar();
74e42899 324) if (ch == EOF) {
74e42899 325) restore_term();
74e42899 326) return EOF;
74e42899 328) strbuf_addch(buf, ch);
74e42899 358) restore_term();
74e42899 359) return 0;

Johannes Schindelin	aaafd603 terminal: make the code of disable_echo() reusable
compat/terminal.c
aaafd603 38) static int disable_bits(tcflag_t bits)
aaafd603 49) t.c_lflag &= ~bits;
aaafd603 59) static int disable_echo(void)
aaafd603 61) return disable_bits(ECHO);

Johannes Schindelin	60b7e674 built-in add -p: respect the `interactive.singlekey` config setting
add-patch.c
60b7e674 1156) int res = read_key_without_echo(&s->answer);
60b7e674 1157) printf("%s\n", res == EOF ? "" : s->answer.buf);
60b7e674 1158) return res;

Jonathan Nieder	ee70c128 index: offer advice for unknown index extensions
read-cache.c
ee70c128 1761) if (advice_unknown_index_extension) {

Josh Steadmon	6da1f1a9 protocol: advertise multiple supported versions
remote-curl.c
6da1f1a9 354) return 0;

Matheus Tavares	beebb9d2 object-store: allow threaded access to object reading
packfile.c
beebb9d2 1453) return;

sha1-file.c
beebb9d2 1431) return;
beebb9d2 1440) return;

Phillip Wood	430b75f7 commit: give correct advice for empty commit during a rebase
sequencer.c
430b75f7 1580)     return -1;



Uncovered code in 'jch' not in 'next'
--------------------------------------------------------

Commits introducing uncovered code:
Alban Gruin	0d50cf5e sequencer: move check_todo_list_from_file() to rebase-interactive.c
rebase-interactive.c
0d50cf5e 210) goto out;
0d50cf5e 215) goto out;
0d50cf5e 224) fprintf(stderr, _(edit_todo_list_advice));

Alex Torok	fed842f0 rebase: fix --fork-point with short refname
builtin/merge-base.c
fed842f0 128) return 1;

Jonathan Tan	9c8a294a sha1-file: remove OBJECT_INFO_SKIP_CACHED
sha1-file.c
9c8a294a 1442) *(oi->disk_sizep) = 0;
9c8a294a 1444) hashclr(oi->delta_base_sha1);
9c8a294a 1446) strbuf_addstr(oi->type_name, type_name(co->type));

Martin Ågren	3bf986d6 builtin/config: collect "value_regexp" data in a struct
builtin/config.c
3bf986d6 329) FREE_AND_NULL(cmd_line_value.regexp);

Martin Ågren	3bcdd852 builtin/config: extract `handle_value_regex()` from `get_value()`
builtin/config.c
3bcdd852 330) return CONFIG_INVALID_PATTERN;
3bcdd852 375) goto free_strings;



Uncovered code in 'next' not in 'master'
--------------------------------------------------------

Commits introducing uncovered code:
Elijah Newren	4d861fad rebase, sequencer: remove the broken GIT_QUIET handling
builtin/rebase.c
4d861fad 725) write_file(state_dir_path("quiet", opts), "%s", "");

Elijah Newren	7ee11336 rebase: extend the options for handling of empty commits
sequencer.c
7ee11336 2055) res = allow;
7ee11336 2056) goto leave;
7ee11336 2515) opts->drop_redundant_commits =
7ee11336 2516) git_config_bool_or_int(key, value, &error_flag);
7ee11336 2521) opts->ask_on_initially_empty =
7ee11336 2522) git_config_bool_or_int(key, value, &error_flag);
7ee11336 3066) res |= git_config_set_in_file_gently(opts_file,
7ee11336 3072) res |= git_config_set_in_file_gently(opts_file,
7ee11336 4786) continue;

Hans Jerry Illikainen	63add83b gpg-interface: add minTrustLevel as a configuration option
builtin/pull.c
63add83b 374) return status;

gpg-interface.c
63add83b 143) return 1;
63add83b 207) free(trust);
63add83b 208) goto error;
63add83b 397) return config_error_nonbool(var);

pretty.c
63add83b 1355) strbuf_addstr(sb, "never");
63add83b 1356) break;
63add83b 1358) strbuf_addstr(sb, "marginal");
63add83b 1359) break;
63add83b 1361) strbuf_addstr(sb, "fully");
63add83b 1362) break;

Jeff King	4f0bd8b9 pack-objects: improve partial packfile reuse
builtin/pack-objects.c
4f0bd8b9 1124) return 1;
4f0bd8b9 2681) (reuse_packfile_bitmap &&
4f0bd8b9 2682)  bitmap_walk_contains(bitmap_git, reuse_packfile_bitmap, oid));

pack-bitmap.c
4f0bd8b9 808) return;
4f0bd8b9 811) return;
4f0bd8b9 823) return;
4f0bd8b9 861) i = bitmap_git->pack->num_objects / BITS_IN_EWORD;

Jeff King	7cb9754e pack-objects: introduce pack.allowPackReuse
builtin/pack-objects.c
7cb9754e 2834) allow_pack_reuse = git_config_bool(k, v);
7cb9754e 2835) return 0;

Jeff King	7b143c16 pack-bitmap: introduce bitmap_walk_contains()
pack-bitmap.c
7b143c16 903) return 0;

Johannes Schindelin	52628f94 built-in add -p: implement the "checkout" patch modes
add-patch.c
52628f94 1224) fwrite(diff->buf, diff->len, 1, stderr);

Johannes Schindelin	d2a233cb built-in add -p: prepare for patch modes other than "stage"
add-patch.c
d2a233cb 1520)       _(s->mode->help_patch_text));

Johannes Schindelin	90a6bb98 legacy stash -p: respect the add.interactive.usebuiltin setting
builtin/add.c
90a6bb98 450) parse_pathspec(&pathspec, 0,
90a6bb98 456) return run_add_interactive(NULL, "--patch=stash", &pathspec);

Johannes Schindelin	6610e462 built-in stash: use the built-in `git add -p` if so configured
builtin/stash.c
6610e462 1026) setenv(INDEX_ENVIRONMENT, old_index_env, 1);



Uncovered code in 'master' not in 'master@{1}'
--------------------------------------------------------

Commits introducing uncovered code:
Elijah Newren	4fe7e43c rebase: fix saving of --signoff state for am-based rebases
builtin/rebase.c
4fe7e43c 709) write_file(state_dir_path("signoff", opts), "--signoff");



^ permalink raw reply

* [PATCH] Documentation: Mention `Date: ` in git-am
From: Paul Menzel @ 2020-01-03 15:05 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

Date: Fri, 3 Jan 2020 12:48:46 +0100

Tested, that a line `Date: ` in the message body will be preferred by
`git am` over the one in the message header. So, update the
documentation.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 Documentation/git-am.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index fc5750b3b8..11ca61b00b 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -190,8 +190,8 @@ the commit, after stripping common prefix "[PATCH <anything>]".
 The "Subject: " line is supposed to concisely describe what the
 commit is about in one line of text.
 
-"From: " and "Subject: " lines starting the body override the respective
-commit author name and title values taken from the headers.
+"From: ", "Date: ", and "Subject: " lines starting the body override the
+respective commit author name and title values taken from the headers.
 
 The commit message is formed by the title taken from the
 "Subject: ", a blank line and the body of the message up to
-- 
2.24.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

^ permalink raw reply related

* Re: BUG: sendemail-validate hook is run too early
From: Jani Nikula @ 2020-01-03 14:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <87sgkwswhs.fsf@intel.com>

On Fri, 03 Jan 2020, Jani Nikula <jani.nikula@intel.com> wrote:
> I think one possible alternative to adding a completely new hook would
> be postponing the sendemail-validate hook, passing the same patch on the
> command-line as before (to ensure current users are unchanged), and
> additionally passing in the recipients.

I realize the validation is done on *all* patches in a series before any
further processing, so the suggestion to postpone the current validation
hook is a bad idea. We'd need a new hook. The other points about having
both the patch contents and the recipients available to the hook remain.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply

* Re: [PATCH 1/1] fetch: set size_multiple in split_commit_graph_opts
From: Derrick Stolee @ 2020-01-03 13:07 UTC (permalink / raw)
  To: Junio C Hamano, Derrick Stolee via GitGitGadget
  Cc: git, peff, me, szeder.dev, Derrick Stolee
In-Reply-To: <xmqq7e29edfd.fsf@gitster-ct.c.googlers.com>

On 1/2/2020 4:49 PM, Junio C Hamano wrote:
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> This problem is due to two failures:
>>
>>  1. It is unclear that we can add the flag COMMIT_GRAPH_WRITE_SPLIT
>>     with a NULL split_opts.
>>  2. If we have a non-NULL split_opts, then we override the default
>>     values even if a zero value is given.
>>
>> Correct both of these issues. First, do not override size_mult when
>> the options provide a zero value. Second, stop creating a split_opts
>> in the fetch builtin.
> 
> OK, so there is the hardcoded default 2 in the code, and split_opts
> structure *can* override it, but 0 in the field of the structure is
> meant to signal "no, I do not have any value to override the
> default", not "I do want to set the multiple to 0"?

Correct. The multiple 0 makes it so we never merge layers of the
chain, and this was happening accidentally. A caller could still
accomplish this by passing -1, but that is not recommended.

-Stolee


^ permalink raw reply

* Re: [PATCH] Documentation/git-sparse-checkout.txt: fix a typo
From: Derrick Stolee @ 2020-01-03 13:05 UTC (permalink / raw)
  To: Taylor Blau, git; +Cc: dstolee
In-Reply-To: <1acd9e81607cc3f430a52512d7ff3cb82ccb0cfb.1578005500.git.me@ttaylorr.com>

On 1/2/2020 5:51 PM, Taylor Blau wrote:
> This typo was introduced in 94c0956b60 (sparse-checkout: create builtin
> with 'list' subcommand, 2019-11-21).
> 
> Signed-off-by: Taylor Blau <me@ttaylorr.com>
> ---
>  Documentation/git-sparse-checkout.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
> index 9c3c66cc37..a3c920fa6c 100644
> --- a/Documentation/git-sparse-checkout.txt
> +++ b/Documentation/git-sparse-checkout.txt
> @@ -5,7 +5,7 @@ NAME
>  ----
>  git-sparse-checkout - Initialize and modify the sparse-checkout
>  configuration, which reduces the checkout to a set of paths
> -given by a list of atterns.
> +given by a list of patterns.

Thanks for finding this. Obviously correct.

-Stolee

^ permalink raw reply

* (no subject)
From: François WAUQUIER @ 2020-01-03 12:40 UTC (permalink / raw)
  To: git

Hi

$ git checkout -

I often use this command to go back to previous branch from my history.
It is quite natural as it uses the same syntax as “cd -“

But i found out it is not documented in
https://git-scm.com/docs/git-checkout/2.24.0
I report this to help others to discover this time saving command.

Thanks for the great work with git
Happy new year

-- 
François Wauquier

^ permalink raw reply

* [PATCH] RFC: commit: add a commit.all-ignore-submodules config option
From: marcandre.lureau @ 2020-01-03 12:06 UTC (permalink / raw)
  To: git; +Cc: Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

One of my most frequent mistake is to commit undesired submodules
changes when doing "commit -a", and I have seen a number of people doing
the same mistake in various projects. I wish there would be a config to
change this default behaviour.

submodule.<name>.ignore or diff.ignoreSubmodules have different
tradeoffs, as they change the diff or status behaviour. I just wish the
default behaviour of "commit -a" to be different, to exclude submodules
by default.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 builtin/add.c    |  6 ++++++
 builtin/commit.c | 10 +++++++++-
 cache.h          |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/builtin/add.c b/builtin/add.c
index 4c38aff419..4023ee2681 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -82,6 +82,12 @@ static void update_callback(struct diff_queue_struct *q,
 	for (i = 0; i < q->nr; i++) {
 		struct diff_filepair *p = q->queue[i];
 		const char *path = p->one->path;
+
+		if (data->flags & ADD_CACHE_IGNORE_SUBMODULES &&
+		    S_ISGITLINK(p->one->mode)) {
+		    continue;
+		}
+
 		switch (fix_unmerged_status(p, data)) {
 		default:
 			die(_("unexpected diff status %c"), p->status);
diff --git a/builtin/commit.c b/builtin/commit.c
index aa1332308a..ce37e4e6da 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -110,6 +110,7 @@ static int config_commit_verbose = -1; /* unspecified */
 static int no_post_rewrite, allow_empty_message, pathspec_file_nul;
 static char *untracked_files_arg, *force_date, *ignore_submodule_arg, *ignored_arg;
 static char *sign_commit, *pathspec_from_file;
+static int commit_all_ignore_submodules;
 
 /*
  * The default commit message cleanup mode will remove the lines
@@ -415,8 +416,10 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix
 	 * (B) on failure, rollback the real index.
 	 */
 	if (all || (also && pathspec.nr)) {
+		int flags = commit_all_ignore_submodules ? ADD_CACHE_IGNORE_SUBMODULES : 0;
+
 		hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
-		add_files_to_cache(also ? prefix : NULL, &pathspec, 0);
+		add_files_to_cache(also ? prefix : NULL, &pathspec, flags);
 		refresh_cache_or_die(refresh_flags);
 		update_main_cache_tree(WRITE_TREE_SILENT);
 		if (write_locked_index(&the_index, &index_lock, 0))
@@ -1475,6 +1478,11 @@ static int git_commit_config(const char *k, const char *v, void *cb)
 		return 0;
 	}
 
+	if (!strcmp(k, "commit.all-ignore-submodules")) {
+		commit_all_ignore_submodules = git_config_bool(k, v);
+		return 0;
+	}
+
 	status = git_gpg_config(k, v, NULL);
 	if (status)
 		return status;
diff --git a/cache.h b/cache.h
index 1554488d66..5fb3b18916 100644
--- a/cache.h
+++ b/cache.h
@@ -816,6 +816,7 @@ 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
+#define ADD_CACHE_IGNORE_SUBMODULES 32
 /*
  * These two are used to add the contents of the file at path
  * to the index, marking the working tree up-to-date by storing

base-commit: 8679ef24ed64018bb62170c43ce73e0261c0600a
-- 
2.25.0.rc1.1.gb0343b22ed


^ permalink raw reply related

* Re: BUG: sendemail-validate hook is run too early
From: Jani Nikula @ 2020-01-03  9:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <xmqqk169ehb1.fsf@gitster-ct.c.googlers.com>

On Thu, 02 Jan 2020, Junio C Hamano <gitster@pobox.com> wrote:
> Jani Nikula <jani.nikula@intel.com> writes:
>
>> I'm trying to use the sendemail-validate hook to validate the recipients
>> of the patch email, among other things. Turns out the hook gets run
>> immediately on the input patches, *not* on the "e-mail to be sent" as
>> claimed by githooks(5).
>
> I will make two suggestions, so please do not react before reading
> both ;-)
>
> The purpose of the validate hook, at least as it was originally
> designed, was to vet the log message and patch contents, so what you
> reported is not at all surprising.  After all, the sub that uses the
> hook is called "validate_patch" ;-).
>
> A low-hanging documentation fix (this is one suggestion) is to
> phrase "e-mail to be sent" as "e-mail that has been submitted (to
> git-send-email)" to avoid the confusion.

Agreed; I think this should be done no matter what.

> You do not want to use the sendemail-validate hook for checking for
> the recipients, because the e-mail message is not a good source of
> that information.
>
> When a recipient is added, two things happen:
>
>  * The recipient is added to the (internal) list of recipients on
>    the underlying sendmail command line arguments.  This is the list
>    of addresses that actually matter where the piece of email goes.
>
>  * The recipient is added to the text of the message being sent, if
>    s/he is being added to either To: or Cc: (this is purely for
>    human consumption and does not affect where the piece of email
>    goes).  A blind-carbon-copy recipient would not be added for
>    obvious reasons.
>
> If you truly want to validate where the message goes, you'd need to
> vet the former list, not the latter one.  Otherwise, you'll miss BCC
> recipients.

Understood.

> So the other suggestion is to have a separate hook to validate the
> list of recipients.  This might be a bit more involved if we want to
> execute cleanly, but should not be rocket science.
>
> The send_message() sub prepares @recipients list to form quite a bit
> of processing at the beginning, and the uses the resulting list to
> drive the sendmail by adding it to @sendmail_parameters().  The
> contents of this @recipients list is what you want to vet before the
> code talks to the sendmail program or daemon later in the function.

One key point here is using the patch as input to the recipient
validation. For example, requiring specific recipients when certain
files are changed (a bit like get_maintainers.pl in Linux kernel). To
make it easier for the hook writer, both the patch and the recipients
should be passed to the hook at the same time.

I think one possible alternative to adding a completely new hook would
be postponing the sendemail-validate hook, passing the same patch on the
command-line as before (to ensure current users are unchanged), and
additionally passing in the recipients. Perhaps write the recipient list
in a temp file, and pass the filename on the command-line or via the
environment to the hook.

Alas implementing this in perl *is* rocket science to me, so I'm pretty
much dependent on the git community's help here.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply

* [RFC PATCH] bisect run: allow inverting meaning of exit code
From: Stephen Oberholtzer @ 2020-01-03  4:30 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Stephen Oberholtzer

NOTE: This is obviously not ready for merging; I just wanted to
get feedback.

In particular, I expect some bikeshedding on the specific option
names (-r, --invert, --expect).  I'm probably going to change
`--expect` to `--success`, in fact.

If we can come to a consensus on the names (and, of course, on the
feature itself), I'll clean up the tests, remove the debug output,
update the documentation, then resubmit.

>8------------------------------------------------------8<


If your automated test naturally yields zero for _old_/_good_,
1-124 or 126-127 for _new_/_bad_, then you're set.

If that logic is reversed, however, it's a bit more of a pain: you
can't just stick a `sh -c !` in front of your command, because that
doesn't account for exit codes 125 or 129-255.

This commit enhances `git bisect run` as follows:

* '--' can be used as an option list terminator,
  just as everywhere else.

* The treatment of the exit code can be selected via an option:

  - No option, of course, treats 0 as _old_/_good_
  - `-r` (for reverse) treats 0 as _new_/_bad_
  - `--invert` is the long form for `-r`
  - `--expect=<term>` treats 0 as <term>

You're not allowed to specify more than one expectation.

Note that this lets one specify `--expect=good` as an explicit
selection of the default behavior.  This is intentional.

Signed-off-by: Stephen Oberholtzer <stevie@qrpff.net>
---
 git-bisect.sh         |  33 +++++++++-
 t/t6071-bisect-run.sh | 142 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 172 insertions(+), 3 deletions(-)
 create mode 100755 t/t6071-bisect-run.sh

diff --git a/git-bisect.sh b/git-bisect.sh
index efee12b8b1..dbeb213846 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -26,7 +26,7 @@ git bisect replay <logfile>
 	replay bisection log.
 git bisect log
 	show bisect log.
-git bisect run <cmd>...
+git bisect run [--expect=<term> | -r | --invert] [--] <cmd>...
 	use <cmd>... to automatically bisect.
 
 Please use "git help bisect" to get the full man page.'
@@ -238,6 +238,31 @@ bisect_replay () {
 bisect_run () {
 	git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit
 
+	SUCCESS_TERM=$TERM_GOOD
+	FAIL_TERM=$TERM_BAD
+	INVERT_SET=
+	while [ "$1" != "${1#-}" ]; do
+		case "$1" in
+		--)
+			shift
+			break ;;
+		--expect=$TERM_GOOD)
+			[ -z "$INVERT_SET" ] || die "$(gettext "bisect run: multiple expect options specified")"
+			INVERT_SET=1 ;;
+		-r|--invert|--expect=$TERM_BAD)
+			[ -z "$INVERT_SET" ] || die "$(gettext "bisect run: multiple expect options specified")"
+			SUCCESS_TERM=$TERM_BAD
+			FAIL_TERM=$TERM_GOOD
+			INVERT_SET=1 ;;
+		--expect=*)
+			# how to localize part 2?
+			die "$(printf "$(gettext "bisect run: invalid --expect value, use --expect=%s or --expect=%s")" "$TERM_GOOD" "$TERM_BAD")" ;;
+		*)
+			die "$(printf "$(gettext "bisect run: invalid option: %s")" "$1")" ;;
+		esac
+		shift
+	done
+
 	test -n "$*" || die "$(gettext "bisect run failed: no command provided.")"
 
 	while true
@@ -262,11 +287,13 @@ exit code \$res from '\$command' is < 0 or >= 128" >&2
 			state='skip'
 		elif [ $res -gt 0 ]
 		then
-			state="$TERM_BAD"
+			state="$FAIL_TERM"
 		else
-			state="$TERM_GOOD"
+			state="$SUCCESS_TERM"
 		fi
 
+		echo "exit code $res means this commit is $state"
+
 		# We have to use a subshell because "bisect_state" can exit.
 		( bisect_state $state >"$GIT_DIR/BISECT_RUN" )
 		res=$?
diff --git a/t/t6071-bisect-run.sh b/t/t6071-bisect-run.sh
new file mode 100755
index 0000000000..2708e0f854
--- /dev/null
+++ b/t/t6071-bisect-run.sh
@@ -0,0 +1,142 @@
+# verify that unrecognized options are rejected by 'git bisect run'
+#!/bin/sh
+
+# the linter's not smart enough to handle set -e
+GIT_TEST_CHAIN_LINT=0
+
+test_description='Tests git bisect run'
+
+exec </dev/null
+
+. ./test-lib.sh
+
+{ test_expect_success 'Setting up repo for "git bisect run" tests.' "$(cat)" ; } <<'SETUP'
+(
+# I don't know how they managed it, but the git test engine
+# somehow ignores the effect of 'set -e'.
+set -eu || exit 1
+# set -e canary
+false
+# hopefully, next year, we get -o pipefail!
+echo '.DEFAULT: dummy
+.PHONY: dummy
+dummy:
+	true
+' > Makefile
+make
+echo '0' >path0
+git update-index --add -- Makefile path0
+git commit -q -m 'initial commit'
+git tag working0
+# make some commits that don't cause problems
+for x in `test_seq 1 20`; do
+	echo "$x" >path0
+	git update-index --replace -- path0
+	git commit -q -m "working commit $x"
+	git tag "working$x"
+done
+# break the makefile
+sed -i.bak -e 's/true/false/' Makefile
+rm -f Makefile.bak
+! make
+git update-index --replace -- Makefile
+git commit -q -m "First broken commit"
+git tag broken0
+# make some more commits that still FTBFS
+echo "exit code was $?; flags are $-"
+for x in `test_seq 1 20`; do
+	echo "$x" >path0
+	git update-index --replace -- path0
+	git commit -q -m "broken build $x"
+	git tag "broken$x"
+done
+# repair it
+git checkout working0 -- Makefile
+make
+git update-index --replace -- Makefile
+git commit -q -m "First repaired commit"
+git tag fixed0
+# make some more commits with the bugfix
+for x in `test_seq 1 20`; do
+	echo "$x" >path0
+	git update-index --replace -- path0
+	git commit -q -m "fixed build $x"
+	git tag "fixed$x"
+done
+#sh -c 'bash -i <> /dev/tty >&0 2>&1'
+)
+
+SETUP
+
+test_expect_success 'setup first bisect' 'git bisect start && git bisect good working0 && git bisect bad broken9'
+
+test_expect_failure() {
+	shift
+	#echo arguments are "$*"
+	test_must_fail "$@"
+}
+
+# okay, let's do some negative testing
+
+OLDPATH="$PATH"
+
+PATH="$PATH:."
+
+test_expect_success 'setup this-is-not-a-valid-option' '
+ echo "#/bin/sh" > --this-is-not-a-valid-option &&
+ chmod a+x -- --this-is-not-a-valid-option &&
+ --this-is-not-a-valid-option'
+
+test_expect_failure 'git bisect run: reject unrecognized options' git bisect run --this-is-not-a-valid-option
+
+PATH="$OLDPATH"
+
+test_expect_failure 'git bisect run: reject invalid values for --expect'  git bisect run --expect=invalid make
+
+# okay, all of these settings are mutually exclusive (for sanity's sake, even with themselves)
+for a in --expect=bad --expect=good -r --invert; do
+	for b in --expect=bad --expect=good -r --invert; do
+		test_expect_failure 'git bisect run: reject multiple --expect options'  git bisect run $a $b make
+	done
+done
+
+# finally, verify that '--' is honored (note that will mess things up and require a bisect reset)
+PATH="$PATH:."
+
+test_expect_success 'git bisect run: honor --' 'git bisect run -- --this-is-not-a-valid-option'
+
+PATH="$OLDPATH"
+
+for expect_syntax in '' --expect=good; do
+
+	# now we have to undo the bisect run
+	test_expect_success 'restarting bisection' 'git bisect reset && git bisect start && git bisect good working0 && git bisect bad broken9'
+
+	test_expect_success "running bisection ($expect_syntax)" "
+git bisect run $expect_syntax make &&
+git log --oneline &&
+	# we should have determined that broken0 is the first bad version
+	test_cmp_rev broken0 refs/bisect/bad &&
+	# and that version should be the one checked out
+	test_cmp_rev broken0 HEAD
+"
+done
+
+
+# NOW, test the reverse:  find when we fixed it again
+
+for expect_syntax in -r --invert --expect=fixed; do
+
+	test_expect_success 'restarting bisection' 'git bisect reset && git bisect start --term-old=broken --term-new=fixed && git bisect broken broken20 && git bisect fixed fixed20'
+	test_expect_success "running bisection ($expect_syntax)" "
+		git bisect run $expect_syntax make &&
+		git log --oneline &&
+	test_cmp_rev fixed0 refs/bisect/fixed &&
+	test_cmp_rev fixed0 HEAD
+	"
+done
+
+test_expect_failure 'sanity check error message with custom terms' git bisect run --expect=invalid make
+
+
+test_done
-- 
2.20.1


^ permalink raw reply related

* Re: [RFC] xl command for visualizing recent history
From: Matthew DeVore @ 2020-01-03  2:51 UTC (permalink / raw)
  To: Emily Shaffer
  Cc: Matthew DeVore, git, Matthew DeVore, jonathantanmy, jrnieder,
	steadmon, johannes.schindelin, phillip.wood123
In-Reply-To: <20191031003929.GA22855@google.com>

Sorry for going dark on this topic. I'm still interested in working on this.
I've gotten so much feedback that I fear I won't be able to respond to all of
it in a thorough manner, but if that's the case, rest assured I have read your
feedback at least twice (including that from Phillip and Dscho) and will take
it into consideration going forward.

On Wed, Oct 30, 2019 at 05:39:29PM -0700, Emily Shaffer wrote:
> 
> Good to hear from you. One comment - the subject of your mail is "[RFC]"
> but I think folks are used to receiving mails with RFC patches if the
> subject line is formatted like it comes out of 'git format-patch' - that
> is, [RFC PATCH].
> 

Thanks for the tip.

> > 
> > "git xl" shows a graph of recent history, including all existing
> > branches (unless flagged with a config option) and their upstream
> > counterparts.  It is named such because it is easy to type and the
> > letter "x" looks like a small graph.
> 
> For me, that's not a very compelling reason to name something, and the
> only command with such a cryptic name in Git that I can think of is 'git
> am'. (mv, gc, rm, and p4 are somewhat self explanatory, and everything
> else besides 'gitk' is named with a full word.)

My thinking was that this would be a very common command, so it ought to be easy
to type. It would also be learned pretty early. I can't blame you for disliking
cryptic names, though. Here are some other ideas:

 - wip: for "work in progress" since it shows your repo minus upstreamed content
 - xlog: for "x" that looks like a graph (also, it sounds like "extended") and
   "log"
 - logx or log-x: for the same reason as above

I'll be working on the "ephemeral ref" portion of this as a separate work item
for now, which doesn't require settling on a name immediately.

> It looks like there's a decent amount of this commit message which
> really ought to be a note to the reviewers instead. Everything above the
> '---' goes into the commit message; everything below it will get
> scrubbed when the patch is applied, so you can give more casual notes
> there - for example this paragraph, as well as "Omissions I might/will
> fix".
> 

Good point, I didn't know about the "---" convention, so I'll keep this in mind.

> 
> If you're worried about folks using something like this in a script (and
> I would be, given that it's dynamically assigning nicknames to hashes)
> then you probably ought to mark it as a porcelain command in
> command-list.txt.
> 

I've made a note to add this to command-list.txt.

Thank you,
Matt

^ permalink raw reply

* What's cooking in git.git (Jan 2020, #01; Thu, 2)
From: Junio C Hamano @ 2020-01-02 23:33 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.

The first release candidate for this cycle v2.25.0-rc1 has been
tagged.

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"]

* bk/p4-misc-usability (2019-12-16) 2 commits
  (merged to 'next' on 2019-12-25 at b4789bcb08)
 + git-p4: show detailed help when parsing options fail
 + git-p4: yes/no prompts should sanitize user text
 (this branch is used by bk/p4-exception-cleanup.)

 Miscellaneous small UX improvements on "git-p4".


* em/freebsd-cirrus-ci (2019-12-20) 1 commit
  (merged to 'next' on 2019-12-25 at b6b609fbf0)
 + CI: add FreeBSD CI support via Cirrus-CI


* en/rebase-signoff-fix (2019-12-20) 1 commit
  (merged to 'next' on 2019-12-25 at 96d84920b5)
 + rebase: fix saving of --signoff state for am-based rebases

 "git rebase --signoff" stopped working when the command was written
 in C, which has been corrected.


* js/mingw-reserved-filenames (2019-12-21) 2 commits
  (merged to 'next' on 2019-12-30 at 5b814fd785)
 + mingw: refuse paths containing reserved names
 + mingw: short-circuit the conversion of `/dev/null` to UTF-16

 Forbid pathnames that the platform's filesystem cannot represent on
 MinGW.


* js/use-test-tool-on-path (2019-12-27) 1 commit
  (merged to 'next' on 2019-12-30 at fe59c1996d)
 + t3008: find test-tool through path lookup

 Test fix.

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

* dl/merge-autostash (2019-12-26) 17 commits
 - pull: pass --autostash to merge
 - t5520: make test_pull_autostash() accept expect_parent_num
 - merge: teach --autostash option
 - sequencer: unlink autostash in apply_autostash()
 - sequencer: extract perform_autostash() from rebase
 - rebase: generify create_autostash()
 - rebase: extract create_autostash()
 - reset: extract reset_head() from rebase
 - rebase: generify reset_head()
 - rebase: use apply_autostash() from sequencer.c
 - sequencer: make apply_rebase() accept a path
 - rebase: use read_oneliner()
 - sequencer: make read_oneliner() extern
 - sequencer: configurably warn on non-existent files
 - sequencer: use file strbuf for read_oneliner()
 - t7600: use test_write_lines()
 - Makefile: alphabetically sort += lists

 "git merge" learns the "--autostash" option.


* dl/test-must-fail-fixes-2 (2019-12-27) 16 commits
 - t4124: let sed open its own files
 - t4124: only mark git command with test_must_fail
 - t3507: use test_path_is_missing()
 - t3507: fix indentation
 - t3504: do check for conflict marker after failed cherry-pick
 - t3419: stop losing return code of git command
 - t3415: increase granularity of test_auto_{fixup,squash}()
 - t3415: stop losing return codes of git commands
 - t3310: extract common no_notes_merge_left()
 - t3030: use test_path_is_missing()
 - t2018: replace "sha" with "oid"
 - t2018: don't lose return code of git commands
 - t2018: teach do_checkout() to accept `!` arg
 - t2018: use test_must_fail for failing git commands
 - t2018: add space between function name and ()
 - t2018: remove trailing space from test description

 Test updates.

 Not quite.
 cf. <CAPig+cQo1nbRo=n8-XOtycGijj3k1y_Zozu7VW-WTSBB9LncqQ@mail.gmail.com>
 cf. <86lfqt36ah.fsf@gmail.com>


* jn/promote-proto2-to-default (2019-12-27) 5 commits
 - fetch: default to protocol version 2
 - protocol test: let protocol.version override GIT_TEST_PROTOCOL_VERSION
 - test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate
 - config doc: protocol.version is not experimental
 - fetch test: use more robust test for filtered objects
 (this branch uses jn/test-lint-one-shot-export-to-shell-function.)

 The transport protocol version 2 becomes the default one.


* ds/sparse-list-in-cone-mode (2019-12-30) 2 commits
 - sparse-checkout: document interactions with submodules
 - sparse-checkout: list directories in cone mode

 "git sparse-checkout list" subcommand learned to give its output in
 a more concise form when the "cone" mode is in effect.

 Will merge to 'next'.


* am/test-pathspec-f-f-error-cases (2020-01-02) 1 commit
 - t: add tests for error conditions with --pathspec-from-file

 More tests.

 Will merge to 'next'.


* ds/sparse-cone (2020-01-02) 1 commit
 - sparse-checkout: use extern for global variables

 Code cleanup.

 Will merge to 'next' and then to 'master'.


* en/merge-recursive-oid-eq-simplify (2020-01-02) 1 commit
 - merge-recursive: remove unnecessary oid_eq function

 Code cleanup.

 Will merge to 'next'.


* jt/sha1-file-remove-oi-skip-cached (2020-01-02) 1 commit
 - sha1-file: remove OBJECT_INFO_SKIP_CACHED

 has_object_file() said "no" given an object registered to the
 system via pretend_object_file(), making it inconsistent with
 read_object_file(), causing lazy fetch to attempt fetching an
 empty tree from promisor remotes.

 Will merge to 'next'.


* ds/commit-graph-set-size-mult (2020-01-02) 1 commit
 - commit-graph: prefer default size_mult when given zero

 The code to write split commit-graph file(s) upon fetching computed
 bogus value for the parameter used in splitting the resulting
 files, which has been corrected.

 Will merge to 'next'.

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

* ag/edit-todo-drop-check (2019-12-06) 2 commits
 - rebase-interactive: warn if commit is dropped with `rebase --edit-todo'
 - sequencer: move check_todo_list_from_file() to rebase-interactive.c

 Allow the rebase.missingCommitsCheck configuration to kick in when
 "rebase --edit-todo" and "rebase --continue" restarts the procedure.

 Broken.
 cf. <64aa4049-ee35-df4c-1e6c-80707f4f9070@gmail.com>


* es/pathspec-f-f-grep (2019-12-13) 1 commit
 - grep: support the --pathspec-from-file option

 "git grep" learned the "--pathspec-from-file" command line
 option.

 Waiting for review responses.
 cf. <20191204203911.237056-1-emilyshaffer@google.com>


* at/rebase-fork-point-regression-fix (2019-12-09) 1 commit
 - rebase: fix --fork-point with short refname

 The "--fork-point" mode of "git rebase" regressed when the command
 was rewritten in C back in 2.20 era, which has been corrected.

 Was waiting for discussion to settle.
 cf. <CAPig+cQ-3Ds41hr91fRo_GvuFMTP7zNVJtaSqi-Yccq4Pk-8Qg@mail.gmail.com>


* ma/config-bool-valex (2019-11-14) 8 commits
 - builtin/config: die if "value_regex" doesn't canonicalize as boolean
 - builtin/config: warn if "value_regex" doesn't canonicalize as boolean
 - builtin/config: canonicalize "value_regex" with `--type=bool-or-int`
 - builtin/config: canonicalize "value_regex" with `--type=bool`
 - builtin/config: collect "value_regexp" data in a struct
 - builtin/config: extract `handle_value_regex()` from `get_value()`
 - t1300: modernize part of script
 - config: make `git_parse_maybe_bool_text()` public

 "git config" can be told to affect the existing entries that
 "match" the given value via its value_regex argument.  It learned
 to normalize the value set in the configuration and the value given
 from the command line before computing they "match", e.g. "true" in
 the configuration file can now match with "yes" given from the
 command line.

 Needs a bit more work?
 cf. <CAN0heSrtwi9V607vBX9PMSfNLQ8iGcno6_iGuR4Fs8ndGxqh8A@mail.gmail.com>


* ds/fsmonitor-testing (2019-12-09) 8 commits
 - test-lib: clear watchman watches at test completion
 - t7519: disable external GIT_TEST_FSMONITOR variable
 - t7063: disable fsmonitor with status cache
 - tests: disable fsmonitor in submodule tests
 - t3030-merge-recursive.sh: disable fsmonitor when tweaking GIT_WORK_TREE
 - t1301-shared-repo.sh: disable FSMONITOR
 - fsmonitor: do not output to stderr for tests
 - fsmonitor: disable in a bare repo

 Updates around testing fsmoitor integration.

 cf. <pull.466.v2.git.1575907804.gitgitgadget@gmail.com>


* mt/threaded-grep-in-object-store (2019-10-02) 11 commits
 - grep: move driver pre-load out of critical section
 - grep: re-enable threads in non-worktree case
 - grep: protect packed_git [re-]initialization
 - grep: allow submodule functions to run in parallel
 - submodule-config: add skip_if_read option to repo_read_gitmodules()
 - grep: replace grep_read_mutex by internal obj read lock
 - object-store: allow threaded access to object reading
 - replace-object: make replace operations thread-safe
 - grep: fix racy calls in grep_objects()
 - grep: fix race conditions at grep_submodule()
 - grep: fix race conditions on userdiff calls

 Traditionally, we avoided threaded grep while searching in objects
 (as opposed to files in the working tree) as accesses to the object
 layer is not thread-safe.  This limitation is getting lifted.

 Expecting a reroll.
 cf. <CAHd-oW7UPSSExyLtfLMCObWogKrBOctYabrFrOdf9-4Q2PZmMg@mail.gmail.com>


* vn/reset-deleted-ita (2019-07-26) 1 commit
 - reset: unstage empty deleted ita files

 "git reset HEAD [<pathspec>]" did not reset an empty file that was
 added with the intent-to-add bit.

 Expecting a reroll.


* jn/unknown-index-extensions (2018-11-21) 2 commits
 - index: offer advice for unknown index extensions
 - index: do not warn about unrecognized extensions

 A bit too alarming warning given when unknown index extensions
 exist is getting revamped.

 Expecting a reroll.


* jc/format-patch-delay-message-id (2019-04-05) 1 commit
 - format-patch: move message-id and related headers to the end

 The location "git format-patch --thread" adds the Message-Id:
 header in the series of header fields has been moved down, which
 may help working around a suspected bug in GMail MSA, reported at
 <CAHk-=whP1stFZNAaJiMi5eZ9rj0MRt20Y_yHVczZPH+O01d+sA@mail.gmail.com>

 Waiting for feedback to see if it truly helps.
 Needs tests.


* js/protocol-advertise-multi (2018-12-28) 1 commit
 - protocol: advertise multiple supported versions

 The transport layer has been updated so that the protocol version
 used can be negotiated between the parties, by the initiator
 listing the protocol versions it is willing to talk, and the other
 side choosing from one of them.

 Expecting a reroll.
 cf. <CANq=j3u-zdb_FvNJGPCmygNMScseav63GhVvBX3NcVS4f7TejA@mail.gmail.com>


* mk/use-size-t-in-zlib (2018-10-15) 1 commit
 - zlib.c: use size_t for size

 The wrapper to call into zlib followed our long tradition to use
 "unsigned long" for sizes of regions in memory, which have been
 updated to use "size_t".

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

* hw/commit-advise-while-rejecting (2019-12-19) 1 commit
  (merged to 'next' on 2019-12-30 at e26700d582)
 + commit: honor advice.statusHints when rejecting an empty commit

 "git commit" gives output similar to "git status" when there is
 nothing to commit, but without honoring the advise.statusHints
 configuration variable, which has been corrected.

 Will cook in 'next'.


* yz/p4-py3 (2019-12-17) 14 commits
  (merged to 'next' on 2019-12-30 at cd67de932d)
 + ci: also run linux-gcc pipeline with python3.5 environment
 + git-p4: use python3's input() everywhere
 + git-p4: simplify regex pattern generation for parsing diff-tree
 + git-p4: use dict.items() iteration for python3 compatibility
 + git-p4: use functools.reduce instead of reduce
 + git-p4: fix freezing while waiting for fast-import progress
 + git-p4: use marshal format version 2 when sending to p4
 + git-p4: open .gitp4-usercache.txt in text mode
 + git-p4: convert path to unicode before processing them
 + git-p4: encode/decode communication with git for python3
 + git-p4: encode/decode communication with p4 for python3
 + git-p4: remove string type aliasing
 + git-p4: change the expansion test from basestring to list
 + git-p4: make python2.7 the oldest supported version

 Update "git p4" to work with Python 3.

 Will cook in 'next'.


* hi/gpg-mintrustlevel (2019-12-27) 1 commit
  (merged to 'next' on 2019-12-30 at 6c790280d2)
 + gpg-interface: add minTrustLevel as a configuration option

 gpg.minTrustLevel configuration variable has been introduced to
 tell various signature verification codepaths the required minimum
 trust level.

 Will cook in 'next'.


* sg/completion-worktree (2019-12-19) 6 commits
  (merged to 'next' on 2019-12-25 at 42c895ab3b)
 + completion: list paths and refs for 'git worktree add'
 + completion: list existing working trees for 'git worktree' subcommands
 + completion: simplify completing 'git worktree' subcommands and options
 + completion: return the index of found word from __git_find_on_cmdline()
 + completion: clean up the __git_find_on_cmdline() helper function
 + t9902-completion: add tests for the __git_find_on_cmdline() helper

 The command line completion (in contrib/) learned to complete
 subcommands and arguments to "git worktree".

 Will cook in 'next'.


* dl/credential-netrc (2019-12-20) 2 commits
  (merged to 'next' on 2019-12-25 at 1fd27f81ac)
 + contrib/credential/netrc: work outside a repo
 + contrib/credential/netrc: make PERL_PATH configurable

 Sample credential helper for using .netrc has been updated to work
 out of the box.

 Will cook in 'next'.


* dl/test-must-fail-fixes (2019-12-20) 15 commits
  (merged to 'next' on 2019-12-25 at 3ef7c70bc5)
 + t1507: inline full_name()
 + t1507: run commands within test_expect_success
 + t1507: stop losing return codes of git commands
 + t1501: remove use of `test_might_fail cp`
 + t1409: use test_path_is_missing()
 + t1409: let sed open its own input file
 + t1307: reorder `nongit test_must_fail`
 + t1306: convert `test_might_fail rm` to `rm -f`
 + t0020: use ! check_packed_refs_marked
 + t0020: don't use `test_must_fail has_cr`
 + t0003: don't use `test_must_fail attr_check`
 + t0003: use test_must_be_empty()
 + t0003: use named parameters in attr_check()
 + t0000: replace test_must_fail with run_sub_test_lib_test_err()
 + t/lib-git-p4: use test_path_is_missing()

 Test clean-up.

 Will cook in 'next'.


* en/rebase-backend (2019-12-26) 15 commits
  (merged to 'next' on 2019-12-30 at 5b58e268d6)
 + rebase: change the default backend from "am" to "merge"
 + rebase: make the backend configurable via config setting
 + rebase tests: repeat some tests using the merge backend instead of am
 + rebase tests: mark tests specific to the am-backend with --am
 + git-prompt: change the prompt for interactive-based rebases
 + rebase: add an --am option
 + rebase: move incompatibility checks between backend options a bit earlier
 + git-rebase.txt: add more details about behavioral differences of backends
 + rebase: allow more types of rebases to fast-forward
 + t3432: make these tests work with either am or merge backends
 + rebase: fix handling of restrict_revision
 + rebase: make sure to pass along the quiet flag to the sequencer
 + rebase, sequencer: remove the broken GIT_QUIET handling
 + t3406: simplify an already simple test
 + rebase: extend the options for handling of empty commits

 "git rebase" has learned to use the sequencer backend by default,
 while allowing "--am" option to go back to the traditional "am"
 backend.

 Will cook in 'next'.


* bc/hash-independent-tests-part-7 (2019-12-24) 20 commits
  (merged to 'next' on 2019-12-30 at 0eedb894ba)
 + t5604: make hash independent
 + t5601: switch into repository to hash object
 + t5562: use $ZERO_OID
 + t5540: make hash size independent
 + t5537: make hash size independent
 + t5530: compute results based on object length
 + t5512: abstract away SHA-1-specific constants
 + t5510: make hash size independent
 + t5504: make hash algorithm independent
 + t5324: make hash size independent
 + t5319: make test work with SHA-256
 + t5319: change invalid offset for SHA-256 compatibility
 + t5318: update for SHA-256
 + t4300: abstract away SHA-1-specific constants
 + t4204: make hash size independent
 + t4202: abstract away SHA-1-specific constants
 + t4200: make hash size independent
 + t4134: compute appropriate length constant
 + t4066: compute index line in diffs
 + t4054: make hash-size independent

 Preparation of test scripts for the day when the object names will
 use SHA-256 continues.

 Will cook in 'next'.


* bk/p4-exception-cleanup (2019-12-16) 2 commits
 - git-p4: failure because of RCS keywords should show help
 - git-p4: wrap patchRCSKeywords test to revert changes on failure

 Will discard for now.


* ew/packfile-syscall-optim (2019-12-26) 2 commits
  (merged to 'next' on 2019-12-30 at ada15abf22)
 + packfile: replace lseek+read with pread
 + packfile: remove redundant fcntl F_GETFD/F_SETFD

 Code cleanup.

 Will cook in 'next'.


* jn/test-lint-one-shot-export-to-shell-function (2019-12-27) 3 commits
  (merged to 'next' on 2019-12-30 at d08f039473)
 + fetch test: mark test of "skipping" haves as v0-only
 + t/check-non-portable-shell: detect "FOO= shell_func", too
 + fetch test: avoid use of "VAR= cmd" with a shell function
 (this branch is used by jn/promote-proto2-to-default.)

 The test-lint machinery knew to check "VAR=VAL shell_function"
 construct, but did not check "VAR= shell_funciton", which has been
 corrected.

 Will cook in 'next'.


* js/add-p-leftover-bits (2019-12-24) 9 commits
 - ci: include the built-in `git add -i` in the `linux-gcc` job
 - built-in add -p: handle Escape sequences more efficiently
 - built-in add -p: handle Escape sequences in interactive.singlekey mode
 - built-in add -p: respect the `interactive.singlekey` config setting
 - terminal: add a new function to read a single keystroke
 - terminal: accommodate Git for Windows' default terminal
 - terminal: make the code of disable_echo() reusable
 - built-in add -p: handle diff.algorithm
 - built-in add -p: support interactive.diffFilter
 (this branch uses js/patch-mode-in-others-in-c.)


* js/mingw-loosen-overstrict-tree-entry-checks (2020-01-02) 1 commit
  (merged to 'next' on 2020-01-02 at 3088a0ccf1)
 + mingw: only test index entries for backslashes, not tree entries

 An earlier update to Git for Windows declared that a tree object is
 invalid if it has a path component with backslash in it, which was
 overly strict, which has been corrected.  The only protection the
 Windows users need is to prevent such path (or any path that their
 filesystem cannot check out) from entering the index.

 Will merge to 'master'.


* pb/clarify-line-log-doc (2019-12-26) 2 commits
  (merged to 'next' on 2019-12-30 at 7a4e15a436)
 + doc: log, gitk: line-log arguments must exist in starting revision
 + doc: log, gitk: document accepted line-log diff formats

 Doc update.

 Will cook in 'next'.


* pw/advise-rebase-skip (2019-12-06) 9 commits
 - rebase -i: leave CHERRY_PICK_HEAD when there are conflicts
 - rebase: fix advice when a fixup creates an empty commit
 - commit: give correct advice for empty commit during a rebase
 - commit: encapsulate determine_whence() for sequencer
 - commit: use enum value for multiple cherry-picks
 - sequencer: write CHERRY_PICK_HEAD for reword and edit
 - cherry-pick: check commit error messages
 - cherry-pick: add test for `--skip` advice in `git commit`
 - t3404: use test_cmp_rev

 The mechanism to prevent "git commit" from making an empty commit
 or amending during an interrupted cherry-pick was broken during the
 rewrite of "git rebase" in C, which has been corrected.

 What's the status of this one?
 The tip two are still RFC.


* js/patch-mode-in-others-in-c (2019-12-21) 7 commits
  (merged to 'next' on 2019-12-30 at a767b89288)
 + commit --interactive: make it work with the built-in `add -i`
 + built-in add -p: implement the "worktree" patch modes
 + built-in add -p: implement the "checkout" patch modes
 + built-in stash: use the built-in `git add -p` if so configured
 + legacy stash -p: respect the add.interactive.usebuiltin setting
 + built-in add -p: implement the "stash" and "reset" patch modes
 + built-in add -p: prepare for patch modes other than "stage"
 (this branch is used by js/add-p-leftover-bits.)

 The effort to move "git-add--interactive" to C continues.

 Will cook in 'next'.


* jk/packfile-reuse-cleanup (2019-10-23) 9 commits
  (merged to 'next' on 2019-11-19 at 9683853939)
 + pack-objects: improve partial packfile reuse
 + builtin/pack-objects: introduce obj_is_packed()
 + pack-objects: introduce pack.allowPackReuse
 + csum-file: introduce hashfile_total()
 + pack-bitmap: introduce bitmap_walk_contains()
 + pack-bitmap: don't rely on bitmap_git->reuse_objects
 + ewah/bitmap: introduce bitmap_word_alloc()
 + packfile: expose get_delta_base()
 + builtin/pack-objects: report reused packfile objects

 The way "git pack-objects" reuses objects stored in existing pack
 to generate its result has been improved.

 Hold.  There is an update to these patches that currently are on 'next'.
 cf. <20191115180319.113991-1-jonathantanmy@google.com>

--------------------------------------------------
[Discarded]

* js/advise-rebase-skip (2019-10-23) 3 commits
 . commit: give correct advice for empty commit during a rebase
 . sequencer: export the function to get the path of `.git/rebase-merge/`
 . cherry-pick: add test for `--skip` advice in `git commit`

 The logic used in "git commit" to give hints and errors depending
 on what operation was in progress learned to distinguish rebase and
 cherry-pick better.

 Superseded by pw/advise-rebase-skip



^ permalink raw reply

* [ANNOUNCE] Git v2.25.0-rc1
From: Junio C Hamano @ 2020-01-02 23:33 UTC (permalink / raw)
  To: git; +Cc: Linux Kernel, git-packagers

A release candidate Git v2.25.0-rc1 is now available for testing
at the usual places.  It is comprised of 540 non-merge commits
since v2.24.0, contributed by 63 people, 24 of which are new faces.

The tarballs are found at:

    https://www.kernel.org/pub/software/scm/git/testing/

The following public repositories all have a copy of the
'v2.25.0-rc1' tag and the 'master' branch that the tag points at:

  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = https://github.com/gitster/git

New contributors whose contributions weren't in v2.24.0 are as follows.
Welcome to the Git development community!

  Ben Keene, Colin Stolley, Dominic Jäger, Erik Chen, Hariom
  Verma, Heba Waly, James Coglan, James Shubin, Josh Holland,
  Łukasz Niemier, Manish Goregaokar, Matthew Rogers, Mihail
  Atanassov, Miriam Rubio, Nathan Stocks, Naveen Nathan, Nika
  Layzell, Philippe Blain, Prarit Bhargava, r.burenkov, Ruud van
  Asseldonk, ryenus, Slavica Đukić, and Utsav Shah.

Returning contributors who helped this release are as follows.
Thanks for your continued support.

  Alban Gruin, Alexandr Miloslavskiy, Andreas Schwab, Andrei
  Rybak, brian m. carlson, Daniel Ferreira, Denton Liu, Derrick
  Stolee, Dimitriy Ryazantcev, Đoàn Trần Công Danh, Ed
  Maste, Elia Pinto, Elijah Newren, Emily Shaffer, Garima Singh,
  Hans Jerry Illikainen, Jean-Noël Avila, Jeff Hostetler, Jeff
  King, Johannes Schindelin, Johannes Sixt, Jonathan Nieder,
  Jonathan Tan, Junio C Hamano, Kevin Willford, Martin Ågren,
  Mike Hommey, Philip Oakley, Phillip Wood, Pratyush Yadav,
  Ralf Thielow, René Scharfe, Robin H. Johnson, Rohit Ashiwal,
  SZEDER Gábor, Tanushree Tumane, Thomas Gummerer, Todd Zullinger,
  and William Baker.

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

Git 2.25 Release Notes (draft)
==============================

Updates since v2.24
-------------------

Backward compatibility notes


UI, Workflows & Features

 * A tutorial on object enumeration has been added.

 * The branch description ("git branch --edit-description") has been
   used to fill the body of the cover letters by the format-patch
   command; this has been enhanced so that the subject can also be
   filled.

 * "git rebase --preserve-merges" has been marked as deprecated; this
   release stops advertising it in the "git rebase -h" output.

 * The code to generate multi-pack index learned to show (or not to
   show) progress indicators.

 * "git apply --3way" learned to honor merge.conflictStyle
   configuration variable, like merges would.

 * The custom format for "git log --format=<format>" learned the l/L
   placeholder that is similar to e/E that fills in the e-mail
   address, but only the local part on the left side of '@'.

 * Documentation pages for "git shortlog" now list commit limiting
   options explicitly.

 * The patterns to detect function boundary for Elixir language has
   been added.

 * The completion script (in contrib/) learned that the "--onto"
   option of "git rebase" can take its argument as the value of the
   option.

 * The userdiff machinery has been taught that "async def" is another
   way to begin a "function" in Python.

 * "git range-diff" learned to take the "--notes=<ref>" and the
   "--no-notes" options to control the commit notes included in the
   log message that gets compared.

 * "git rev-parse --show-toplevel" run outside of any working tree did
   not error out, which has been corrected.

 * A few commands learned to take the pathspec from the standard input
   or a named file, instead of taking it as the command line
   arguments, with the "--pathspec-from-file" option.

 * "git rebase -i" learned a few options that are known by "git
   rebase" proper.

 * "git submodule" learned a subcommand "set-url".

 * "git log" family learned "--pretty=reference" that gives the name
   of a commit in the format that is often used to refer to it in log
   messages.

 * The interaction between "git clone --recurse-submodules" and
   alternate object store was ill-designed.  The documentation and
   code have been taught to make more clear recommendations when the
   users see failures.

 * Management of sparsely checked-out working tree has gained a
   dedicated "sparse-checkout" command.

 * Miscellaneous small UX improvements on "git-p4".


Performance, Internal Implementation, Development Support etc.

 * Debugging support for lazy cloning has been a bit improved.

 * Move the definition of a set of bitmask constants from 0ctal
   literal to (1U<<count) notation.

 * Test updates to prepare for SHA-2 transition continues.

 * Crufty code and logic accumulated over time around the object
   parsing and low-level object access used in "git fsck" have been
   cleaned up.

 * The implementation of "git log --graph" got refactored and then its
   output got simplified.

 * Follow recent push to move API docs from Documentation/ to header
   files and update config.h

 * "git bundle" has been taught to use the parse options API.  "git
   bundle verify" learned "--quiet" and "git bundle create" learned
   options to control the progress output.

 * Handling of commit objects that use non UTF-8 encoding during
   "rebase -i" has been improved.

 * The beginning of rewriting "git add -i" in C.

 * A label used in the todo list that are generated by "git rebase
   --rebase-merges" is used as a part of a refname; the logic to come
   up with the label has been tightened to avoid names that cannot be
   used as such.

 * The logic to avoid duplicate label names generated by "git rebase
   --rebase-merges" forgot that the machinery itself uses "onto" as a
   label name, which must be avoided by auto-generated labels, which
   has been corrected.

 * We have had compatibility fallback macro definitions for "PRIuMAX",
   "PRIu32", etc. but did not for "PRIdMAX", while the code used the
   last one apparently without any hiccup reported recently.  The
   fallback macro definitions for these <inttypes.h> macros that must
   appear in C99 systems have been removed.

 * Recently we have declared that GIT_TEST_* variables take the
   usual boolean values (it used to be that some used "non-empty
   means true" and taking GIT_TEST_VAR=YesPlease as true); make
   sure we notice and fail when non-bool strings are given to
   these variables.

 * Users of oneway_merge() (like "reset --hard") learned to take
   advantage of fsmonitor to avoid unnecessary lstat(2) calls.

 * Performance tweak on "git push" into a repository with many refs
   that point at objects we have never heard of.

 * PerfTest fix to avoid stale result mixed up with the latest round
   of test results.

 * Hide lower-level verify_signed-buffer() API as a pure helper to
   implement the public check_signature() function, in order to
   encourage new callers to use the correct and more strict
   validation.

 * Unnecessary reading of state variables back from the disk during
   sequencer operation has been reduced.

 * The code has been made to avoid gmtime() and localtime() and prefer
   their reentrant counterparts.

 * The effort to reimplement "git add -i" in C continues.

 * In a repository with many packfiles, the cost of the procedure that
   avoids registering the same packfile twice was unnecessarily high
   by using an inefficient search algorithm, which has been corrected.

 * Redo "git name-rev" to avoid recursive calls.

 * FreeBSD CI support via Cirrus-CI has been added.


Fixes since v2.24
-----------------

 * "rebase -i" ceased to run post-commit hook by mistake in an earlier
   update, which has been corrected.

 * "git notes copy $original" ought to copy the notes attached to the
   original object to HEAD, but a mistaken tightening to command line
   parameter validation made earlier disabled that feature by mistake.

 * When all files from some subdirectory were renamed to the root
   directory, the directory rename heuristics would fail to detect that
   as a rename/merge of the subdirectory to the root directory, which has
   been corrected.

 * Code clean-up and a bugfix in the logic used to tell worktree local
   and repository global refs apart.
   (merge f45f88b2e4 sg/dir-trie-fixes later to maint).

 * "git stash save" in a working tree that is sparsely checked out
   mistakenly removed paths that are outside the area of interest.
   (merge 4a58c3d7f7 js/update-index-ignore-removal-for-skip-worktree later to maint).

 * "git rev-parse --git-path HEAD.lock" did not give the right path
   when run in a secondary worktree.
   (merge 76a53d640f js/git-path-head-dot-lock-fix later to maint).

 * "git merge --no-commit" needs "--no-ff" if you do not want to move
   HEAD, which has been corrected in the manual page for "git bisect".
   (merge 8dd327b246 ma/bisect-doc-sample-update later to maint).

 * "git worktree add" internally calls "reset --hard" that should not
   descend into submodules, even when submodule.recurse configuration
   is set, but it was affected.  This has been corrected.
   (merge 4782cf2ab6 pb/no-recursive-reset-hard-in-worktree-add later to maint).

 * Messages from die() etc. can be mixed up from multiple processes
   without even line buffering on Windows, which has been worked
   around.
   (merge 116d1fa6c6 js/vreportf-wo-buffering later to maint).

 * HTTP transport had possible allocator/deallocator mismatch, which
   has been corrected.

 * The watchman integration for fsmonitor was racy, which has been
   corrected to be more conservative.
   (merge dd0b61f577 kw/fsmonitor-watchman-fix later to maint).

 * Fetching from multiple remotes into the same repository in parallel
   had a bad interaction with the recent change to (optionally) update
   the commit-graph after a fetch job finishes, as these parallel
   fetches compete with each other.  Which has been corrected.

 * Recent update to "git stash pop" made the command empty the index
   when run with the "--quiet" option, which has been corrected.

 * "git fetch" codepath had a big "do not lazily fetch missing objects
   when I ask if something exists" switch.  This has been corrected by
   marking the "does this thing exist?" calls with "if not please do not
   lazily fetch it" flag.

 * Test update to avoid wasted cycles.
   (merge e0316695ec sg/skip-skipped-prereq later to maint).

 * Error handling after "git push" finishes sending the packdata and
   waits for the response to the remote side has been improved.
   (merge ad7a403268 jk/send-pack-remote-failure later to maint).

 * Some codepaths in "gitweb" that forgot to escape URLs generated
   based on end-user input have been corrected.
   (merge a376e37b2c jk/gitweb-anti-xss later to maint).

 * CI jobs for macOS has been made less chatty when updating perforce
   package used during testing.
   (merge 0dbc4a0edf jc/azure-ci-osx-fix-fix later to maint).

 * "git unpack-objects" used to show progress based only on the number
   of received and unpacked objects, which stalled when it has to
   handle an unusually large object.  It now shows the throughput as
   well.
   (merge bae60ba7e9 sg/unpack-progress-throughput later to maint).

 * The sequencer machinery compared the HEAD and the state it is
   attempting to commit to decide if the result would be a no-op
   commit, even when amending a commit, which was incorrect, and
   has been corrected.

 * The code to parse GPG output used to assume incorrectly that the
   finterprint for the primary key would always be present for a valid
   signature, which has been corrected.
   (merge 67a6ea6300 hi/gpg-optional-pkfp-fix later to maint).

 * "git submodule status" and "git submodule status --cached" show
   different things, but the documentation did not cover them
   correctly, which has been corrected.
   (merge 8d483c8408 mg/doc-submodule-status-cached later to maint).

 * "git reset --patch $object" without any pathspec should allow a
   tree object to be given, but incorrectly required a committish,
   which has been corrected.

 * "git submodule status" that is run from a subdirectory of the
   superproject did not work well, which has been corrected.
   (merge 1f3aea22c7 mg/submodule-status-from-a-subdirectory later to maint).

 * The revision walking machinery uses resources like per-object flag
   bits that need to be reset before a new iteration of walking
   begins, but the resources related to topological walk were not
   cleared correctly, which has been corrected.
   (merge 0aa0c2b2ec mh/clear-topo-walk-upon-reset later to maint).

 * TravisCI update.
   (merge 176441bfb5 sg/osx-force-gcc-9 later to maint).

 * While running "revert" or "cherry-pick --edit" for multiple
   commits, a recent regression incorrectly detected "nothing to
   commit, working tree clean", instead of replaying the commits,
   which has been corrected.
   (merge befd4f6a81 sg/assume-no-todo-update-in-cherry-pick later to maint).

 * Work around a issue where a FD that is left open when spawning a
   child process and is kept open in the child can interfere with the
   operation in the parent process on Windows.

 * One kind of progress messages were always given during commit-graph
   generation, instead of following the "if it takes more than two
   seconds, show progress" pattern, which has been corrected.

 * "git rebase" did not work well when format.useAutoBase
   configuration variable is set, which has been corrected.

 * The "diff" machinery learned not to lose added/removed blank lines
   in the context when --ignore-blank-lines and --function-context are
   used at the same time.
   (merge 0bb313a552 rs/xdiff-ignore-ws-w-func-context later to maint).

 * The test on "fast-import" used to get stuck when "fast-import" died
   in the middle.
   (merge 0d9b0d7885 sg/t9300-robustify later to maint).

 * "git format-patch" can take a set of configured format.notes values
   to specify which notes refs to use in the log message part of the
   output.  The behaviour of this was not consistent with multiple
   --notes command line options, which has been corrected.
   (merge e0f9095aaa dl/format-patch-notes-config-fixup later to maint).

 * "git p4" used to ignore lfs.storage configuration variable, which
   has been corrected.
   (merge ea94b16fb8 rb/p4-lfs later to maint).

 * Assorted fixes to the directory traversal API.
   (merge 6836d2fe06 en/fill-directory-fixes later to maint).

 * Forbid pathnames that the platform's filesystem cannot represent on
   MinGW.
   (merge 4dc42c6c18 js/mingw-reserved-filenames later to maint).

 * "git rebase --signoff" stopped working when the command was written
   in C, which has been corrected.
   (merge 4fe7e43c53 en/rebase-signoff-fix later to maint).

 * Other code cleanup, docfix, build fix, etc.
   (merge 80736d7c5e jc/am-show-current-patch-docfix later to maint).
   (merge 8b656572ca sg/commit-graph-usage-fix later to maint).
   (merge 6c02042139 mr/clone-dir-exists-to-path-exists later to maint).
   (merge 44ae131e38 sg/blame-indent-heuristics-is-now-the-default later to maint).
   (merge 0115e5d929 dl/doc-diff-no-index-implies-exit-code later to maint).
   (merge 270de6acbe en/t6024-style later to maint).
   (merge 14c4776d75 ns/test-desc-typofix later to maint).
   (merge 68d40f30c4 dj/typofix-merge-strat later to maint).
   (merge f66e0401ab jk/optim-in-pack-idx-conversion later to maint).
   (merge 169bed7421 rs/parse-options-dup-null-fix later to maint).
   (merge 51bd6be32d rs/use-copy-array-in-mingw-shell-command-preparation later to maint).
   (merge b018719927 ma/t7004 later to maint).
   (merge 932757b0cc ar/install-doc-update-cmds-needing-the-shell later to maint).
   (merge 46efd28be1 ep/guard-kset-tar-headers later to maint).
   (merge 9e5afdf997 ec/fetch-mark-common-refs-trace2 later to maint).
   (merge f0e58b3fe8 pb/submodule-update-fetches later to maint).
   (merge 2a02262078 dl/t5520-cleanup later to maint).
   (merge a4fb016ba1 js/pkt-line-h-typofix later to maint).
   (merge 54a7a64613 rs/simplify-prepare-cmd later to maint).
   (merge 3eae30e464 jk/lore-is-the-archive later to maint).
   (merge 14b7664df8 dl/lore-is-the-archive later to maint).
   (merge 0e40a73a4c po/bundle-doc-clonable later to maint).
   (merge e714b898c6 as/t7812-missing-redirects-fix later to maint).
   (merge 528d9e6d01 jk/perf-wo-git-dot-pm later to maint).
   (merge fc42f20e24 sg/test-squelch-noise-in-commit-bulk later to maint).
   (merge c64368e3a2 bc/t9001-zsh-in-posix-emulation-mode later to maint).
   (merge 11de8dd7ef dr/branch-usage-casefix later to maint).
   (merge e05e8cf074 rs/archive-zip-code-cleanup later to maint).
   (merge 147ee35558 rs/commit-export-env-simplify later to maint).
   (merge 4507ecc771 rs/patch-id-use-oid-to-hex later to maint).
   (merge 51a0a4ed95 mr/bisect-use-after-free later to maint).
   (merge cc2bd5c45d pb/submodule-doc-xref later to maint).
   (merge df5be01669 ja/doc-markup-cleanup later to maint).
   (merge 7c5cea7242 mr/bisect-save-pointer-to-const-string later to maint).
   (merge 20a67e8ce9 js/use-test-tool-on-path later to maint).

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

Changes since v2.24.0 are as follows:

Alban Gruin (6):
      sequencer: update `total_nr' when adding an item to a todo list
      sequencer: update `done_nr' when skipping commands in a todo list
      sequencer: move the code writing total_nr on the disk to a new function
      rebase: fill `squash_onto' in get_replay_opts()
      sequencer: directly call pick_commits() from complete_action()
      sequencer: fix a memory leak in sequencer_continue()

Alexandr Miloslavskiy (14):
      parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`
      pathspec: add new function to parse file
      doc: reset: synchronize <pathspec> description
      reset: support the `--pathspec-from-file` option
      doc: commit: synchronize <pathspec> description
      commit: support the --pathspec-from-file option
      cmd_add: prepare for next patch
      add: support the --pathspec-from-file option
      doc: checkout: remove duplicate synopsis
      doc: checkout: fix broken text reference
      doc: checkout: synchronize <pathspec> description
      doc: restore: synchronize <pathspec> description
      checkout, restore: support the --pathspec-from-file option
      commit: forbid --pathspec-from-file --all

Andreas Schwab (1):
      t7812: add missing redirects

Andrei Rybak (1):
      INSTALL: use existing shell scripts as example

Ben Keene (2):
      git-p4: yes/no prompts should sanitize user text
      git-p4: show detailed help when parsing options fail

Colin Stolley (1):
      packfile.c: speed up loading lots of packfiles

Daniel Ferreira (2):
      diff: export diffstat interface
      built-in add -i: implement the `status` command

Denton Liu (93):
      format-patch: replace erroneous and condition
      format-patch: use enum variables
      format-patch: teach --cover-from-description option
      rebase: hide --preserve-merges option
      t4108: replace create_file with test_write_lines
      t4108: remove git command upstream of pipe
      t4108: use `test_config` instead of `git config`
      t4108: demonstrate bug in apply
      apply: respect merge.conflictStyle in --3way
      submodule: teach set-url subcommand
      git-diff.txt: document return code of `--no-index`
      completion: learn to complete `git rebase --onto=`
      t4215: use helper function to check output
      argv-array: add space after `while`
      rev-list-options.txt: remove reference to --show-notes
      SubmittingPatches: use generic terms for hash
      pretty-formats.txt: use generic terms for hash
      SubmittingPatches: remove dq from commit reference
      completion: complete `tformat:` pretty format
      revision: make get_revision_mark() return const pointer
      pretty.c: inline initalize format_context
      t4205: cover `git log --reflog -z` blindspot
      pretty: add struct cmt_fmt_map::default_date_mode_type
      pretty: implement 'reference' format
      SubmittingPatches: use `--pretty=reference`
      pretty-options.txt: --notes accepts a ref instead of treeish
      t3206: remove spaces after redirect operators
      t3206: disable parameter substitution in heredoc
      t3206: s/expected/expect/
      t3206: range-diff compares logs with commit notes
      range-diff: output `## Notes ##` header
      range-diff: pass through --notes to `git log`
      format-patch: pass notes configuration to range-diff
      t0000: test multiple local assignment
      t: teach test_cmp_rev to accept ! for not-equals
      t5520: improve test style
      t5520: use sq for test case names
      t5520: let sed open its own input
      t5520: replace test -f with test-lib functions
      t5520: remove spaces after redirect operator
      t5520: use test_line_count where possible
      t5520: replace test -{n,z} with test-lib functions
      t5520: use test_cmp_rev where possible
      t5520: test single-line files by git with test_cmp
      t5520: don't put git in upstream of pipe
      t5520: replace $(cat ...) comparison with test_cmp
      t5520: remove redundant lines in test cases
      t5520: replace `! git` with `test_must_fail git`
      lib-bash.sh: move `then` onto its own line
      apply-one-time-sed.sh: modernize style
      t0014: remove git command upstream of pipe
      t0090: stop losing return codes of git commands
      t3301: stop losing return codes of git commands
      t3600: use test_line_count() where possible
      t3600: stop losing return codes of git commands
      t3600: comment on inducing SIGPIPE in `git rm`
      t4015: stop losing return codes of git commands
      t4015: use test_write_lines()
      t4138: stop losing return codes of git commands
      t5317: stop losing return codes of git commands
      t5317: use ! grep to check for no matching lines
      t5703: simplify one-time-sed generation logic
      t5703: stop losing return codes of git commands
      t7501: remove spaces after redirect operators
      t7501: stop losing return codes of git commands
      t7700: drop redirections to /dev/null
      t7700: remove spaces after redirect operators
      t7700: move keywords onto their own line
      t7700: s/test -f/test_path_is_file/
      doc: replace MARC links with lore.kernel.org
      RelNotes: replace Gmane with real Message-IDs
      doc: replace LKML link with lore.kernel.org
      t7700: consolidate code into test_no_missing_in_packs()
      t7700: consolidate code into test_has_duplicate_object()
      t7700: replace egrep with grep
      t7700: make references to SHA-1 generic
      t7700: stop losing return codes of git commands
      t3400: demonstrate failure with format.useAutoBase
      format-patch: fix indentation
      t4014: use test_config()
      format-patch: teach --no-base
      rebase: fix format.useAutoBase breakage
      t3206: fix incorrect test name
      range-diff: mark pointers as const
      range-diff: clear `other_arg` at end of function
      notes: rename to load_display_notes()
      notes: create init_display_notes() helper
      notes: extract logic into set_display_notes()
      format-patch: use --notes behavior for format.notes
      format-patch: move git_config() before repo_init_revisions()
      config/format.txt: clarify behavior of multiple format.notes
      notes: break set_display_notes() into smaller functions
      notes.h: fix typos in comment

Derrick Stolee (22):
      test-tool: use 'read-graph' helper
      sparse-checkout: create builtin with 'list' subcommand
      sparse-checkout: create 'init' subcommand
      clone: add --sparse mode
      sparse-checkout: 'set' subcommand
      sparse-checkout: add '--stdin' option to set subcommand
      sparse-checkout: create 'disable' subcommand
      sparse-checkout: add 'cone' mode
      sparse-checkout: use hashmaps for cone patterns
      sparse-checkout: init and set in cone mode
      unpack-trees: hash less in cone mode
      unpack-trees: add progress to clear_ce_flags()
      sparse-checkout: sanitize for nested folders
      sparse-checkout: update working directory in-process
      sparse-checkout: use in-process update for disable subcommand
      sparse-checkout: write using lockfile
      sparse-checkout: cone mode should not interact with .gitignore
      sparse-checkout: update working directory in-process for 'init'
      sparse-checkout: check for dirty status
      progress: create GIT_PROGRESS_DELAY
      commit-graph: use start_delayed_progress()
      sparse-checkout: respect core.ignoreCase in cone mode

Dimitriy Ryazantcev (1):
      l10n: minor case fix in 'git branch' '--unset-upstream' description

Dominic Jäger (1):
      merge-strategies: fix typo "reflected to" to "reflected in"

Ed Maste (4):
      t4210: skip i18n tests that don't work on FreeBSD
      userdiff: remove empty subexpression from elixir regex
      CI: add FreeBSD CI support via Cirrus-CI
      sparse-checkout: improve OS ls compatibility

Elia Pinto (1):
      kset.h, tar.h: add missing header guard to prevent multiple inclusion

Elijah Newren (27):
      merge-recursive: clean up get_renamed_dir_portion()
      merge-recursive: fix merging a subdirectory into the root directory
      t604[236]: do not run setup in separate tests
      Documentation: fix a bunch of typos, both old and new
      Fix spelling errors in documentation outside of Documentation/
      git-filter-branch.txt: correct argument name typo
      hashmap: fix documentation misuses of -> versus .
      name-hash.c: remove duplicate word in comment
      t6024: modernize style
      Fix spelling errors in code comments
      Fix spelling errors in comments of testcases
      Fix spelling errors in names of tests
      Fix spelling errors in messages shown to users
      Fix spelling errors in test commands
      sha1dc: fix trivial comment spelling error
      multimail: fix a few simple spelling errors
      Fix spelling errors in no-longer-updated-from-upstream modules
      t3011: demonstrate directory traversal failures
      Revert "dir.c: make 'git-status --ignored' work within leading directories"
      dir: remove stray quote character in comment
      dir: exit before wildcard fall-through if there is no wildcard
      dir: break part of read_directory_recursive() out for reuse
      t3434: mark successful test as such
      dir: fix checks on common prefix directory
      dir: synchronize treat_leading_path() and read_directory_recursive()
      dir: consolidate similar code in treat_directory()
      rebase: fix saving of --signoff state for am-based rebases

Emily Shaffer (4):
      documentation: add tutorial for object walking
      myfirstcontrib: add 'psuh' to command-list.txt
      myfirstcontrib: add dependency installation step
      myfirstcontrib: hint to find gitgitgadget allower

Erik Chen (1):
      fetch: add trace2 instrumentation

Garima Singh (2):
      test-path-utils: offer to run a protectNTFS/protectHFS benchmark
      tests: add a helper to stress test argument quoting

Hans Jerry Illikainen (4):
      gpg-interface: refactor the free-and-xmemdupz pattern
      gpg-interface: limit search for primary key fingerprint
      gpg-interface: prefer check_signature() for GPG verification
      grep: don't return an expression from pcre2_free()

Hariom Verma (2):
      builtin/blame.c: constants into bit shift format
      git-compat-util.h: drop the `PRIuMAX` and other fallback definitions

Heba Waly (22):
      config: move documentation to config.h
      documentation: remove empty doc files
      diff: move doc to diff.h and diffcore.h
      dir: move doc to dir.h
      graph: move doc to graph.h and graph.c
      merge: move doc to ll-merge.h
      sha1-array: move doc to sha1-array.h
      remote: move doc to remote.h and refspec.h
      refs: move doc to refs.h
      attr: move doc to attr.h
      revision: move doc to revision.h
      pathspec: move doc to pathspec.h
      sigchain: move doc to sigchain.h
      cache: move doc to cache.h
      argv-array: move doc to argv-array.h
      credential: move doc to credential.h
      parse-options: add link to doc file in parse-options.h
      run-command: move doc to run-command.h
      trace: move doc to trace.h
      tree-walk: move doc to tree-walk.h
      submodule-config: move doc to submodule-config.h
      trace2: move doc to trace2.h

James Coglan (13):
      graph: automatically track display width of graph lines
      graph: handle line padding in `graph_next_line()`
      graph: reuse `find_new_column_by_commit()`
      graph: reduce duplication in `graph_insert_into_new_columns()`
      graph: remove `mapping_idx` and `graph_update_width()`
      graph: extract logic for moving to GRAPH_PRE_COMMIT state
      graph: example of graph output that can be simplified
      graph: tidy up display of left-skewed merges
      graph: commit and post-merge lines for left-skewed merges
      graph: rename `new_mapping` to `old_mapping`
      graph: smooth appearance of collapsing edges on commit lines
      graph: flatten edges that fuse with their right neighbor
      graph: fix coloring of octopus dashes

James Shubin (1):
      completion: tab-complete "git svn --recursive"

Jean-Noël Avila (2):
      doc: remove non pure ASCII characters
      doc: indent multi-line items in list

Jeff Hostetler (1):
      trace2: add region in clear_ce_flags

Jeff King (44):
      parse_commit_buffer(): treat lookup_commit() failure as parse error
      parse_commit_buffer(): treat lookup_tree() failure as parse error
      parse_tag_buffer(): treat NULL tag pointer as parse error
      commit, tag: don't set parsed bit for parse failures
      fsck: stop checking commit->tree value
      fsck: stop checking commit->parent counts
      fsck: stop checking tag->tagged
      fsck: require an actual buffer for non-blobs
      fsck: unify object-name code
      fsck_describe_object(): build on our get_object_name() primitive
      fsck: use oids rather than objects for object_name API
      fsck: don't require object structs for display functions
      fsck: only provide oid/type in fsck_error callback
      fsck: only require an oid for skiplist functions
      fsck: don't require an object struct for report()
      fsck: accept an oid instead of a "struct blob" for fsck_blob()
      fsck: drop blob struct from fsck_finish()
      fsck: don't require an object struct for fsck_ident()
      fsck: don't require an object struct in verify_headers()
      fsck: rename vague "oid" local variables
      fsck: accept an oid instead of a "struct tag" for fsck_tag()
      fsck: accept an oid instead of a "struct commit" for fsck_commit()
      fsck: accept an oid instead of a "struct tree" for fsck_tree()
      hex: drop sha1_to_hex_r()
      pack-objects: avoid pointless oe_map_new_pack() calls
      hex: drop sha1_to_hex()
      send-pack: check remote ref status on pack-objects failure
      t9502: pass along all arguments in xss helper
      t/gitweb-lib.sh: drop confusing quotes
      t/gitweb-lib.sh: set $REQUEST_URI
      gitweb: escape URLs generated by href()
      rev-parse: make --show-toplevel without a worktree an error
      perf-lib: use a single filename for all measurement types
      t/perf: don't depend on Git.pm
      send-pack: use OBJECT_INFO_QUICK to check negative objects
      doc: recommend lore.kernel.org over public-inbox.org
      doc: replace public-inbox links with lore.kernel.org
      t9300: drop some useless uses of cat
      t9300: create marks files for double-import-marks test
      fast-import: tighten parsing of boolean command line options
      fast-import: stop creating leading directories for import-marks
      fast-import: delay creating leading directories for export-marks
      fast-import: disallow "feature export-marks" by default
      fast-import: disallow "feature import-marks" by default

Johannes Schindelin (95):
      t1400: wrap setup code in test case
      git_path(): handle `.lock` files correctly
      vreportf(): avoid relying on stdio buffering
      update-index: optionally leave skip-worktree entries alone
      stash: handle staged changes in skip-worktree files correctly
      fetch: add the command-line option `--write-commit-graph`
      fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraph
      remote-curl: unbreak http.extraHeader with custom allocators
      Start to implement a built-in version of `git add --interactive`
      built-in add -i: implement the main loop
      built-in add -i: show unique prefixes of the commands
      built-in add -i: support `?` (prompt help)
      rebase-merges: move labels' whitespace mangling into `label_oid()`
      git svn: stop using `rebase --preserve-merges`
      mingw: demonstrate that all file handles are inherited by child processes
      mingw: work around incorrect standard handles
      mingw: spawned processes need to inherit only standard handles
      mingw: restrict file handle inheritance only on Windows 7 and later
      mingw: do set `errno` correctly when trying to restrict handle inheritance
      add-interactive: make sure to release `rev.prune_data`
      built-in add -i: allow filtering the modified files list
      built-in add -i: prepare for multi-selection commands
      built-in add -i: implement the `update` command
      built-in add -i: re-implement `revert` in C
      built-in add -i: re-implement `add-untracked` in C
      built-in add -i: implement the `patch` command
      built-in add -i: re-implement the `diff` command
      built-in add -i: offer the `quit` command
      pkt-line: fix a typo
      mingw: forbid translating ERROR_SUCCESS to an errno value
      clone --recurse-submodules: prevent name squatting on Windows
      mingw: disallow backslash characters in tree objects' file names
      path.c: document the purpose of `is_ntfs_dotgit()`
      is_ntfs_dotgit(): only verify the leading segment
      path: safeguard `.git` against NTFS Alternate Streams Accesses
      is_ntfs_dotgit(): speed it up
      mingw: fix quoting of arguments
      path: also guard `.gitmodules` against NTFS Alternate Data Streams
      protect_ntfs: turn on NTFS protection by default
      Disallow dubiously-nested submodule git directories
      quote-stress-test: accept arguments to test via the command-line
      t6130/t9350: prepare for stringent Win32 path validation
      quote-stress-test: allow skipping some trials
      unpack-trees: let merged_entry() pass through do_add_entry()'s errors
      mingw: refuse to access paths with illegal characters
      quote-stress-test: offer to test quoting arguments for MSYS2 sh
      mingw: refuse to access paths with trailing spaces or periods
      mingw: handle `subst`-ed "DOS drives"
      Git 2.14.6
      Git 2.15.4
      test-drop-caches: use `has_dos_drive_prefix()`
      Git 2.16.6
      Git 2.17.3
      Git 2.18.2
      Git 2.19.3
      t7415: adjust test for dubiously-nested submodule gitdirs for v2.20.x
      Git 2.20.2
      mingw: detect when MSYS2's sh is to be spawned more robustly
      mingw: use MSYS2 quoting even when spawning shell scripts
      mingw: fix quoting of empty arguments for `sh`
      t7415: drop v2.20.x-specific work-around
      mingw: sh arguments need quoting in more circumstances
      Git 2.21.1
      Git 2.22.2
      Git 2.23.1
      Git 2.24.1
      t3701: add a test for advanced split-hunk editing
      t3701: avoid depending on the TTY prerequisite
      t3701: add a test for the different `add -p` prompts
      t3701: verify the shown messages when nothing can be added
      t3701: verify that the diff.algorithm config setting is handled
      git add -p: use non-zero exit code when the diff generation failed
      apply --allow-overlap: fix a corner case
      t3404: fix indentation
      built-in add -i: start implementing the `patch` functionality in C
      built-in add -i: wire up the new C code for the `patch` command
      built-in add -p: show colored hunks by default
      built-in add -p: adjust hunk headers as needed
      built-in add -p: color the prompt and the help text
      built-in add -p: offer a helpful error message when hunk navigation failed
      built-in add -p: support multi-file diffs
      built-in add -p: handle deleted empty files
      built-in app -p: allow selecting a mode change as a "hunk"
      built-in add -p: show different prompts for mode changes and deletions
      built-in add -p: implement the hunk splitting feature
      built-in add -p: coalesce hunks after splitting them
      strbuf: add a helper function to call the editor "on an strbuf"
      built-in add -p: implement hunk editing
      built-in add -p: implement the 'g' ("goto") command
      built-in add -p: implement the '/' ("search regex") command
      built-in add -p: implement the 'q' ("quit") command
      built-in add -p: only show the applicable parts of the help text
      built-in add -p: show helpful hint when nothing can be staged
      mingw: short-circuit the conversion of `/dev/null` to UTF-16
      mingw: refuse paths containing reserved names

Johannes Sixt (1):
      t3008: find test-tool through path lookup

Jonathan Nieder (3):
      submodule: reject submodule.update = !command in .gitmodules
      fsck: reject submodule.update = !command in .gitmodules
      submodule: defend against submodule.update = !command in .gitmodules

Jonathan Tan (6):
      fetch-pack: write fetched refs to .promisor
      fetch: remove fetch_if_missing=0
      clone: remove fetch_if_missing=0
      promisor-remote: remove fetch_if_missing=0
      Doc: explain submodule.alternateErrorStrategy
      submodule--helper: advise on fatal alternate error

Josh Holland (1):
      userdiff: support Python async functions

Junio C Hamano (15):
      doc: am --show-current-patch gives an entire e-mail message
      The first batch post 2.24 cycle
      fsmonitor: do not compare bitmap size with size of split index
      ci(osx): update homebrew-cask repository with less noise
      rebase -i: finishing touches to --reset-author-date
      The second batch
      The third batch
      The fourth batch
      The fifth batch
      Makefile: drop GEN_HDRS
      The sixth batch
      dir.c: use st_add3() for allocation size
      Git 2.25-rc0
      mailmap: mask accentless variant for Công Danh
      Git 2.25-rc1

Kevin Willford (1):
      fsmonitor: fix watchman integration

Manish Goregaokar (2):
      doc: document 'git submodule status --cached'
      submodule: fix 'submodule status' when called from a subdirectory

Martin Ågren (1):
      t7004: check existence of correct tag

Matthew Rogers (1):
      rebase -r: let `label` generate safer labels

Mihail Atanassov (1):
      Documentation/git-bisect.txt: add --no-ff to merge command

Mike Hommey (2):
      revision: clear the topo-walk flags in reset_revision_walk
      revision: free topo_walk_info before creating a new one in init_topo_walk

Miriam Rubio (1):
      clone: rename static function `dir_exists()`.

Nathan Stocks (1):
      t: fix typo in test descriptions

Naveen Nathan (1):
      doc: improve readability of --rebase-merges in git-rebase

Nika Layzell (1):
      reset: parse rev as tree-ish in patch mode

Philip Oakley (1):
      Doc: Bundle file usage

Philippe Blain (4):
      help: add gitsubmodules to the list of guides
      worktree: teach "add" to ignore submodule.recurse config
      doc: mention that 'git submodule update' fetches missing commits
      gitmodules: link to gitsubmodules guide

Phillip Wood (7):
      t3404: remove unnecessary subshell
      t3404: set $EDITOR in subshell
      t3404: remove uneeded calls to set_fake_editor
      sequencer.h fix placement of #endif
      move run_commit_hook() to libgit and use it there
      sequencer: run post-commit hook
      sequencer: fix empty commit check when amending

Prarit Bhargava (3):
      t6006: use test-lib.sh definitions
      t4203: use test-lib.sh definitions
      pretty: add "%aL" etc. to show local-part of email addresses

Pratyush Yadav (1):
      git-shortlog.txt: include commit limiting options

Ralf Thielow (1):
      fetch.c: fix typo in a warning message

René Scharfe (32):
      trace2: add dots directly to strbuf in perf_fmt_prepare()
      utf8: use skip_iprefix() in same_utf_encoding()
      convert: use skip_iprefix() in validate_encoding()
      mingw: use COPY_ARRAY for copying array
      parse-options: avoid arithmetic on pointer that's potentially NULL
      pretty: provide short date format
      fetch: use skip_prefix() instead of starts_with()
      fmt-merge-msg: use skip_prefix() instead of starts_with()
      shell: use skip_prefix() instead of starts_with()
      push: use skip_prefix() instead of starts_with()
      name-rev: use skip_prefix() instead of starts_with()
      run-command: use prepare_git_cmd() in prepare_cmd()
      t1512: use test_line_count
      t1410: use test_line_count
      t1400: use test_must_be_empty
      test: use test_must_be_empty F instead of test -z $(cat F)
      test: use test_must_be_empty F instead of test_cmp empty F
      t9300: don't create unused file
      t7811: don't create unused file
      xdiff: unignore changes in function context
      name-rev: use strbuf_strip_suffix() in get_rev_name()
      commit: use strbuf_add() to add a length-limited string
      patch-id: use oid_to_hex() to print multiple object IDs
      archive-zip: use enum for compression method
      t4256: don't create unused file
      t7004: don't create unused file
      refs: pass NULL to refs_read_ref_full() because object ID is not needed
      remote: pass NULL to read_ref_full() because object ID is not needed
      t3501: don't create unused file
      t5580: don't create unused file
      t6030: don't create unused file
      t4015: improve coverage of function context test

Robin H. Johnson (3):
      bundle: framework for options before bundle file
      bundle-create: progress output control
      bundle-verify: add --quiet

Rohit Ashiwal (6):
      rebase -i: add --ignore-whitespace flag
      sequencer: allow callers of read_author_script() to ignore fields
      rebase -i: support --committer-date-is-author-date
      sequencer: rename amend_author to author_to_rename
      rebase -i: support --ignore-date
      rebase: add --reset-author-date

Ruud van Asseldonk (1):
      t5150: skip request-pull test if Perl is disabled

SZEDER Gábor (29):
      Documentation: mention more worktree-specific exceptions
      path.c: clarify trie_find()'s in-code comment
      path.c: mark 'logs/HEAD' in 'common_list' as file
      path.c: clarify two field names in 'struct common_dir'
      path.c: don't call the match function without value in trie_find()
      builtin/commit-graph.c: remove subcommand-less usage string
      builtin/blame.c: remove '--indent-heuristic' from usage string
      test-lib: don't check prereqs of test cases that won't be run anyway
      t6120-describe: correct test repo history graph in comment
      builtin/unpack-objects.c: show throughput progress
      tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values
      t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool
      sequencer: don't re-read todo for revert and cherry-pick
      test-lib-functions: suppress a 'git rev-parse' error in 'test_commit_bulk'
      ci: build Git with GCC 9 in the 'osx-gcc' build job
      t9300-fast-import: store the PID in a variable instead of pidfile
      t9300-fast-import: don't hang if background fast-import exits too early
      t6120-describe: modernize the 'check_describe' helper
      name-rev: avoid unnecessary cast in name_ref()
      name-rev: use sizeof(*ptr) instead of sizeof(type) in allocation
      t6120: add a test to cover inner conditions in 'git name-rev's name_rev()
      name-rev: extract creating/updating a 'struct name_rev' into a helper
      name-rev: pull out deref handling from the recursion
      name-rev: restructure parsing commits and applying date cutoff
      name-rev: restructure creating/updating 'struct rev_name' instances
      name-rev: drop name_rev()'s 'generation' and 'distance' parameters
      name-rev: use 'name->tip_name' instead of 'tip_name'
      name-rev: eliminate recursion in name_rev()
      name-rev: cleanup name_ref()

Slavica Đukić (3):
      built-in add -i: color the header in the `status` command
      built-in add -i: use color in the main loop
      built-in add -i: implement the `help` command

Tanushree Tumane (2):
      bisect--helper: avoid use-after-free
      bisect--helper: convert `*_warning` char pointers to char arrays.

Thomas Gummerer (1):
      stash: make sure we have a valid index before writing it

Todd Zullinger (1):
      t7812: expect failure for grep -i with invalid UTF-8 data

Utsav Shah (1):
      unpack-trees: skip stat on fsmonitor-valid files

William Baker (6):
      midx: add MIDX_PROGRESS flag
      midx: add progress to write_midx_file
      midx: add progress to expire_midx_packs
      midx: honor the MIDX_PROGRESS flag in verify_midx_file
      midx: honor the MIDX_PROGRESS flag in midx_repack
      multi-pack-index: add [--[no-]progress] option.

brian m. carlson (16):
      t/oid-info: allow looking up hash algorithm name
      t/oid-info: add empty tree and empty blob values
      rev-parse: add a --show-object-format option
      t1305: avoid comparing extensions
      t3429: remove SHA1 annotation
      t4010: abstract away SHA-1-specific constants
      t4011: abstract away SHA-1-specific constants
      t4015: abstract away SHA-1-specific constants
      t4027: make hash-size independent
      t4034: abstract away SHA-1-specific constants
      t4038: abstract away SHA-1 specific constants
      t4039: abstract away SHA-1-specific constants
      t4044: update test to work with SHA-256
      t4045: make hash-size independent
      t4048: abstract away SHA-1-specific constants
      t9001: avoid including non-trailing NUL bytes in variables

r.burenkov (1):
      git-p4: honor lfs.storage configuration variable

ryenus (1):
      fix-typo: consecutive-word duplications

Đoàn Trần Công Danh (14):
      t3301: test diagnose messages for too few/many paramters
      notes: fix minimum number of parameters to "copy" subcommand
      t0028: eliminate non-standard usage of printf
      configure.ac: define ICONV_OMITS_BOM if necessary
      t3900: demonstrate git-rebase problem with multi encoding
      sequencer: reencode to utf-8 before arrange rebase's todo list
      sequencer: reencode revert/cherry-pick's todo list
      sequencer: reencode squashing commit's message
      sequencer: reencode old merge-commit message
      sequencer: reencode commit message for am/rebase --show-current-patch
      sequencer: handle rebase-merges for "onto" message
      date.c: switch to reentrant {gm,local}time_r
      archive-zip.c: switch to reentrant localtime_r
      mingw: use {gm,local}time_s as backend for {gm,local}time_r

Łukasz Niemier (1):
      userdiff: add Elixir to supported userdiff languages


^ permalink raw reply

* Re: [ANNOUNCE] Git v2.25.0-rc0
From: Taylor Blau @ 2020-01-02 22:19 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <xmqqblrwm65l.fsf@gitster-ct.c.googlers.com>

Hi Junio,

On Wed, Dec 25, 2019 at 01:44:54PM -0800, Junio C Hamano wrote:

>  * The beginning of rewriting "git add -i" in C.
>
>  [snip]
>
>  * The effort to reimplement "git add -i" in C continues.

I noticed while preparing GitHub's blog post for 2.25 that the work to
rewrite "git add -i" in C was mentioned twice in the performance
improvements section.

I'm not sure if this is intentional, or if this was added twice during
the merge(s) of and f7998d9793 (Merge branch 'js/builtin-add-i',
2019-12-05) and 3beff388b2 (Merge branch 'js/builtin-add-i-cmds',
2019-12-16).


Thanks,
Taylor

^ permalink raw reply

* [PATCH] Documentation/git-sparse-checkout.txt: fix a typo
From: Taylor Blau @ 2020-01-02 22:51 UTC (permalink / raw)
  To: git; +Cc: dstolee

This typo was introduced in 94c0956b60 (sparse-checkout: create builtin
with 'list' subcommand, 2019-11-21).

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 Documentation/git-sparse-checkout.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
index 9c3c66cc37..a3c920fa6c 100644
--- a/Documentation/git-sparse-checkout.txt
+++ b/Documentation/git-sparse-checkout.txt
@@ -5,7 +5,7 @@ NAME
 ----
 git-sparse-checkout - Initialize and modify the sparse-checkout
 configuration, which reduces the checkout to a set of paths
-given by a list of atterns.
+given by a list of patterns.
 
 
 SYNOPSIS
-- 
2.25.0.rc0.2.g1acd9e8160

^ permalink raw reply related

* Re: [PATCH 1/1] add: use advise function to display hints
From: Junio C Hamano @ 2020-01-02 22:47 UTC (permalink / raw)
  To: git; +Cc: Heba Waly, Heba Waly via GitGitGadget
In-Reply-To: <xmqqpng1eisc.fsf@gitster-ct.c.googlers.com>

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

> Use of advise() function is good for giving hints not just due to
> its yellow coloring (which by the way I find not very readable,
> perhaps because I use black ink on white paper).  One good thing in
> using the advise() API is that the messages can also be squelched
> with advice.* configuration variables.

A side note.

Right now, the advise() API is a bit awkweard to use correctly.
When introducing a new advice message, you would

 * come up with advice.frotz configuration variable

 * define and declare advice_frotz global variable that defaults to
   true

 * sprinkle calls like this:

	if (advice_frotz)
		advise(_("helpful message about frotz"));

I am wondering about two things:

 (1) if we can update the API so that the above can be reduced to
     just adding calls like:

	advise_ng("frotz", _("helpful message about frotz"));

 (2) if such a simplified advise_ng API is a good idea to begin
     with.

There are a few advantages the current API has, but it cuts both
ways.

 - Any new advice toggle MUST be registered to the
   advice.c::advice_config[] table.  This table can later be
   extended in the future to allow a list of the toggles to be
   produced at runtime.

   This can be seen as an easy mechanism to force programmers to
   keep the list up to date.  Or it can also be seen as the source
   of extra work.

 - advise() calls can be made without being guarded by any advice.*
   configuration variable.  In the overly simplified advise_ng() API
   shown above, we cannot expresss a pattern like this:

	if (advice_frotz) {
		... make expensive computation to
		... come up with values that need to be shown
		... in the advise() message
		char *result = expensive_computation(...);

		advise(_("message %s about frotz", result));
		free(result);
	}

   without adding another helper function. e.g.

	if (advise_ng_enabled("frotz")) {
		char *result = expensive_computation(...);

		/*
                 * advise_ng("frotz", _("message %s about frotz", result));
                 * is fine as well, but slightly less efficient as
                 * it would involve another call to *_enabled(), so use
		 * the unconditional form of the call
		 */
		advise_ng_raw(_("message %s about frotz", result));

		free(result);
	}


^ permalink raw reply

* Re: [PATCH 1/1] fetch: set size_multiple in split_commit_graph_opts
From: Junio C Hamano @ 2020-01-02 21:49 UTC (permalink / raw)
  To: Derrick Stolee via GitGitGadget; +Cc: git, peff, me, szeder.dev, Derrick Stolee
In-Reply-To: <91d89356a20625d04af74d458c28b32445e760c1.1577981654.git.gitgitgadget@gmail.com>

"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:

> This problem is due to two failures:
>
>  1. It is unclear that we can add the flag COMMIT_GRAPH_WRITE_SPLIT
>     with a NULL split_opts.
>  2. If we have a non-NULL split_opts, then we override the default
>     values even if a zero value is given.
>
> Correct both of these issues. First, do not override size_mult when
> the options provide a zero value. Second, stop creating a split_opts
> in the fetch builtin.

OK, so there is the hardcoded default 2 in the code, and split_opts
structure *can* override it, but 0 in the field of the structure is
meant to signal "no, I do not have any value to override the
default", not "I do want to set the multiple to 0"?

Makes sense.  Will queue.

Thanks.


> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  builtin/fetch.c | 4 +---
>  commit-graph.c  | 4 +++-
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index f8765b385b..b4c6d921d0 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1866,15 +1866,13 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
>  	    (fetch_write_commit_graph < 0 &&
>  	     the_repository->settings.fetch_write_commit_graph)) {
>  		int commit_graph_flags = COMMIT_GRAPH_WRITE_SPLIT;
> -		struct split_commit_graph_opts split_opts;
> -		memset(&split_opts, 0, sizeof(struct split_commit_graph_opts));
>  
>  		if (progress)
>  			commit_graph_flags |= COMMIT_GRAPH_WRITE_PROGRESS;
>  
>  		write_commit_graph_reachable(get_object_directory(),
>  					     commit_graph_flags,
> -					     &split_opts);
> +					     NULL);
>  	}
>  
>  	close_object_store(the_repository->objects);
> diff --git a/commit-graph.c b/commit-graph.c
> index e771394aff..b205e65ed1 100644
> --- a/commit-graph.c
> +++ b/commit-graph.c
> @@ -1542,7 +1542,9 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx)
>  
>  	if (ctx->split_opts) {
>  		max_commits = ctx->split_opts->max_commits;
> -		size_mult = ctx->split_opts->size_multiple;
> +
> +		if (ctx->split_opts->size_multiple)
> +			size_mult = ctx->split_opts->size_multiple;
>  	}
>  
>  	g = ctx->r->objects->commit_graph;

^ permalink raw reply

* Re: [PATCH v5 0/4] git-p4: Usability enhancements
From: Junio C Hamano @ 2020-01-02 21:44 UTC (permalink / raw)
  To: Ben Keene; +Cc: Luke Diamand, Git Users, Ben Keene via GitGitGadget
In-Reply-To: <c95fe073-9bea-9dcf-4579-e9125cc55f39@gmail.com>

Ben Keene <seraphire@gmail.com> writes:

>> Thanks.  Ben, let's keep the first two and discard the rest for now,
>> which can later be replaced with updated ones.
> That works for me. So, are there any changes that I should make at
> this time, or just let the rest die off?

I don't think of any, from this side.  You can of course spend time
on salvaging and polishing these remaining patches for resubmission
in future cycle(s).

Thanks.

^ permalink raw reply

* Re: [PATCH v2] sha1-file: remove OBJECT_INFO_SKIP_CACHED
From: Junio C Hamano @ 2020-01-02 21:41 UTC (permalink / raw)
  To: Jonathan Tan; +Cc: git, jrnieder
In-Reply-To: <20200102201630.180969-1-jonathantanmy@google.com>

Jonathan Tan <jonathantanmy@google.com> writes:

> As a historical note, the function now known as repo_read_object_file()
> was taught the empty tree in 346245a1bb ("hard-code the empty tree
> object", 2008-02-13), and the function now known as oid_object_info()
> was taught the empty tree in c4d9986f5f ("sha1_object_info: examine
> cached_object store too", 2011-02-07). repo_has_object_file() was never
> updated, perhaps due to oversight. The flag OBJECT_INFO_SKIP_CACHED,
> introduced later in dfdd4afcf9 ("sha1_file: teach
> sha1_object_info_extended more flags", 2017-06-26) and used in
> e83e71c5e1 ("sha1_file: refactor has_sha1_file_with_flags", 2017-06-26),
> was introduced to preserve this difference in empty-tree handling, but
> now it can be removed.

I am not 100% sure if the implication of this change is safe to
allow us to say "now it can be".

The has_object_file() helper wanted to say "no" when given a
non-existing object registered via the pretend_object_file(),
presumably because we wanted to allow a use pattern like:

 - prepare an in-core representation of an object we tentatively
   expect, but not absolutely sure, to be necessary.

 - perform operations, using the object data obtained via
   read_object() API, which is capable of yielding data even for
   such "pretend" objects (perhaps we are creating a tentative merge
   parents during a recursive merge).

 - write out final set of objects by enumerating those that do not
   really exist yet (via has_object_file() API).

Teaching about the empty tree to has_object_file() is a good thing
(especially because we do not necessarily write an empty tree object
to our repositories), but as a collateral damage of doing so, we
make such use pattern impossible.  

It is not a large loss---the third bullet in the above list can just
be made to unconditionally call write_object_file() without
filtering with has_object_file() and write_object_file() will apply
the right optimization anyway, so it probably is OK.

Will queue.

Thanks.

^ permalink raw reply


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