Git development
 help / color / mirror / Atom feed
* Re: [PATCH] blame: add the ability to ignore commits
From: Barret Rhoden @ 2019-01-08 16:27 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Stefan Beller, Jeff Smith, Jeff King
In-Reply-To: <xmqqbm4s6ozl.fsf@gitster-ct.c.googlers.com>

On 2019-01-07 at 15:13 Junio C Hamano <gitster@pobox.com> wrote:
> If I read it correctly, this gives a very limited form of -S, in the
> sense that anything this can do can be expressed by using -S but the
> reverse is not true, but is designed to be easier to use, in the
> sense that unlike -S, this does not have to describe the part of the
> history you do not have to lie about.  The documentation should say
> something about these pros-and-cons to help readers decide which
> feature to use.

Yeah, -S lists the revs to use, this lists the revs to *not* use.  I'll
add a note.

> I somehow feel that this is rare enough that it should not squat on
> short-and-sweet '-i'.  We would want to reserve it to something like
> "--ignore-case", for example.

Can do.  I'll change the interface to your suggestion from down below.

> > The file .git-blame-ignore-revs is checked by default.  
> 
> Giving the projects a way to easily help participants to share the
> same distorted view of the history is a good idea, but I do not
> think we should allow projects to do so to those who merely clone it
> without their consent.  IOW, "by default" is a terrible idea.
> 
> Perhaps paying attention to blame.skipRevsFile configuration
> variable that is set by the end user would be sufficient----the
> project can ship .blame-skip-revs (or any random filename of their
> choice) in-tree as tracked contents and tell its users that they can
> optionally use it.

A blame config option works for me.  I'd like the users/cloners of a
repo to not need to do anything extravagant, but a one-time config
would be fine.

> > It's useful to be alerted to the presence of an ignored commit in the
> > history of a line.  Those lines will be marked with '*' in the
> > non-porcelain output.  The '*' is attached to the line number to keep
> > from breaking tools that rely on the whitespace between columns.  
> 
> A policy decision like the above two shouldn't be hardcoded in the
> feature like this, but should be done as a separate option.  By
> default, these shouldn't be marked with '*', as the same tools you
> said you are afraid of breaking would be expecting a word with only
> digits and no asterisk in the column where line numbers appear and
> will get broken by this change if done unconditionally.

Since users are already opting-in to the blame-ignore, do you also want
them to opt-in to the annotation?  I can make a separate config option
to turn on the annotation.  Any preference for how it is marked?

> In general, I find this patch trying to change too many things at
> the same time, without sufficient justification.  Perhaps do these
> different things as separate steps in a single series?
> 
> > A blame_entry attributed to an ignored commit will get passed to its
> > parent.  
> 
> Obviously, an interesting consideration is what happens when a merge
> commit is skipped.  Is it sufficient to change this description to
> "...will get passed to its parentS", or would the code do completely
> nonsensical things without further tweaks (a possible simple tweak
> could be to refuse skipping merges)?

If we skip a merge commit, it might pick the wrong parent.  For
example, this line was brought in via a merge:

$ ~/src/git/git-blame include/linux/mm.h | grep VM_SYNC
b6fb293f2497a (Jan Kara 2017-11-01 16:36:41 +0100  204) #define VM_SYNC

It's from merge: a3841f94c7ec ("Merge tag 'libnvdimm-for-4.15', and if
we ignore it:

$ ~/src/git/git-blame -i a3841f94c7ecb include/linux/mm.h | grep VM_SYNC
cc2383ec06be0 (Konstantin Khlebnikov 2012-10-08 16:28:37 -0700  204*) #define VM_SYNC

The wrong commit is blamed.

I can put a note in the doc about it and die if we're given a merge
commit.  Is there a convenient helper for detecting a merge, or can I
just check for multiple parents?  (something like commit->parents &&
commit->parents->next)
 
> > If an ignored commit changed a line, an ancestor that changed
> > the line will get blamed.  However, if an ignored commit added lines, a
> > commit changing a nearby line may get blamed.  If no commit is found,
> > the original commit for the file will get blamed.  
> 
> The above somehow does not read as describing a carefully designed
> behaviour; rather, it sounds as if it is saying "the code does
> whatever random things it happens to do".  For example, when there
> is a newly added line how is "A" commit changing a nearby line
> chosen (a line has lines before it and after it---they may be
> touched by different commits, and before and after that skipped
> commit, so there are multiple commits to choose from)?

This was more of a commentary about its behavior.  If you ignore a
commit that added lines, it'd be nice to get a hint of what might have
caused it, and picking a commit that affected an adjacent line seemed
fine.  But yeah, it's not doing anything crazy.

> > diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
> > index 16323eb80e31..e41375374892 100644
> > --- a/Documentation/git-blame.txt
> > +++ b/Documentation/git-blame.txt
> > @@ -10,6 +10,7 @@ SYNOPSIS
> >  [verse]
> >  'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
> >  	    [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
> > +	    [-i <rev>] [--no-default-ignores] [--ignore-file=<file>]
> >  	    [--progress] [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>..<rev>]
> >  	    [--] <file>
> >  
> > @@ -84,6 +85,20 @@ include::blame-options.txt[]
> >  	Ignore whitespace when comparing the parent's version and
> >  	the child's to find where the lines came from.
> >  
> > +-i <rev>::
> > +	Ignore revision when assigning blame.  Lines that were changed by an
> > +	ignored commit will be marked with a `*` in the blame output.  Lines
> > +	that were added by an ignored commit may be attributed commits making
> > +	nearby changes or to the first commit touching the file.  
> 
> It probably deserves to be told that this option can be given
> multiple times and used cumulatively (unlike usual "last one wins"
> rule).
> 
> > +--no-default-ignores::
> > +	Do not automatically ignore revisions in the file
> > +	`.git-blame-ignore-revs`.  
> 
> This should not be "opt-out" like this.
> 
> > +--ignore-file=<file>::
> > +	Ignore revisions listed in `file`, one revision per line.  Whitespace
> > +	and comments beginning with `#` are ignored.  
> 
> Should it be capable to take two or more ignore-files?  Or should we
> use the usual "the last one wins" rule?
> 
> I think we should support blame.skipRevFile configuration variable
> so that the users do not have to constantly give the option from the
> command line.  And with that, there is no need to have a hardcoded
> filename .git-blame-ignore-revs or anything like that.
> 
> If we are to use configuration variable, however, we'd need a way to
> override its use from the command line, too.  Perhaps a sane
> arrangement would be
> 
>     - if one or more --skip-revs-file=<file> are given from the
>       command line, use all of them and ignore blame.skipRevsFile
>       configuration variable.
> 
>     - if no --skip-revs-file=<file> is given from the command line,
>       use blame.skipRevsFile configuration variable.
> 
>     - regardless of the above two, pay attention to --skip-rev=<rev>
>       command line option(s).

Sounds fine to me.

> Somehow the damage to blame.c codebase looks way too noisy for what
> the code wants to do.  If all we want is to pretend in a history,
> e.g.
> 
>     ---O---A---B---C---D
> 
> that commit B does not exist, i.e. use a distorted view of the
> history
> 
>     ---O---A-------C---D
> 
> wouldn't it be sufficient to modify pass_blame(), i.e. the only the
> caller of the pass_blame_to_parent(), where we find the parent
> commits of "C" and dig the history to pass blame to "B", and have it
> pretend as if "B" does not exist and pass blame directly to "A"?

I originally tried to skip 'B' in pass_blame() when B popped up as a
scapegoat.  That broke the offsets of the blame_entries in the
parent.  By running diff_hunks(), we get the opportunity to adjust the
offsets.  Also, when it comes to marking the blame_entries for marking
the output, we want to know the specific diffs and to break them up at
the boundaries of [tlno,same) in blame_chunk().

> Thanks.  I am personally not all that interested in this yet.

Thanks for taking a look.

Barret


^ permalink raw reply

* Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups
From: René Scharfe @ 2019-01-08 16:40 UTC (permalink / raw)
  To: Jeff King; +Cc: git, Junio C Hamano, Ævar Arnfjörð Bjarmason
In-Reply-To: <20190107083150.GC21362@sigill.intra.peff.net>

Am 07.01.2019 um 09:31 schrieb Jeff King:
> I also cleaned up my sha1/object_id patch and rebased it on top of what
> you have here. Though as I worked on it, it expanded in scope a bit.
> Possibly it should be a separate series entirely, but that would create
> some annoying textual conflicts on merge.
> 
>   [01/11]: sha1-file: fix outdated sha1 comment references
>   [02/11]: update comment references to sha1_object_info()
>   [03/11]: http: use struct object_id instead of bare sha1
>   [04/11]: sha1-file: modernize loose object file functions
>   [05/11]: sha1-file: modernize loose header/stream functions
>   [06/11]: sha1-file: convert pass-through functions to object_id
>   [07/11]: convert has_sha1_file() callers to has_object_file()
>   [08/11]: sha1-file: drop has_sha1_file()
>   [09/11]: sha1-file: prefer "loose object file" to "sha1 file" in messages
>   [10/11]: sha1-file: avoid "sha1 file" for generic use in messages
>   [11/11]: prefer "hash mismatch" to "sha1 mismatch"

I skimmed them; they look good to me.  6 and 8 are particularly
satisfying; getting rid of hash copy operations just feels nice. :)

Junio only took 1 to 5 into pu; 6, 7 and its sidekick 8, 10 and 11
conflict with sb/more-repo-in-api; 9 could go in unmodified.

René

^ permalink raw reply

* Re: [PATCH] blame: add the ability to ignore commits
From: Barret Rhoden @ 2019-01-08 16:41 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Stefan Beller, Jeff Smith, Junio C Hamano, Jeff King
In-Reply-To: <8736q3qon0.fsf@evledraar.gmail.com>

On 2019-01-08 at 14:12 Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Mon, Jan 07 2019, Barret Rhoden wrote:
> 
> > +static int handle_ignore_file(const char *path, struct string_list *ignores)
> > +{
> > +	FILE *fp = fopen(path, "r");
> > +	struct strbuf sb = STRBUF_INIT;
> > +
> > +	if (!fp)
> > +		return -1;
> > +	while (!strbuf_getline(&sb, fp)) {
> > +		const char *hash;
> > +
> > +		hash = strchr(sb.buf, '#');
> > +		if (hash)
> > +			strbuf_setlen(&sb, hash - sb.buf);
> > +		strbuf_trim(&sb);
> > +		if (!sb.len)
> > +			continue;
> > +		string_list_append(ignores, sb.buf);
> > +	}
> > +	fclose(fp);
> > +	strbuf_release(&sb);
> > +	return 0;
> > +}  
> 
> Aside from other comments on this patch that Junio had either you mostly
> copy-pasted this from init_skiplist() or you've come up with almost the
> same code on your own.
> 
> In any case, if we're going to integrate something like this patch let's
> split this "parse file with SHA-1s or comments/whitespace" into a
> utility function that both this and init_skiplist() can call.

One minor difference is that fsck wants an unabbreviated SHA-1, using
parse_oid_hex() instead of get_oid_committish().  Would you be OK with
also changing fsck to take a committish instead of a full SHA-1?

Is there a good place for the common helper?  Since it's an oidset, I
could put it in oidset.c.  oidset_parse_file() or something.

> Then we could split up the description for the fsck.skipList config
> variable to reference that format, and say that both it and this new
> thing should consult those docs for how it's parsed.

Is there a good spot for the generic skipList documentation?  The only
common text would be: 

	... comments ('#'), empty lines, and any leading and trailing
	whitespace is ignored

Thanks,

Barret


^ permalink raw reply

* [PATCH v4 1/1] pack-redundant: remove unused functions
From: 16657101987 @ 2019-01-08 16:43 UTC (permalink / raw)
  To: worldhello.net, git; +Cc: gitster, sunchao9
In-Reply-To: <20190102043456.15652-4-worldhello.net@gmail.com>

From: Sun Chao <sunchao9@huawei.com>

Remove unused functions to find `min` packs, such as `get_permutations`,
`pll_free`, etc.

Signed-off-by: Sun Chao <sunchao9@huawei.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/pack-redundant.c | 86 ------------------------------------------------
 1 file changed, 86 deletions(-)

diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 3655cc7..eac2350 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -35,11 +35,6 @@ static struct pack_list {
 	struct llist *all_objects;
 } *local_packs = NULL, *altodb_packs = NULL;
 
-struct pll {
-	struct pll *next;
-	struct pack_list *pl;
-};
-
 static struct llist_item *free_nodes;
 
 static inline void llist_item_put(struct llist_item *item)
@@ -63,15 +58,6 @@ static inline struct llist_item *llist_item_get(void)
 	return new_item;
 }
 
-static void llist_free(struct llist *list)
-{
-	while ((list->back = list->front)) {
-		list->front = list->front->next;
-		llist_item_put(list->back);
-	}
-	free(list);
-}
-
 static inline void llist_init(struct llist **list)
 {
 	*list = xmalloc(sizeof(struct llist));
@@ -285,78 +271,6 @@ static void cmp_two_packs(struct pack_list *p1, struct pack_list *p2)
 	}
 }
 
-static void pll_free(struct pll *l)
-{
-	struct pll *old;
-	struct pack_list *opl;
-
-	while (l) {
-		old = l;
-		while (l->pl) {
-			opl = l->pl;
-			l->pl = opl->next;
-			free(opl);
-		}
-		l = l->next;
-		free(old);
-	}
-}
-
-/* all the permutations have to be free()d at the same time,
- * since they refer to each other
- */
-static struct pll * get_permutations(struct pack_list *list, int n)
-{
-	struct pll *subset, *ret = NULL, *new_pll = NULL;
-
-	if (list == NULL || pack_list_size(list) < n || n == 0)
-		return NULL;
-
-	if (n == 1) {
-		while (list) {
-			new_pll = xmalloc(sizeof(*new_pll));
-			new_pll->pl = NULL;
-			pack_list_insert(&new_pll->pl, list);
-			new_pll->next = ret;
-			ret = new_pll;
-			list = list->next;
-		}
-		return ret;
-	}
-
-	while (list->next) {
-		subset = get_permutations(list->next, n - 1);
-		while (subset) {
-			new_pll = xmalloc(sizeof(*new_pll));
-			new_pll->pl = subset->pl;
-			pack_list_insert(&new_pll->pl, list);
-			new_pll->next = ret;
-			ret = new_pll;
-			subset = subset->next;
-		}
-		list = list->next;
-	}
-	return ret;
-}
-
-static int is_superset(struct pack_list *pl, struct llist *list)
-{
-	struct llist *diff;
-
-	diff = llist_copy(list);
-
-	while (pl) {
-		llist_sorted_difference_inplace(diff, pl->all_objects);
-		if (diff->size == 0) { /* we're done */
-			llist_free(diff);
-			return 1;
-		}
-		pl = pl->next;
-	}
-	llist_free(diff);
-	return 0;
-}
-
 static size_t sizeof_union(struct packed_git *p1, struct packed_git *p2)
 {
 	size_t ret = 0;
-- 
2.8.1



^ permalink raw reply related

* [PATCH 0/1] git-gc.txt: fix typo about gc.writeCommitGraph
From: Derrick Stolee via GitGitGadget @ 2019-01-08 16:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

Thanks to Stefan Haller for sending me a private message about this typo.

Derrick Stolee (1):
  git-gc.txt: fix typo about gc.writeCommitGraph

 Documentation/git-gc.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: c7e8ce6d1dd02f6569ea785eebc8692e8e2edf72
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-105%2Fderrickstolee%2Fgc-doc%2Fupstream-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-105/derrickstolee/gc-doc/upstream-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/105
-- 
gitgitgadget

^ permalink raw reply

* [PATCH 1/1] git-gc.txt: fix typo about gc.writeCommitGraph
From: Derrick Stolee via GitGitGadget @ 2019-01-08 16:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Derrick Stolee
In-Reply-To: <pull.105.git.gitgitgadget@gmail.com>

From: Derrick Stolee <dstolee@microsoft.com>

Reported-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 Documentation/git-gc.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index c20ee6c789..a7442499f6 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -137,7 +137,7 @@ The optional configuration variable `gc.packRefs` determines if
 it within all non-bare repos or it can be set to a boolean value.
 This defaults to true.
 
-The optional configuration variable `gc.commitGraph` determines if
+The optional configuration variable `gc.writeCommitGraph` determines if
 'git gc' should run 'git commit-graph write'. This can be set to a
 boolean value. This defaults to false.
 
-- 
gitgitgadget

^ permalink raw reply related

* [PATCH v4 0/1] pack-redundant: remove unused functions
From: 16657101987 @ 2019-01-08 16:40 UTC (permalink / raw)
  To: worldhello.net, git; +Cc: gitster, sunchao9
In-Reply-To: <20190102043456.15652-4-worldhello.net@gmail.com>

From: Sun Chao <sunchao9@huawei.com>

I'm particularly grateful to Junio and JiangXin for fixing the patches,
and I noticed Junio send a new commit to remove more unused codes and
suggest to SQUASH it.

So I create this new version of patches to do this work, I also have
checked the left codes and remove a unused struct based on Junio's
last commit of `https://github.com/gitster/git/commits/sc/pack-redundant`.

--

Sun Chao (1):
  pack-redundant: remove unused functions

 builtin/pack-redundant.c | 86 ------------------------------------------------
 1 file changed, 86 deletions(-)

-- 
2.8.1



^ permalink raw reply

* [PATCH v4 0/1] pack-redundant: remove unused functions
From: 16657101987 @ 2019-01-08 16:45 UTC (permalink / raw)
  To: worldhello.net, git; +Cc: gitster, sunchao9
In-Reply-To: <20190102043456.15652-4-worldhello.net@gmail.com>

From: Sun Chao <sunchao9@huawei.com>

I'm particularly grateful to Junio and JiangXin for fixing the patches,
and I noticed Junio send a new commit to remove more unused codes and
suggest to SQUASH it.

So I create this new version of patches to do this work, I also have
checked the left codes and remove a unused struct based on Junio's
last commit of `https://github.com/gitster/git/commits/sc/pack-redundant`.

--

Sun Chao (1):
  pack-redundant: remove unused functions

 builtin/pack-redundant.c | 86 ------------------------------------------------
 1 file changed, 86 deletions(-)

-- 
2.8.1



^ permalink raw reply

* ag/sequencer-reduce-rewriting-todo Re: What's cooking in git.git (Jan 2019, #01; Mon, 7)
From: Alban Gruin @ 2019-01-08 17:30 UTC (permalink / raw)
  To: Junio C Hamano, git
In-Reply-To: <xmqq7efg6o0d.fsf@gitster-ct.c.googlers.com>

Hi Junio,

Le 08/01/2019 à 00:34, Junio C Hamano a écrit :
> * ag/sequencer-reduce-rewriting-todo (2018-11-12) 16 commits
>  . rebase--interactive: move transform_todo_file() to rebase--interactive.c
>  . sequencer: fix a call to error() in transform_todo_file()
>  . sequencer: use edit_todo_list() in complete_action()
>  . rebase-interactive: rewrite edit_todo_list() to handle the initial edit
>  . rebase-interactive: append_todo_help() changes
>  . rebase-interactive: use todo_list_write_to_file() in edit_todo_list()
>  . sequencer: refactor skip_unnecessary_picks() to work on a todo_list
>  . sequencer: change complete_action() to use the refactored functions
>  . sequencer: make sequencer_make_script() write its script to a strbuf
>  . sequencer: refactor rearrange_squash() to work on a todo_list
>  . sequencer: refactor sequencer_add_exec_commands() to work on a todo_list
>  . sequencer: refactor check_todo_list() to work on a todo_list
>  . sequencer: introduce todo_list_write_to_file()
>  . sequencer: refactor transform_todos() to work on a todo_list
>  . sequencer: make the todo_list structure public
>  . sequencer: changes in parse_insn_buffer()
> 
>  The scripted version of "git rebase -i" wrote and rewrote the todo
>  list many times during a single step of its operation, and the
>  recent C-rewrite made a faithful conversion of the logic to C.  The
>  implementation has been updated to carry necessary information
>  around in-core to avoid rewriting the same file over and over
>  unnecessarily.
> 
>  With too many topics in-flight that touch sequencer and rebaser,
>  this need to wait giving precedence to other topics that fix bugs.
> 
> 

I submitted a new version of this topic a week ago, you may have missed
it: <20181229160413.19333-1-alban.gruin@gmail.com>.

Cheers,
Alban


^ permalink raw reply

* Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups
From: Junio C Hamano @ 2019-01-08 17:39 UTC (permalink / raw)
  To: René Scharfe; +Cc: Jeff King, git, Ævar Arnfjörð Bjarmason
In-Reply-To: <b0049722-d019-fd5d-d93d-7b7363b4f244@web.de>

René Scharfe <l.s.r@web.de> writes:

> Am 07.01.2019 um 09:31 schrieb Jeff King:
>> I also cleaned up my sha1/object_id patch and rebased it on top of what
>> you have here. Though as I worked on it, it expanded in scope a bit.
>> Possibly it should be a separate series entirely, but that would create
>> some annoying textual conflicts on merge.
>> 
>>   [01/11]: sha1-file: fix outdated sha1 comment references
>>   [02/11]: update comment references to sha1_object_info()
>>   [03/11]: http: use struct object_id instead of bare sha1
>>   [04/11]: sha1-file: modernize loose object file functions
>>   [05/11]: sha1-file: modernize loose header/stream functions
>>   [06/11]: sha1-file: convert pass-through functions to object_id
>>   [07/11]: convert has_sha1_file() callers to has_object_file()
>>   [08/11]: sha1-file: drop has_sha1_file()
>>   [09/11]: sha1-file: prefer "loose object file" to "sha1 file" in messages
>>   [10/11]: sha1-file: avoid "sha1 file" for generic use in messages
>>   [11/11]: prefer "hash mismatch" to "sha1 mismatch"
>
> I skimmed them; they look good to me.  6 and 8 are particularly
> satisfying; getting rid of hash copy operations just feels nice. :)
>
> Junio only took 1 to 5 into pu; 6, 7 and its sidekick 8, 10 and 11
> conflict with sb/more-repo-in-api; 9 could go in unmodified.

I think these later steps are based on something a lot newer than
the result of applying your updates to the jk/loose-object-cache
series they fix.  I think I untangled and backported one of the
earlier commits but then I stopped after 05/11.

I do not think it is important to keep jk/loose-object-cache and
these two follow-up topics mergeable to the maintenance track, so
I'll see if the patches behave better if queued directly on top of
3b2f8a02 ("Merge branch 'jk/loose-object-cache'", 2019-01-04), or
even a yet newer random point on 'master'.

Thanks.



^ permalink raw reply

* Re: git rebase: retain original head?
From: Andreas Schwab @ 2019-01-08 17:43 UTC (permalink / raw)
  To: Markus Wiederkehr; +Cc: git
In-Reply-To: <CA+h-Bnuf6u=hkPBcxhMm06FbfkS+jtrozu+inqqmUY1cNkXrWQ@mail.gmail.com>

On Jan 08 2019, Markus Wiederkehr <markus.wiederkehr@gmail.com> wrote:

> During the rebase operation the original head seems to get stored in
> 'rebase-merge/orig-head'. Unfortunately this references gets removed
> after the rebase operation completes.
>
> Would it be possible to retain this information?

You could use the reflog of the current branch, where it is the second
entry.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply

* Git Test Coverage Report (Tues, Jan 8)
From: Derrick Stolee @ 2019-01-08 17:50 UTC (permalink / raw)
  To: Git List

Here is today's test coverage report.

Thanks,
-Stolee

[1] https://git.visualstudio.com/git/_build/results?buildId=290

---

pu: a5fd499f842ac17440e29bd610058ccdd3cf24a1
jch: 2ccddf26bf6308d5ea65fa26ffd7372d083bfc16
next: d81d796ee0c49eae40e3f85467a8e6b18022bcea
master: ecbdaf0899161c067986e9d9d564586d4b045d62
master@{1}: b21ebb671bb7dea8d342225f0d66c41f4e54d5ca

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

apply.c
1fcfdf84ce 4275) oidclr(&patch->old_oid);

backup-log.c
fdbbdf809f  25) return error_errno(_("unable to open %s"), path);
fdbbdf809f  27) close(fd);
fdbbdf809f  28) return error_errno(_("unable to update %s"), path);
fdbbdf809f  41) return -1;
102b7856e3  63) return -1;/* corrupt? */
102b7856e3  71) return -1; /* corrupt? */
102b7856e3  75) message += 6;
102b7856e3 105) if (errno == ENOENT || errno == ENOTDIR)
102b7856e3 106) return 0;
102b7856e3 107) return -1;
102b7856e3 112) ret = error_errno(_("cannot seek back in %s"), path);
102b7856e3 123) ret = error_errno(_("cannot seek back in %s"), path);
102b7856e3 124) break;
102b7856e3 128) ret = error_errno(_("cannot read %d bytes from %s"),
102b7856e3 130) break;
102b7856e3 189) strbuf_splice(&sb, 0, 0, buf, endp - buf);
102b7856e3 190) break;
102b7856e3 215) return -1;
102b7856e3 219) ret = parse(&sb, data);
bde028c667 232) static int good_oid(struct repository *r, const struct 
object_id *oid)
bde028c667 234) if (is_null_oid(oid))
bde028c667 235) return 1;
bde028c667 237) return oid_object_info(r, oid, NULL) == OBJ_BLOB;
bde028c667 240) static int prune_parse(struct strbuf *line, void *data)
bde028c667 242) struct prune_options *opts = data;
bde028c667 245) strbuf_reset(&opts->copy);
bde028c667 246) strbuf_addbuf(&opts->copy, line);
bde028c667 248) if (bkl_parse_entry(line, &entry))
bde028c667 249) return -1;
bde028c667 251) if (entry.timestamp < opts->expire)
bde028c667 252) return 0;
bde028c667 254) if (oideq(&entry.old_oid, &entry.new_oid))
bde028c667 255) return 0;
bde028c667 257) if (!good_oid(opts->repo, &entry.old_oid) ||
bde028c667 258)     !good_oid(opts->repo, &entry.new_oid))
bde028c667 259) return 0;
bde028c667 261) if (!opts->fp)
bde028c667 262) return -1;
bde028c667 264) fputs(opts->copy.buf, opts->fp);
bde028c667 265) return 0;
bde028c667 278) return error(_("failed to lock '%s'"), path);
bde028c667 287) rollback_lock_file(&lk);
b86e9ac723 301) die(_("failed to prune %s"), "gitdir.bkl");
b86e9ac723 309) if (wt->id)
b86e9ac723 310) die(_("failed to prune %s on working tree '%s'"),
b86e9ac723 313) die(_("failed to prune %s"), "index.bkl");
b86e9ac723 316) if (wt->id)
b86e9ac723 317) die(_("failed to prune %s on working tree '%s'"),
b86e9ac723 320) die(_("failed to prune %s"), "worktree.bkl");
b2069b6eb0 331) static void add_blob_to_pending(const struct object_id *oid,
b2069b6eb0 337) if (!good_oid(cb->revs->repo, oid))
b2069b6eb0 338) return;
b2069b6eb0 340) blob = lookup_blob(cb->revs->repo, oid);
b2069b6eb0 341) blob->object.flags |= cb->flags;
b2069b6eb0 342) add_pending_object(cb->revs, &blob->object, path);
b2069b6eb0 345) static int add_pending(struct strbuf *line, void *cb)
b2069b6eb0 349) if (bkl_parse_entry(line, &entry))
b2069b6eb0 350) return -1;
b2069b6eb0 352) add_blob_to_pending(&entry.old_oid, entry.path, cb);
b2069b6eb0 353) add_blob_to_pending(&entry.new_oid, entry.path, cb);
b2069b6eb0 354) return 0;

bisect.c
04dac00473  661) mark_edges_uninteresting(revs, NULL, 0);

builtin/archive.c
01f9ec64c8 builtin/archive.c  64) if (starts_with(reader.line, "NACK "))
01f9ec64c8 builtin/archive.c  65) die(_("git archive: NACK %s"), 
reader.line + 5);

builtin/backup-log.c
fdbbdf809f  28) usage_with_options(backup_log_usage, NULL);
fdbbdf809f  33) die(_("not a valid object name: %s"), argv[2]);
fdbbdf809f  36) die(_("not a valid object name: %s"), argv[3]);
6a05b9ab74  62) return -1;
6a05b9ab74  65) return 2;
6a05b9ab74  69) return 0;
6a05b9ab74  82) return 1;/* treat null oid like empty blob */
6a05b9ab74  86) die(_("object not found: %s"), oid_to_hex(oid));
6a05b9ab74  88) die(_("not a blob: %s"), oid_to_hex(oid));
6a05b9ab74 111) usage_with_options(backup_log_usage, options);
6a05b9ab74 114) die(_("not a valid change id: %s"), argv[0]);
6a05b9ab74 119) die(_("failed to parse '%s'"), log_path);
45f3e0cd9d 130) old = the_hash_algo->empty_blob;
45f3e0cd9d 135) new = the_hash_algo->empty_blob;
45f3e0cd9d 140) return;
45f3e0cd9d 156) return -1;
45f3e0cd9d 162) return 0;
45f3e0cd9d 183) found_dash_dash = 1;
45f3e0cd9d 184) i++;
45f3e0cd9d 185) continue;
45f3e0cd9d 189) exit(128);
45f3e0cd9d 196) die(_("not a valid change id: %s"), arg);
45f3e0cd9d 204) usage_with_options(backup_log_usage, NULL);
45f3e0cd9d 208) die(_("failed to parse '%s'"), log_path);
7f1d166ee1 252) return -1;
7f1d166ee1 255) return 1;
7f1d166ee1 260) return 0;
7f1d166ee1 283) opts.revs.diffopt.output_format = DIFF_FORMAT_PATCH;
7f1d166ee1 284) diff_setup_done(&opts.revs.diffopt);
7f1d166ee1 293) ret = bkl_parse_file(log_path, log_parse, &opts);
7f1d166ee1 298) die(_("failed to parse '%s'"), log_path);
bde028c667 304) static int prune(int argc, const char **argv,
bde028c667 307) timestamp_t expire = time(NULL) - 90 * 24 * 3600;
bde028c667 308) struct option options[] = {
bde028c667 314) argc = parse_options(argc, argv, prefix, options, 
backup_log_usage, 0);
bde028c667 316) return bkl_prune(the_repository, log_path, expire);
fdbbdf809f 323) else if (!strcmp(id, "worktree"))
fdbbdf809f 324) return git_pathdup("worktree.bkl");
fdbbdf809f 325) else if (!strcmp(id, "gitdir"))
fdbbdf809f 326) return git_pathdup("common/gitdir.bkl");
fdbbdf809f 328) die(_("backup log id '%s' is not recognized"), id);
fdbbdf809f 346) die(_("expected a subcommand"));
fdbbdf809f 350) die(_("--id and --path are incompatible"));
fdbbdf809f 354) die(_("either --id or --path is required"));
bde028c667 364) else if (!strcmp(argv[0], "prune"))
bde028c667 365) return prune(argc, argv, prefix, log_path);

builtin/blame.c
080448fbe8 builtin/blame.c    930) blame_date_width = sizeof("Thu Oct 19 
16:00");
080448fbe8 builtin/blame.c    931) break;

builtin/config.c
937d6bee9e builtin/config.c      604) oidclr(oid);

builtin/fetch-pack.c
4d0feb7630 builtin/fetch-pack.c 231) get_remote_refs(fd[1], &reader, 
&ref, 0, NULL, NULL);
4d0feb7630 builtin/fetch-pack.c 232) break;

builtin/grep.c
d5498e0871 builtin/grep.c  408) const struct submodule *sub = 
submodule_from_path(superproject,
d5498e0871 builtin/grep.c  426) if (repo_submodule_init(&subrepo, 
superproject, sub)) {
d5498e0871 builtin/grep.c  431) repo_read_gitmodules(&subrepo);
d6af6af1f0 builtin/grep.c  443) 
add_to_alternates_memory(subrepo.objects->odb->path);
d5498e0871 builtin/grep.c  468) object->type == OBJ_COMMIT, &subrepo);
d5498e0871 builtin/grep.c  472) hit = grep_cache(opt, &subrepo, 
pathspec, 1);
d5498e0871 builtin/grep.c  475) repo_clear(&subrepo);

builtin/multi-pack-index.c
5532d59aaa 49) die(_("--batch-size option is only for 'repack' verb"));

builtin/rebase.c
3bd5f07101  258) write_file(state_dir_path("verbose", opts), "%s", "");
3bd5f07101  260) write_file(state_dir_path("strategy", opts), "%s",
3bd5f07101  263) write_file(state_dir_path("strategy_opts", opts), "%s",
3bd5f07101  270) write_file(state_dir_path("gpg_sign_opt", opts), "%s",
3bd5f07101  273) write_file(state_dir_path("strategy", opts), "--signoff");
2ead83aefb  396) ret = -1;
2ead83aefb  397) goto leave_reset_head;
2ead83aefb  401) ret = error(_("could not determine HEAD revision"));
2ead83aefb  402) goto leave_reset_head;
2ead83aefb  426) ret = error(_("could not read index"));
2ead83aefb  427) goto leave_reset_head;
2ead83aefb  431) ret = error(_("failed to find tree of %s"),
2ead83aefb  433) goto leave_reset_head;
2ead83aefb  437) ret = error(_("failed to find tree of %s"), 
oid_to_hex(oid));
2ead83aefb  438) goto leave_reset_head;
2ead83aefb  450) ret = error(_("could not write index"));
2ead83aefb  451) goto leave_reset_head;
2ead83aefb  469) } else if (old_orig)
2ead83aefb  470) delete_ref(NULL, "ORIG_HEAD", old_orig, 0);
3bd5f07101  546) argv_array_push(&am.args, opts->gpg_sign_opt);
3bd5f07101  580) status = error_errno(_("could not write '%s'"),
3bd5f07101  582) free(rebased_patches);
3bd5f07101  583) argv_array_clear(&am.args);
3bd5f07101  584) return status;
3bd5f07101  594) argv_array_split(&format_patch.args,
3bd5f07101  595)  opts->git_format_patch_opt.buf);
3bd5f07101  603) unlink(rebased_patches);
3bd5f07101  604) free(rebased_patches);
3bd5f07101  605) argv_array_clear(&am.args);
3bd5f07101  607) reset_head(&opts->orig_head, "checkout", 
opts->head_name, 0,
3bd5f07101  609) error(_("\ngit encountered an error while preparing the "
3bd5f07101  616) strbuf_release(&revisions);
3bd5f07101  617) return status;
3bd5f07101  623) status = error_errno(_("could not read '%s'"),
3bd5f07101  625) free(rebased_patches);
3bd5f07101  626) argv_array_clear(&am.args);
3bd5f07101  627) return status;
3bd5f07101  639) argv_array_push(&am.args, opts->gpg_sign_opt);
81ef8ee75d  960) return -1;
d421afa0c6 1448) die(_("--reschedule-failed-exec requires an interactive 
rebase"));
d421afa0c6 1480) die(_("error: cannot combine '--preserve-merges' with "

builtin/receive-pack.c
01f9ec64c8 builtin/receive-pack.c 1587)     reader->line + 8);
01f9ec64c8 builtin/receive-pack.c 1621) die("protocol error: got an 
unexpected packet");

builtin/stash.c
f6bbd78127 builtin/stash--helper.c  127) die(_("'%s' is not a stash-like 
commit"), revision);
f6bbd78127 builtin/stash--helper.c  160) free_stash_info(info);
f6bbd78127 builtin/stash--helper.c  161) fprintf_ln(stderr, _("No stash 
entries found."));
f6bbd78127 builtin/stash--helper.c  162) return -1;
f6bbd78127 builtin/stash--helper.c  197) free_stash_info(info);
cdca49bc4c builtin/stash--helper.c  224) return error(_("git stash clear 
with parameters is "
f6bbd78127 builtin/stash--helper.c  240) return -1;
f6bbd78127 builtin/stash--helper.c  248) return -1;
f6bbd78127 builtin/stash--helper.c  261) return -1;
f6bbd78127 builtin/stash--helper.c  264) return error(_("unable to write 
new index file"));
f6bbd78127 builtin/stash--helper.c  376) remove_path(stash_index_path.buf);
f6bbd78127 builtin/stash--helper.c  377) return -1;
f6bbd78127 builtin/stash--helper.c  404) return -1;
f6bbd78127 builtin/stash--helper.c  407) return error(_("cannot apply a 
stash in the middle of a merge"));
f6bbd78127 builtin/stash--helper.c  417) strbuf_release(&out);
f6bbd78127 builtin/stash--helper.c  418) return error(_("could not 
generate diff %s^!."),
f6bbd78127 builtin/stash--helper.c  425) return error(_("conflicts in 
index."
f6bbd78127 builtin/stash--helper.c  431) return error(_("could not save 
index tree"));
f6bbd78127 builtin/stash--helper.c  438) return error(_("could not 
restore untracked files from stash"));
f6bbd78127 builtin/stash--helper.c  469) return -1;
f6bbd78127 builtin/stash--helper.c  474) strbuf_release(&out);
f6bbd78127 builtin/stash--helper.c  479) strbuf_release(&out);
f6bbd78127 builtin/stash--helper.c  480) return -1;
cdca49bc4c builtin/stash--helper.c  556) return error(_("%s: Could not 
drop stash entry"),
e1d01876a4 builtin/stash--helper.c  631) printf_ln(_("The stash entry is 
kept in case "
b4493f269e builtin/stash--helper.c  765) free_stash_info(&info);
51809c70ca builtin/stash.c          766) 
usage_with_options(git_stash_show_usage, options);
847eb0b0a8 builtin/stash--helper.c  782) stash_msg = "Created via \"git 
stash store\".";
847eb0b0a8 builtin/stash--helper.c  788) if (!quiet) {
847eb0b0a8 builtin/stash--helper.c  789) fprintf_ln(stderr, _("Cannot 
update %s with %s"),
847eb0b0a8 builtin/stash--helper.c  792) return -1;
847eb0b0a8 builtin/stash--helper.c  816) if (!quiet)
847eb0b0a8 builtin/stash--helper.c  817) fprintf_ln(stderr, _("\"git 
stash store\" requires one "
847eb0b0a8 builtin/stash--helper.c  819) return -1;
1f5a011d90 builtin/stash--helper.c  901) return -1;
1f5a011d90 builtin/stash--helper.c  961) ret = -1;
1f5a011d90 builtin/stash--helper.c  962) goto done;
1f5a011d90 builtin/stash--helper.c  967) ret = -1;
1f5a011d90 builtin/stash--helper.c  968) goto done;
1f5a011d90 builtin/stash--helper.c  973) ret = -1;
1f5a011d90 builtin/stash--helper.c  974) goto done;
1f5a011d90 builtin/stash--helper.c 1000) ret = -1;
1f5a011d90 builtin/stash--helper.c 1001) goto done;
1f5a011d90 builtin/stash--helper.c 1012) ret = -1;
1f5a011d90 builtin/stash--helper.c 1013) goto done;
1f5a011d90 builtin/stash--helper.c 1019) ret = -1;
1f5a011d90 builtin/stash--helper.c 1020) goto done;
1f5a011d90 builtin/stash--helper.c 1027) ret = -1;
1f5a011d90 builtin/stash--helper.c 1028) goto done;
1f5a011d90 builtin/stash--helper.c 1053) ret = -1;
1f5a011d90 builtin/stash--helper.c 1054) goto done;
1f5a011d90 builtin/stash--helper.c 1065) ret = -1;
1f5a011d90 builtin/stash--helper.c 1066) goto done;
1f5a011d90 builtin/stash--helper.c 1072) ret = -1;
1f5a011d90 builtin/stash--helper.c 1073) goto done;
1f5a011d90 builtin/stash--helper.c 1084) ret = -1;
1f5a011d90 builtin/stash--helper.c 1085) goto done;
1f5a011d90 builtin/stash--helper.c 1090) ret = -1;
1f5a011d90 builtin/stash--helper.c 1091) goto done;
9a95010a11 builtin/stash--helper.c 1127) fprintf_ln(stderr, _("You do 
not have "
1f5a011d90 builtin/stash--helper.c 1136) ret = 1;
1f5a011d90 builtin/stash--helper.c 1137) goto done;
9a95010a11 builtin/stash--helper.c 1153) if (!quiet)
9a95010a11 builtin/stash--helper.c 1154) fprintf_ln(stderr, _("Cannot 
save the current "
1f5a011d90 builtin/stash--helper.c 1156) ret = -1;
1f5a011d90 builtin/stash--helper.c 1157) goto done;
9a95010a11 builtin/stash--helper.c 1162) if (!quiet)
9a95010a11 builtin/stash--helper.c 1163) fprintf_ln(stderr, _("Cannot save "
1f5a011d90 builtin/stash--helper.c 1165) ret = -1;
1f5a011d90 builtin/stash--helper.c 1166) goto done;
9a95010a11 builtin/stash--helper.c 1173) if (!quiet)
9a95010a11 builtin/stash--helper.c 1174) fprintf_ln(stderr, _("Cannot 
save the current "
1f5a011d90 builtin/stash--helper.c 1176) goto done;
9a95010a11 builtin/stash--helper.c 1182) if (!quiet)
9a95010a11 builtin/stash--helper.c 1183) fprintf_ln(stderr, _("Cannot 
save the current "
1f5a011d90 builtin/stash--helper.c 1185) ret = -1;
1f5a011d90 builtin/stash--helper.c 1186) goto done;
9a95010a11 builtin/stash--helper.c 1210) if (!quiet)
9a95010a11 builtin/stash--helper.c 1211) fprintf_ln(stderr, _("Cannot 
record "
1f5a011d90 builtin/stash--helper.c 1213) ret = -1;
1f5a011d90 builtin/stash--helper.c 1214) goto done;
fa38428f76 builtin/stash--helper.c 1283) ret = -1;
fa38428f76 builtin/stash--helper.c 1284) goto done;
fa38428f76 builtin/stash--helper.c 1294) ret = -1;
9a95010a11 builtin/stash--helper.c 1295) if (!quiet)
9a95010a11 builtin/stash--helper.c 1296) fprintf_ln(stderr, _("Cannot 
initialize stash"));
fa38428f76 builtin/stash--helper.c 1297) goto done;
fa38428f76 builtin/stash--helper.c 1309) ret = -1;
9a95010a11 builtin/stash--helper.c 1310) if (!quiet)
9a95010a11 builtin/stash--helper.c 1311) fprintf_ln(stderr, _("Cannot 
save the current status"));
fa38428f76 builtin/stash--helper.c 1312) goto done;
fa38428f76 builtin/stash--helper.c 1329) ret = -1;
fa38428f76 builtin/stash--helper.c 1348) ret = -1;
fa38428f76 builtin/stash--helper.c 1349) goto done;
fa38428f76 builtin/stash--helper.c 1358) ret = -1;
fa38428f76 builtin/stash--helper.c 1359) goto done;
fa38428f76 builtin/stash--helper.c 1367) ret = -1;
fa38428f76 builtin/stash--helper.c 1376) ret = -1;
fa38428f76 builtin/stash--helper.c 1387) ret = -1;
fa38428f76 builtin/stash--helper.c 1388) goto done;
fa38428f76 builtin/stash--helper.c 1397) ret = -1;
fa38428f76 builtin/stash--helper.c 1398) goto done;
fa38428f76 builtin/stash--helper.c 1406) ret = -1;
fa38428f76 builtin/stash--helper.c 1432) ret = -1;
bec65d5b78 builtin/stash.c         1524) return env;
26799a208f builtin/stash.c         1552) const char *path = 
mkpath("%s/git-legacy-stash",
26799a208f builtin/stash.c         1555) if (sane_execvp(path, (char 
**)argv) < 0)
26799a208f builtin/stash.c         1556) die_errno(_("could not exec 
%s"), path);
51809c70ca builtin/stash.c         1599) 
usage_msg_opt(xstrfmt(_("unknown subcommand: %s"), argv[0]),
51809c70ca builtin/stash.c         1627) continue;

builtin/submodule--helper.c
date.c
080448fbe8  113) die("Timestamp too large for this system: %"PRItime, time);
080448fbe8  223) hide.date = 1;
080448fbe8  886) static int auto_date_style(void)
080448fbe8  888) return (isatty(1) || pager_in_use()) ? DATE_HUMAN : 
DATE_NORMAL;
080448fbe8  911) return auto_date_style();

fetch-pack.c
01f9ec64c8  154) die(_("git fetch-pack: expected a flush packet after 
shallow list"));
01f9ec64c8  353) die(_("invalid shallow line: %s"), reader.line);
01f9ec64c8  359) die(_("invalid unshallow line: %s"), reader.line);
01f9ec64c8  361) die(_("object not found: %s"), reader.line);
01f9ec64c8  364) die(_("error in object: %s"), reader.line);
01f9ec64c8  366) die(_("no shallow found: %s"), reader.line);
01f9ec64c8  369) die(_("expected shallow/unshallow, got %s"), reader.line);

list-objects-filter.c
adbdcc0768 118) if (include_it)
e34ec45cce 119) return oidset_remove(filter_data->omits, &obj->oid);
e34ec45cce 121) return oidset_insert(filter_data->omits, &obj->oid);
adbdcc0768 167) already_seen =
adbdcc0768 168) filter_data->current_depth >= seen_info->depth;
adbdcc0768 171) filter_res = LOFR_SKIP_TREE;
adbdcc0768 178) filter_res = LOFR_DO_SHOW;
adbdcc0768 184) filter_res = LOFR_ZERO;

list-objects.c
04dac00473 241) continue;
04dac00473 250) parent->object.flags |= SHOWN;
04dac00473 251) show_edge(parent);
04dac00473 274) tree->object.flags |= UNINTERESTING;

midx.c
0d8e91f58b  806) error(_("did not see pack-file %s to drop"),
0d8e91f58b  808) drop_index++;
0d8e91f58b  809) i--;
0d8e91f58b  810) missing_drops++;
0d8e91f58b  811) continue;
0d8e91f58b  827) error(_("did not see all pack-files to drop"));
0d8e91f58b  828) result = 1;
0d8e91f58b  829) goto cleanup;
0d8e91f58b 1077) return 0;
0d8e91f58b 1092) continue;
0d8e91f58b 1095) continue;
c9b3585980 1130) return 1;
c9b3585980 1146) return 0;
c9b3585980 1155) continue;
c9b3585980 1168) continue;
c9b3585980 1191) error(_("could not start pack-objects"));
c9b3585980 1192) result = 1;
c9b3585980 1193) goto cleanup;
c9b3585980 1210) error(_("could not finish pack-objects"));
c9b3585980 1211) result = 1;
c9b3585980 1212) goto cleanup;

packfile.c
9133688752  369) strbuf_release(&buf);
9133688752  370) return;

pretty.c
4681fe38e1 1069) return 0;
b755bf6f83 1107)     match_placeholder_arg(p, "=on", end) ||
b755bf6f83 1108)     match_placeholder_arg(p, "=true", end)) {

protocol.c
6da1f1a920  37) die(_("Unrecognized protocol version"));
6da1f1a920  39) die(_("Unrecognized protocol_version"));
63bb981502  49) enum protocol_version version = 
parse_protocol_version(git_test_v);
63bb981502  51) if (version == protocol_unknown_version)
63bb981502  52) die("unknown value for %s: %s", git_test_k,
63bb981502  55) return version;

read-cache.c
43bf1db73e 1302) return 0;
43bf1db73e 1323) oidcpy(&backup_prev, &istate->cache[pos]->oid);
43bf1db73e 1343) update_backup_log(istate, &backup_prev, ce);
43bf1db73e 3215) strbuf_release(&sb);
43bf1db73e 3216) return -1;

refs/files-backend.c
c67027c9a9 1892) return;
c67027c9a9 1895) return;

remote-curl.c
6da1f1a920  344) return 0;
34a9469d6a  373) die("invalid server response; expected service, got 
flush packet");
34a9469d6a  397) d->proto_git = 1;

revision.c
497f2693ab  149) return;
497f2693ab  152) return;
497f2693ab  175) break;
04dac00473  197) continue;

send-pack.c
01f9ec64c8 143) return error(_("unable to parse remote unpack status: 
%s"), reader->line);
01f9ec64c8 162) error("invalid ref status from remote: %s", reader->line);
01f9ec64c8 579) receive_unpack_status(&reader);

strbuf.c
bfc3fe33f6  259) die("`pos' is too far after the end of the buffer");
bfc3fe33f6  266) return; /* nothing to do */
bfc3fe33f6  268) die("you want to use way too much memory");
18f8e81091  448) return 0;

submodule.c
26f80ccfc1 1398) strbuf_release(&gitdir);
be76c21282 1521) struct fetch_task *task = task_cb;
be76c21282 1525) fetch_task_release(task);
898c2e65b7 1806) warning(_("Could not unset core.worktree setting in 
submodule '%s'"),

unpack-trees.c
cc14089d7c  206) oidclr(&null_hash);
cc14089d7c  207) new_hash = &null_hash;
6f41cc899b 1716) index_path(NULL, old_hash, ce->name, &st,
6f41cc899b 1972)     old_hash && !lstat(ce->name, &st))
6f41cc899b 1973) index_path(NULL, old_hash, ce->name, &st,
cc14089d7c 2291) if (verify_absent(ce, ERROR_WOULD_LOSE_UNTRACKED_REMOVED,
cc14089d7c 2294) make_backup(ce, &old_hash, NULL, o);

upload-pack.c
01f9ec64c8  428) die("git upload-pack: expected SHA1 list, got '%s'", 
reader->line);

wrapper.c
5efde212fc  70) die("Out of memory, malloc failed (tried to allocate %" 
PRIuMAX " bytes)",
5efde212fc  73) error("Out of memory, malloc failed (tried to allocate 
%" PRIuMAX " bytes)",

Commits introducing uncovered code:
Ævar Arnfjörð Bjarmason      63bb98150: tests: add a special setup where 
for protocol.version
Anders Waldenborg      18f8e8109: strbuf: separate callback for 
strbuf_expand:ing literals
Anders Waldenborg      4681fe38e: pretty: allow showing specific trailers
Anders Waldenborg      b755bf6f8: pretty: allow %(trailers) options with 
explicit value
Derrick Stolee      04dac0047: list-objects: consume sparse tree walk
Derrick Stolee      0d8e91f58: multi-pack-index: implement 'expire' verb
Derrick Stolee      497f2693a: revision: implement sparse algorithm
Derrick Stolee      5532d59aa: multi-pack-index: prepare 'repack' subcommand
Derrick Stolee      913368875: repack: refactor pack deletion for future use
Derrick Stolee      c9b358598: midx: implement midx_repack()
Jeff King      34a9469d6: remote-curl: refactor smart-http discovery
Joel Teichroeb      cdca49bc4: stash: convert drop and clear to builtin
Joel Teichroeb      e1d01876a: stash: convert pop to builtin
Joel Teichroeb      f6bbd7812: stash: convert apply to builtin
Johannes Schindelin      26799a208: stash: optionally use the scripted 
version again
Johannes Schindelin      2ead83aef: rebase: move `reset_head()` into a 
better spot
Johannes Schindelin      3bd5f0710: built-in rebase: call `git am` directly
Johannes Schindelin      81ef8ee75: rebase: introduce a shortcut for 
--reschedule-failed-exec
Johannes Schindelin      bec65d5b7: tests: add a special setup where 
stash.useBuiltin is off
Johannes Schindelin      d421afa0c: rebase: introduce 
--reschedule-failed-exec
Jonathan Tan      4d0feb763: builtin/fetch-pack: support protocol version 2
Josh Steadmon      6da1f1a92: protocol: advertise multiple supported 
versions
Junio C Hamano      d6af6af1f: Merge branch 
'sb/submodule-recursive-fetch-gets-the-tip' into pu
Linus Torvalds      080448fbe: Add 'human' date format
Martin Koegler      5efde212f: zlib.c: use size_t for size
Masaya Suzuki      01f9ec64c: Use packet_reader instead of packet_read_line
Matthew DeVore      adbdcc076: list-objects-filter: teach tree:# how to 
handle >0
Matthew DeVore      e34ec45cc: tree:<depth>: skip some trees even when 
collecting omits
Nguyễn Thái Ngọc Duy      102b7856e: backup-log.c: add API for walking 
backup log
Nguyễn Thái Ngọc Duy      1fcfdf84c: apply: support backup log with 
--keep-backup
Nguyễn Thái Ngọc Duy      43bf1db73: read-cache.c: new flag for 
add_index_entry() to write to backup log
Nguyễn Thái Ngọc Duy      45f3e0cd9: backup-log: add diff command
Nguyễn Thái Ngọc Duy      6a05b9ab7: backup-log: add cat command
Nguyễn Thái Ngọc Duy      6f41cc899: reset --hard: keep backup of 
overwritten files
Nguyễn Thái Ngọc Duy      7f1d166ee: backup-log: add log command
Nguyễn Thái Ngọc Duy      937d6bee9: config --edit: support backup log
Nguyễn Thái Ngọc Duy      b2069b6eb: backup-log: keep all blob 
references around
Nguyễn Thái Ngọc Duy      b86e9ac72: gc: prune backup logs
Nguyễn Thái Ngọc Duy      bde028c66: backup-log: add prune command
Nguyễn Thái Ngọc Duy      c67027c9a: refs: keep backup of deleted reflog
Nguyễn Thái Ngọc Duy      cc14089d7: unpack-trees.c: keep backup of 
ignored files being overwritten
Nguyễn Thái Ngọc Duy      fdbbdf809: backup-log: add "update" subcommand
Paul-Sebastian Ungureanu      1f5a011d9: stash: convert create to builtin
Paul-Sebastian Ungureanu      51809c70c: stash: convert 
`stash--helper.c` into `stash.c`
Paul-Sebastian Ungureanu      847eb0b0a: stash: convert store to builtin
Paul-Sebastian Ungureanu      9a95010a1: stash: make push -q quiet
Paul-Sebastian Ungureanu      b4493f269: stash: convert show to builtin
Paul-Sebastian Ungureanu      bfc3fe33f: strbuf.c: add 
`strbuf_insertf()` and `strbuf_vinsertf()`
Paul-Sebastian Ungureanu      fa38428f7: stash: convert push to builtin
Stefan Beller      26f80ccfc: submodule: migrate get_next_submodule to 
use repository structs
Stefan Beller      898c2e65b: submodule: unset core.worktree if no 
working tree is present
Stefan Beller      be76c2128: fetch: ensure submodule objects fetched
Stefan Beller      d5498e087: repository: repo_submodule_init to take a 
submodule struct



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

builtin/bisect--helper.c
5e82c3dd22 builtin/bisect--helper.c 162) if (get_oid_commit(commit, &oid))
5e82c3dd22 builtin/bisect--helper.c 163) return error(_("'%s' is not a 
valid commit"), commit);
5e82c3dd22 builtin/bisect--helper.c 164) strbuf_addstr(&branch, commit);
5e82c3dd22 builtin/bisect--helper.c 172) strbuf_release(&branch);
5e82c3dd22 builtin/bisect--helper.c 173) argv_array_clear(&argv);
5e82c3dd22 builtin/bisect--helper.c 174) return error(_("could not check 
out original"
0f30233a11 builtin/bisect--helper.c 215) retval = error(_("Bad 
bisect_write argument: %s"), state);
0f30233a11 builtin/bisect--helper.c 216) goto finish;
0f30233a11 builtin/bisect--helper.c 220) retval = error(_("couldn't get 
the oid of the rev '%s'"), rev);
0f30233a11 builtin/bisect--helper.c 221) goto finish;
0f30233a11 builtin/bisect--helper.c 226) retval = -1;
0f30233a11 builtin/bisect--helper.c 227) goto finish;
0f30233a11 builtin/bisect--helper.c 232) retval = 
error_errno(_("couldn't open the file '%s'"), git_path_bisect_log());
0f30233a11 builtin/bisect--helper.c 233) goto finish;
129a6cf344 builtin/bisect--helper.c 329) yesno = git_prompt(_("Are you 
sure [Y/n]? "), PROMPT_ECHO);
129a6cf344 builtin/bisect--helper.c 330) if (starts_with(yesno, "N") || 
starts_with(yesno, "n"))
129a6cf344 builtin/bisect--helper.c 331) retval = -1;
129a6cf344 builtin/bisect--helper.c 332) goto finish;
129a6cf344 builtin/bisect--helper.c 338) retval = 
error(_(need_bisect_start_warning),
450ebb7359 builtin/bisect--helper.c 389) return error(_("invalid 
argument %s for 'git bisect terms'.\n"
06f5608c14 builtin/bisect--helper.c 404) return -1;
06f5608c14 builtin/bisect--helper.c 407) retval = -1;
06f5608c14 builtin/bisect--helper.c 408) goto finish;
06f5608c14 builtin/bisect--helper.c 413) retval = -1;
06f5608c14 builtin/bisect--helper.c 452) no_checkout = 1;
06f5608c14 builtin/bisect--helper.c 474)  !one_of(arg, "--term-good", 
"--term-bad", NULL)) {
06f5608c14 builtin/bisect--helper.c 475) return error(_("unrecognized 
option: '%s'"), arg);
06f5608c14 builtin/bisect--helper.c 510) if (get_oid("HEAD", &head_oid))
06f5608c14 builtin/bisect--helper.c 511) return error(_("bad HEAD - I 
need a HEAD"));
06f5608c14 builtin/bisect--helper.c 526) retval = error(_("checking out 
'%s' failed."
06f5608c14 builtin/bisect--helper.c 547) return error(_("won't bisect on 
cg-seek'ed tree"));
06f5608c14 builtin/bisect--helper.c 550) return error(_("bad HEAD - 
strange symbolic ref"));
06f5608c14 builtin/bisect--helper.c 558) return -1;
06f5608c14 builtin/bisect--helper.c 576) retval = -1;
06f5608c14 builtin/bisect--helper.c 577) goto finish;
06f5608c14 builtin/bisect--helper.c 588) retval = -1;
06f5608c14 builtin/bisect--helper.c 589) goto finish;
06f5608c14 builtin/bisect--helper.c 600) retval = -1;
5e82c3dd22 builtin/bisect--helper.c 677) return error(_("--bisect-reset 
requires either no argument or a commit"));
0f30233a11 builtin/bisect--helper.c 681) return error(_("--bisect-write 
requires either 4 or 5 arguments"));
4fbdbd5bff builtin/bisect--helper.c 687) return 
error(_("--check-and-set-terms requires 3 arguments"));
129a6cf344 builtin/bisect--helper.c 693) return 
error(_("--bisect-next-check requires 2 or 3 arguments"));

builtin/branch.c
7bdbccf4cb builtin/branch.c 370) strbuf_addf(&local, 
"%s%%(if:notequals=*)%%(HEAD)%%(then)%%(if)%%(worktreepath)%%(then)%%(worktreepath) 
%%(end)%%(end)%s",
0ecb1fc726 builtin/branch.c 460) die(_("could not resolve HEAD"));
0ecb1fc726 builtin/branch.c 466) die(_("HEAD (%s) points outside of 
refs/heads/"), refname);

builtin/checkout.c
da1c1cf6f5 builtin/checkout.c  302) return;
da1c1cf6f5 builtin/checkout.c 1268) die(_("'%s' cannot be used with 
switching branches"),

builtin/pull.c
b19eee9066 647) argv_array_push(&args, opt_cleanup);

builtin/remote.c
f39a9c6547 builtin/remote.c 1551) die(_("--save-to-push cannot be used 
with other options"));
f39a9c6547 builtin/remote.c 1575) die(_("--save-to-push can only be used 
when only one url is defined"));

builtin/worktree.c
00a6d4d1d2 752) found_submodules = 1;
00a6d4d1d2 753) break;

commit-graph.c
721351787e  127) return NULL;
721351787e  130) return NULL;
721351787e  186) free(graph);
721351787e  187) return NULL;
721351787e  222) free(graph);
721351787e  223) return NULL;

config.c
7e43b32b58 1488) return git_ident_config(var, value, cb);
7e43b32b58 1491) return git_ident_config(var, value, cb);

entry.c
hex.c
47edb64997  93) char *sha1_to_hex_r(char *buffer, const unsigned char *sha1)
47edb64997  95) return hash_to_hex_algop_r(buffer, sha1, 
&hash_algos[GIT_HASH_SHA1]);
47edb64997 116) char *hash_to_hex(const unsigned char *hash)
47edb64997 118) return hash_to_hex_algop(hash, the_hash_algo);

http-walker.c
e3180fd0b9 http-walker.c 550) loose_object_path(the_repository, &buf, 
&req->oid);

http.c
168badebdd 2004) FILE *new_file = freopen(dest->filename, "w", dest->file);
168badebdd 2005) if (new_file == NULL) {
168badebdd 2006) error("Unable to open local file %s", dest->filename);
168badebdd 2007) return HTTP_ERROR;
168badebdd 2009) dest->file = new_file;

ident.c
7e43b32b58 373) email = git_author_email.buf;
7e43b32b58 375) email = git_committer_email.buf;
7e43b32b58 394) name = git_author_name.buf;
7e43b32b58 396) name = git_committer_name.buf;
7e43b32b58 504) if (!value)
7e43b32b58 505) return config_error_nonbool(var);
7e43b32b58 506) strbuf_reset(&git_author_name);
7e43b32b58 507) strbuf_addstr(&git_author_name, value);
7e43b32b58 508) author_ident_explicitly_given |= IDENT_NAME_GIVEN;
7e43b32b58 509) ident_config_given |= IDENT_NAME_GIVEN;
7e43b32b58 510) return 0;
7e43b32b58 514) if (!value)
7e43b32b58 515) return config_error_nonbool(var);
7e43b32b58 516) strbuf_reset(&git_author_email);
7e43b32b58 517) strbuf_addstr(&git_author_email, value);
7e43b32b58 518) author_ident_explicitly_given |= IDENT_MAIL_GIVEN;
7e43b32b58 519) ident_config_given |= IDENT_MAIL_GIVEN;
7e43b32b58 520) return 0;
7e43b32b58 524) if (!value)
7e43b32b58 525) return config_error_nonbool(var);
7e43b32b58 526) strbuf_reset(&git_committer_name);
7e43b32b58 527) strbuf_addstr(&git_committer_name, value);
7e43b32b58 528) committer_ident_explicitly_given |= IDENT_NAME_GIVEN;
7e43b32b58 529) ident_config_given |= IDENT_NAME_GIVEN;
7e43b32b58 530) return 0;
7e43b32b58 534) if (!value)
7e43b32b58 535) return config_error_nonbool(var);
7e43b32b58 536) strbuf_reset(&git_committer_email);
7e43b32b58 537) strbuf_addstr(&git_committer_email, value);
7e43b32b58 538) committer_ident_explicitly_given |= IDENT_MAIL_GIVEN;
7e43b32b58 539) ident_config_given |= IDENT_MAIL_GIVEN;
7e43b32b58 540) return 0;

read-cache.c
ee70c12820 1736) if (advice_unknown_index_extension) {
ee70c12820 1737) warning(_("ignoring optional %.4s index extension"), ext);
ee70c12820 1738) advise(_("This is likely due to the file having been 
written by a newer\n"

ref-filter.c
1867ce6cbe  254) oi_deref.info.sizep = &oi_deref.size;
1867ce6cbe  263) return strbuf_addf_ret(err, -1, _("unrecognized 
%%(objectsize) argument: %s"), arg);
33311fa1ad  271) return strbuf_addf_ret(err, -1, _("%%(deltabase) does 
not take arguments"));
70550aa6d2  467) return 0;

remote-curl.c
168badebdd  566) return size;

sequencer.c
899b49c446 2393) opts->quiet = 1;

setup.c
07098b81a4 1093) if (!nongit_ok)
07098b81a4 1094) die(_("not a git repository (or any parent up to mount 
point %s)\n"
07098b81a4 1097) *nongit_ok = 1;
07098b81a4 1098) break;

sha1-file.c
2f90b9d9b4 sha1-file.c  172) int hash_algo_by_name(const char *name)
2f90b9d9b4 sha1-file.c  175) if (!name)
2f90b9d9b4 sha1-file.c  176) return GIT_HASH_UNKNOWN;
2f90b9d9b4 sha1-file.c  177) for (i = 1; i < GIT_HASH_NALGOS; i++)
2f90b9d9b4 sha1-file.c  178) if (!strcmp(name, hash_algos[i].name))
2f90b9d9b4 sha1-file.c  179) return i;
2f90b9d9b4 sha1-file.c  180) return GIT_HASH_UNKNOWN;
2f90b9d9b4 sha1-file.c  183) int hash_algo_by_id(uint32_t format_id)
2f90b9d9b4 sha1-file.c  186) for (i = 1; i < GIT_HASH_NALGOS; i++)
2f90b9d9b4 sha1-file.c  187) if (format_id == hash_algos[i].format_id)
2f90b9d9b4 sha1-file.c  188) return i;
2f90b9d9b4 sha1-file.c  189) return GIT_HASH_UNKNOWN;
e3180fd0b9 sha1-file.c 1294) status = error(_("unable to parse %s 
header"), oid_to_hex(oid));
aff8ab85b9 sha1-file.c 2312) the_hash_algo->final_fn(real_oid.hash, &c);
aff8ab85b9 sha1-file.c 2313) if (!oideq(expected_oid, &real_oid)) {

transport-helper.c
3b3357626e 1029) static int has_attribute(const char *attrs, const char 
*attr)

wrapper.c
e3b1e3bdc0 701) die_errno(_("could not stat %s"), filename);

Commits introducing uncovered code:
brian m. carlson      2f90b9d9b: sha1-file: provide functions to look up 
hash algorithms
brian m. carlson      47edb6499: hex: introduce functions to print 
arbitrary hashes
Daniels Umanovskis      0ecb1fc72: branch: introduce --show-current 
display option
Denton Liu      b19eee906: merge: add scissors line on merge conflict
Denton Liu      f39a9c654: remote: add --save-to-push option to git 
remote set-url
Elijah Newren      899b49c44: git-rebase, sequencer: extend --quiet 
option for the interactive machinery
Erin Dahlgren      07098b81a: Simplify handling of 
setup_git_directory_gently() failure cases.
Jeff King      aff8ab85b: sha1-file: modernize loose header/stream functions
Jeff King      e3180fd0b: sha1-file: modernize loose object file functions
Jonathan Nieder      ee70c1282: index: offer advice for unknown index 
extensions
Josh Steadmon      721351787: commit-graph, fuzz: add fuzzer for 
commit-graph
Masaya Suzuki      168badebd: Change how HTTP response body is returned
Nguyễn Thái Ngọc Duy      00a6d4d1d: worktree: allow to (re)move 
worktrees with uninitialized submodules
Nguyễn Thái Ngọc Duy      3b3357626: style: the opening '{' of a 
function is in a separate line
Nickolai Belakovski      70550aa6d: ref-filter: add worktreepath atom
Nickolai Belakovski      7bdbccf4c: branch: add an extra verbose output 
displaying worktree path for checked out branch
Olga Telezhnaya      1867ce6cb: ref-filter: add objectsize:disk option
Olga Telezhnaya      33311fa1a: ref-filter: add deltabase option
Pranit Bauva      06f5608c1: bisect--helper: `bisect_start` shell 
function partially in C
Pranit Bauva      0f30233a1: bisect--helper: `bisect_write` shell 
function in C
Pranit Bauva      129a6cf34: bisect--helper: `bisect_next_check` shell 
function in C
Pranit Bauva      450ebb735: bisect--helper: `get_terms` & 
`bisect_terms` shell function in C
Pranit Bauva      4fbdbd5bf: bisect--helper: `check_and_set_terms` shell 
function in C
Pranit Bauva      5e82c3dd2: bisect--helper: `bisect_reset` shell 
function in C
Pranit Bauva      e3b1e3bdc: wrapper: move is_empty_file() and rename it 
as is_empty_or_missing_file()
Thomas Gummerer      da1c1cf6f: checkout: introduce --{,no-}overlay option
William Hubbs      7e43b32b5: Add author and committer configuration 
settings



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

apply.c
0f086e6dca 3355) if (checkout_entry(ce, &costate, NULL, NULL) ||
0f086e6dca 3356)     lstat(ce->name, st))

pathspec.c
22af33bece 671) name = to_free = xmemdupz(name, namelen);

read-cache.c
ec36c42a63 3498) const char *index = NULL;
ec36c42a63 3504) if (!offset)
ec36c42a63 3505) return NULL;
ec36c42a63 3506) while (offset <= mmap_size - the_hash_algo->rawsz - 8) {
ec36c42a63 3507) extsize = get_be32(mmap + offset + 4);
ec36c42a63 3508) if (CACHE_EXT((mmap + offset)) == 
CACHE_EXT_INDEXENTRYOFFSETTABLE) {
ec36c42a63 3509) index = mmap + offset + 4 + 4;
ec36c42a63 3510) break;
ec36c42a63 3512) offset += 8;
ec36c42a63 3513) offset += extsize;
ec36c42a63 3515) if (!index)
ec36c42a63 3516) return NULL;
ec36c42a63 3519) ext_version = get_be32(index);
ec36c42a63 3520) if (ext_version != IEOT_VERSION) {
ec36c42a63 3521) error("invalid IEOT version %d", ext_version);
ec36c42a63 3522) return NULL;
ec36c42a63 3524) index += sizeof(uint32_t);
ec36c42a63 3527) nr = (extsize - sizeof(uint32_t)) / (sizeof(uint32_t) + 
sizeof(uint32_t));
ec36c42a63 3528) if (!nr) {
ec36c42a63 3529) error("invalid number of IEOT entries %d", nr);
ec36c42a63 3530) return NULL;
ec36c42a63 3532) ieot = xmalloc(sizeof(struct index_entry_offset_table)
ec36c42a63 3533)        + (nr * sizeof(struct index_entry_offset)));
ec36c42a63 3534) ieot->nr = nr;
ec36c42a63 3535) for (i = 0; i < nr; i++) {
ec36c42a63 3536) ieot->entries[i].offset = get_be32(index);
ec36c42a63 3537) index += sizeof(uint32_t);
ec36c42a63 3538) ieot->entries[i].nr = get_be32(index);
ec36c42a63 3539) index += sizeof(uint32_t);
ec36c42a63 3542) return ieot;

tree.c
e092073d64 104) commit = lookup_commit(r, entry.oid);

Commits introducing uncovered code:
Nguyễn Thái Ngọc Duy      0f086e6dc: checkout: print something when 
checking out paths
Nguyễn Thái Ngọc Duy      22af33bec: dir.c: move, rename and export 
match_attrs()
Nguyễn Thái Ngọc Duy      e092073d6: tree.c: make read_tree*() take 
'struct repository *'
Nguyễn Thái Ngọc Duy      ec36c42a6: Indent code with TABs



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

archive.c
c6e7965ddf 399) die(_("not a valid object name: %s"), name);
c6e7965ddf 412) die(_("not a tree object: %s"), oid_to_hex(&oid));
c6e7965ddf 422) die(_("current working directory is untracked"));

attr.c
ad8f8f4aed  369) fprintf_ln(stderr, _("%s not allowed: %s:%d"),

blame.c
fb998eae6c 1717) obj = deref_tag(revs->repo, obj, NULL, 0);
fb998eae6c 1724) head_commit = lookup_commit_reference_gently(revs->repo,

builtin/bundle.c
74ae4b638d builtin/bundle.c 64) return !!unbundle(the_repository, 
&header, bundle_fd, 0) ||

builtin/fast-export.c
b93b81e799 builtin/fast-export.c   52) signed_tag_mode = SIGNED_TAG_ABORT;
b93b81e799 builtin/fast-export.c   70) tag_of_filtered_mode = 
TAG_FILTERING_ABORT;
f129c4275c builtin/fast-export.c  202) if (!p->parents)
f129c4275c builtin/fast-export.c  203) return NULL;
f129c4275c builtin/fast-export.c  204) p = p->parents->item;
f129c4275c builtin/fast-export.c  205) }
843b9e6d48 builtin/fast-export.c  265) die("oid mismatch in blob %s", 
oid_to_hex(oid));
a965bb3116 builtin/fast-export.c  277) printf("original-oid %s\n", 
oid_to_hex(oid));
843b9e6d48 builtin/fast-export.c  356) const unsigned hashsz = 
the_hash_algo->rawsz;
843b9e6d48 builtin/fast-export.c  357) unsigned char *out = 
xcalloc(hashsz, 1);
843b9e6d48 builtin/fast-export.c  358) put_be32(out + hashsz - 4, 
counter++);
843b9e6d48 builtin/fast-export.c  362) static const struct object_id 
*anonymize_oid(const struct object_id *oid)
843b9e6d48 builtin/fast-export.c  365) size_t len = the_hash_algo->rawsz;
843b9e6d48 builtin/fast-export.c  366) return anonymize_mem(&objs, 
generate_fake_oid, oid, &len);
843b9e6d48 builtin/fast-export.c  426) anonymize_oid(&spec->oid) :
a965bb3116 builtin/fast-export.c  644) printf("original-oid %s\n", 
oid_to_hex(&commit->object.oid));
530ca19c02 builtin/fast-export.c  668) printf("%s\n", oid_to_hex(anonymize ?
530ca19c02 builtin/fast-export.c  669) anonymize_oid(&obj->oid) :
f129c4275c builtin/fast-export.c  810) p = rewrite_commit((struct commit 
*)tagged);
f129c4275c builtin/fast-export.c  811) if (!p) {
f129c4275c builtin/fast-export.c  812) printf("reset %s\nfrom %s\n\n",
f129c4275c builtin/fast-export.c  814) free(buf);
f129c4275c builtin/fast-export.c  815) return;
a965bb3116 builtin/fast-export.c  825) printf("original-oid %s\n", 
oid_to_hex(&tag->object.oid));
cd13762d8f builtin/fast-export.c  943) printf("reset %s\nfrom %s\n\n",
cd13762d8f builtin/fast-export.c  945) continue;
530ca19c02 builtin/fast-export.c  960) if (!reference_excluded_commits) {
530ca19c02 builtin/fast-export.c  962) printf("reset %s\nfrom %s\n\n",
530ca19c02 builtin/fast-export.c  964) continue;
530ca19c02 builtin/fast-export.c  967) printf("reset %s\nfrom %s\n\n", name,
530ca19c02 builtin/fast-export.c  968) oid_to_hex(&commit->object.oid));
fdf31b6369 builtin/fast-export.c  969) continue;

builtin/fsck.c
674ba34038 builtin/fsck.c  87) ret = _("unknown");
674ba34038 builtin/fsck.c 167) objerror(parent, _("wrong object type in 
link"));
674ba34038 builtin/fsck.c 278) printf_ln(_("unreachable %s %s"), 
printable_type(obj),
674ba34038 builtin/fsck.c 306) error(_("could not create lost-found"));
674ba34038 builtin/fsck.c 313) die_errno(_("could not write '%s'"), 
filename);
674ba34038 builtin/fsck.c 317) die_errno(_("could not finish '%s'"),
674ba34038 builtin/fsck.c 334) fprintf_ln(stderr, _("Checking %s"), 
describe_object(obj));
674ba34038 builtin/fsck.c 352) fprintf_ln(stderr, _("Checking 
connectivity (%d objects)"), max);
674ba34038 builtin/fsck.c 371) fprintf_ln(stderr, _("Checking %s %s"),
674ba34038 builtin/fsck.c 384) printf_ln(_("root %s"),
674ba34038 builtin/fsck.c 420) return error(_("%s: object corrupt or 
missing"),
674ba34038 builtin/fsck.c 459) fprintf_ln(stderr, _("Checking reflog 
%s->%s"),
674ba34038 builtin/fsck.c 583) error(_("%s: object could not be parsed: 
%s"),
674ba34038 builtin/fsck.c 618) fprintf_ln(stderr, _("Checking object 
directory"));
3813a89fae builtin/fsck.c 636) fprintf_ln(stderr, _("Checking %s link"), 
head_ref_name);
3813a89fae builtin/fsck.c 641) return error(_("invalid %s"), head_ref_name);
674ba34038 builtin/fsck.c 670) fprintf_ln(stderr, _("Checking cache tree"));
674ba34038 builtin/fsck.c 686) err |= objerror(obj, _("non-tree in 
cache-tree"));

builtin/merge.c
9440b831ad builtin/merge.c  131) return error(_("option `%s' requires a 
value"), opt->long_name);

builtin/rebase--interactive.c
005af339c9 builtin/rebase--interactive.c  262) ret = 
rearrange_squash(the_repository);
005af339c9 builtin/rebase--interactive.c  265) ret = 
sequencer_add_exec_commands(the_repository, cmd);

builtin/reflog.c
dd509db342 builtin/reflog.c 592) usage(_(reflog_expire_usage));
dd509db342 builtin/reflog.c 643) status |= error(_("%s points 
nowhere!"), argv[i]);
dd509db342 builtin/reflog.c 689) usage(_(reflog_delete_usage));
dd509db342 builtin/reflog.c 695) return error(_("no reflog specified to 
delete"));
dd509db342 builtin/reflog.c 704) status |= error(_("not a reflog: %s"), 
argv[i]);
dd509db342 builtin/reflog.c 709) status |= error(_("no reflog for 
'%s'"), argv[i]);
dd509db342 builtin/reflog.c 744) usage(_(reflog_exists_usage));
dd509db342 builtin/reflog.c 752) usage(_(reflog_exists_usage));
dd509db342 builtin/reflog.c 755) die(_("invalid ref format: %s"), 
argv[start]);

builtin/repack.c
c83d950e59 200) die(_("could not start pack-objects to repack promisor 
objects"));
3813a89fae 239) die(_("repack: Expecting full hex object ID lines only 
from pack-objects."));
c83d950e59 250) die_errno(_("unable to create '%s'"), promisor_name);
3813a89fae 411) die(_("repack: Expecting full hex object ID lines only 
from pack-objects."));

bundle.c
74ae4b638d 394) struct commit *one = lookup_commit_reference(revs->repo, 
&oid);

delta-islands.c
385cb64ff3 216) parse_object(r, &obj->oid);

fast-import.c
a965bb3116 1821) read_next_command();

git.c
8aa8c14097 341) die_errno(_("while expanding alias '%s': '%s'"),
8aa8c14097 350) die(_("alias '%s' changes environment variables.\n"
8aa8c14097 358) die(_("empty alias for %s"), alias_command);
8aa8c14097 361) die(_("recursive alias: %s"), alias_command);
8aa8c14097 412) die(_("%s doesn't support --super-prefix"), p->cmd);
8aa8c14097 436) die_errno(_("write failure on standard output"));
8aa8c14097 438) die(_("unknown write failure on standard output"));
8aa8c14097 440) die_errno(_("close failed on standard output"));
8aa8c14097 657) die(_("%s doesn't support --super-prefix"), argv[0]);
8aa8c14097 769) die(_("cannot handle %s as a builtin"), cmd);

http-walker.c
b69fb867b4 http-walker.c 550) loose_object_path(the_repository, &buf, 
req->sha1);

http.c
d73019feb4  289) return git_config_string(&curl_http_version, var, value);
d73019feb4  797) static int get_curl_http_version_opt(const char 
*version_string, long *opt)
d73019feb4  808) for (i = 0; i < ARRAY_SIZE(choice); i++) {
d73019feb4  809) if (!strcmp(version_string, choice[i].name)) {
d73019feb4  810) *opt = choice[i].opt_token;
d73019feb4  811) return 0;
d73019feb4  815) warning("unknown value given to http.version: '%s'", 
version_string);
d73019feb4  816) return -1; /* not found */
d73019feb4  841) if (!get_curl_http_version_opt(curl_http_version, &opt)) {
d73019feb4  843) curl_easy_setopt(result, CURLOPT_HTTP_VERSION, opt);

merge-recursive.c
37b65ce36b 1584) return -1;
37b65ce36b 1587) return -1;
37b65ce36b 1593) return -1;
37b65ce36b 1596) return -1;
37b65ce36b 1663) return -1;
37b65ce36b 1666) return -1;
37b65ce36b 1669) return -1;
7f8671656f 1702) return -1;
48c9cb9d6d 1758) return -1;
48c9cb9d6d 1806) return -1;
48c9cb9d6d 1812) return -1;
48c9cb9d6d 1815) return -1;
48c9cb9d6d 1825) return -1;
48c9cb9d6d 1831) return -1;
48c9cb9d6d 1834) return -1;

parse-options-cb.c
9440b831ad  21) return error(_("option `%s' expects a numerical value"),
9440b831ad  51) return error(_("option `%s' expects \"always\", 
\"auto\", or \"never\""),

parse-options.c
9440b831ad  88) return error(_("%s takes no value"), optname(opt, flags));
9440b831ad  90) return error(_("%s isn't available"), optname(opt, flags));
9440b831ad  92) return error(_("%s takes no value"), optname(opt, flags));
9440b831ad 178) return error(_("%s expects a numerical value"),
9440b831ad 194) return error(_("%s expects a non-negative integer value"
8900342628 356) error(_("did you mean `--%s` (with two dashes ?)"), arg);
8900342628 653) error(_("unknown non-ascii option in string: `%s'"),
9440b831ad 787) strbuf_addf(&sb, "option `no-%s'", opt->long_name);

read-cache.c
9d0a9e9089  675) die(_("will not add file alias '%s' ('%s' already 
exists in index)"),
9d0a9e9089  676)     ce->name, alias->name);
9d0a9e9089  691) die(_("cannot create an empty blob in the object 
database"));
9d0a9e9089  712) return error(_("%s: can only add regular files, 
symbolic links or git-directories"), path);
9d0a9e9089  786) return error(_("unable to add '%s' to index"), path);
9d0a9e9089  822) error(_("invalid path '%s'"), path);
9d0a9e9089  848) error(_("invalid path '%s'"), path);
9d0a9e9089 1686) return error(_("bad signature 0x%08x"), 
hdr->hdr_signature);
9d0a9e9089 1689) return error(_("bad index version %d"), hdr_version);
9d0a9e9089 1728) return error(_("index uses %.4s extension, which we do 
not understand"),
9d0a9e9089 1730) fprintf_ln(stderr, _("ignoring %.4s extension"), ext);
9d0a9e9089 1777) die(_("unknown index entry format 0x%08x"), 
extended_flags);
9d0a9e9089 1848) die(_("unordered stage entries in index"));
9d0a9e9089 1851) die(_("multiple stage entries for merged file '%s'"),
9d0a9e9089 1854) die(_("unordered stage entries for '%s'"),
9d0a9e9089 2148) die_errno(_("%s: index file open failed"), path);
9d0a9e9089 2152) die_errno(_("%s: cannot stat the open index"), path);
9d0a9e9089 2156) die(_("%s: index file smaller than expected"), path);
9d0a9e9089 2160) die_errno(_("%s: unable to map index file"), path);
9d0a9e9089 2251) warning(_("could not freshen shared index '%s'"), 
shared_index);
9d0a9e9089 2286) die(_("broken index, expect %s in %s, got %s"),
9d0a9e9089 3100) error(_("cannot fix permission bits on '%s'"), 
get_tempfile_path(*temp));
9d0a9e9089 3247) return error(_("%s: cannot drop to stage #0"),

ref-filter.c
9440b831ad 2330) return error(_("option `%s' is incompatible with 
--no-merged"),

remote.c
0b9c3afdbf  363) warning(_("config remote shorthand cannot begin with 
'/': %s"),
0b9c3afdbf  418) error(_("more than one uploadpack given, using the 
first"));
0b9c3afdbf  684) die(_("key '%s' of pattern had no '*'"), key);
0b9c3afdbf  694) die(_("value '%s' of pattern has no '*'"), value);
0b9c3afdbf 1102) error(_("unable to delete '%s': remote ref does not 
exist"),
0b9c3afdbf 1121) return error(_("dst ref %s receives from more than one 
src"),
0b9c3afdbf 1840) die(_("couldn't find remote ref %s"), name);
0b9c3afdbf 1853) error(_("* Ignoring funny ref '%s' locally"),
0b9c3afdbf 1948) die(_("revision walk setup failed"));
0b9c3afdbf 2221) return error(_("cannot parse expected object name '%s'"),

sequencer.c
f11c958054  593) istate->cache_tree = cache_tree();
f11c958054 3974) res = error_dirty_index(r->index, opts);

sha1-file.c
f0eaf63819 sha1-file.c 2139) return r;

Commits introducing uncovered code:
Elijah Newren      37b65ce36: merge-recursive: new function for better 
colliding conflict resolutions
Elijah Newren      48c9cb9d6: merge-recursive: improve 
rename/rename(1to2)/add[/add] handling
Elijah Newren      530ca19c0: fast-export: add 
--reference-excluded-parents option
Elijah Newren      7f8671656: merge-recursive: fix rename/add conflict 
handling
Elijah Newren      843b9e6d4: fast-export: convert sha1 to oid
Elijah Newren      a965bb311: fast-export: add a --show-original-ids 
option to show original names
Elijah Newren      b93b81e79: fast-export: use value from correct enum
Elijah Newren      cd13762d8: fast-export: when using paths, avoid 
corrupt stream with non-existent mark
Elijah Newren      f129c4275: fast-export: move commit rewriting logic 
into a function for reuse
Elijah Newren      fdf31b636: fast-export: ensure we export requested refs
Force Charlie      d73019feb: http: add support selecting http version
Jeff King      b69fb867b: sha1_file_name(): overwrite buffer instead of 
appending
Jeff King      f0eaf6381: sha1-file: use an object_directory for the 
main object dir
Junio C Hamano      3813a89fa: Merge branch 'nd/i18n'
Nguyễn Thái Ngọc Duy      005af339c: sequencer.c: remove implicit 
dependency on the_repository
Nguyễn Thái Ngọc Duy      0b9c3afdb: remote.c: mark messages for translation
Nguyễn Thái Ngọc Duy      385cb64ff: delta-islands.c: remove 
the_repository references
Nguyễn Thái Ngọc Duy      674ba3403: fsck: mark strings for translation
Nguyễn Thái Ngọc Duy      74ae4b638: bundle.c: remove the_repository 
references
Nguyễn Thái Ngọc Duy      890034262: parse-options.c: mark more strings 
for translation
Nguyễn Thái Ngọc Duy      8aa8c1409: git.c: mark more strings for 
translation
Nguyễn Thái Ngọc Duy      9440b831a: parse-options: replace opterror() 
with optname()
Nguyễn Thái Ngọc Duy      9d0a9e908: read-cache.c: mark more strings for 
translation
Nguyễn Thái Ngọc Duy      ad8f8f4ae: attr.c: mark more string for 
translation
Nguyễn Thái Ngọc Duy      c6e7965dd: archive.c: mark more strings for 
translation
Nguyễn Thái Ngọc Duy      c83d950e5: repack: mark more strings for 
translation
Nguyễn Thái Ngọc Duy      dd509db34: reflog: mark strings for translation
Nguyễn Thái Ngọc Duy      f11c95805: sequencer.c: remove implicit 
dependency on the_index
Nguyễn Thái Ngọc Duy      fb998eae6: blame.c: remove implicit dependency 
the_repository



^ permalink raw reply

* Re: tg/checkout-no-overlay, was Re: What's cooking in git.git (Jan 2019, #01; Mon, 7)
From: Junio C Hamano @ 2019-01-08 17:51 UTC (permalink / raw)
  To: Thomas Gummerer; +Cc: Git Mailing List
In-Reply-To: <CALgYhfML6UBgG0fs+_hpc9k307ZtZCM-OmhVNcWvCKxSJO+e2g@mail.gmail.com>

Thomas Gummerer <t.gummerer@gmail.com> writes:

> On Mon, Jan 7, 2019 at 11:34 PM Junio C Hamano <gitster@pobox.com> wrote:
>> * tg/checkout-no-overlay (2019-01-02) 8 commits
>>  - checkout: introduce checkout.overlayMode config
>>  - checkout: introduce --{,no-}overlay option
>>  - checkout: factor out mark_cache_entry_for_checkout function
>>  - checkout: clarify comment
>>  - read-cache: add invalidate parameter to remove_marked_cache_entries
>>  - entry: support CE_WT_REMOVE flag in checkout_entry
>>  - entry: factor out unlink_entry function
>>  - move worktree tests to t24*
>>
>>  "git checkout --no-overlay" can be used to trigger a new mode of
>>  checking out paths out of the tree-ish, that allows paths that
>>  match the pathspec that are in the current index and working tree
>>  and are not in the tree-ish.
>>
>>  Will merge to 'next'.
>
> Please hold off on merging this to 'next'.

Thanks, will do so.

^ permalink raw reply

* Re: [PATCH] blame: add the ability to ignore commits
From: Barret Rhoden @ 2019-01-08 18:04 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Stefan Beller, Jeff Smith, Junio C Hamano, Jeff King
In-Reply-To: <20190108114106.5cf57e67@gnomeregan.cam.corp.google.com>

On 2019-01-08 at 11:41 Barret Rhoden <brho@google.com> wrote:
> Would you be OK with
> also changing fsck to take a committish instead of a full SHA-1?

Actually, in retrospect, I can keep the unabbreviated SHA-1 for the
file inputs and use get_oid_committish() for the one-off --skip-rev=
cases.

Thanks,

Barret


^ permalink raw reply

* Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups
From: Jeff King @ 2019-01-08 18:05 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: René Scharfe, git, Ævar Arnfjörð Bjarmason
In-Reply-To: <xmqqy37v59qz.fsf@gitster-ct.c.googlers.com>

On Tue, Jan 08, 2019 at 09:39:48AM -0800, Junio C Hamano wrote:

> > I skimmed them; they look good to me.  6 and 8 are particularly
> > satisfying; getting rid of hash copy operations just feels nice. :)
> >
> > Junio only took 1 to 5 into pu; 6, 7 and its sidekick 8, 10 and 11
> > conflict with sb/more-repo-in-api; 9 could go in unmodified.
> 
> I think these later steps are based on something a lot newer than
> the result of applying your updates to the jk/loose-object-cache
> series they fix.  I think I untangled and backported one of the
> earlier commits but then I stopped after 05/11.

Sorry, I applied René's patches on top of master and then built on that,
treating it like a new topic. But of course your jk/loose-object-cache
is older.

> I do not think it is important to keep jk/loose-object-cache and
> these two follow-up topics mergeable to the maintenance track, so
> I'll see if the patches behave better if queued directly on top of
> 3b2f8a02 ("Merge branch 'jk/loose-object-cache'", 2019-01-04), or
> even a yet newer random point on 'master'.

Yeah, they should. I think one of them will need René's patch, which
changes the body of quick_has_loose(). I can roll it as a separate topic
if that's easier (or just wait a week or so until René's cleanups
graduate).

-Peff

^ permalink raw reply

* Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups
From: Junio C Hamano @ 2019-01-08 18:07 UTC (permalink / raw)
  To: Jeff King; +Cc: René Scharfe, git, Ævar Arnfjörð Bjarmason
In-Reply-To: <20190108180522.GA4610@sigill.intra.peff.net>

Jeff King <peff@peff.net> writes:

> Yeah, they should. I think one of them will need René's patch, which
> changes the body of quick_has_loose(). I can roll it as a separate topic
> if that's easier (or just wait a week or so until René's cleanups
> graduate).

Nah, what I got is already good to work with.  Both series are
straight-forward and I do not expect them needing long fermentation.


^ permalink raw reply

* Re: Feature request: --preserve-merges to add "exec git merge ..." instead of "pick ..."
From: Andreas Hennings @ 2019-01-08 18:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <CAH0Uv3FRq0JiXWx9Ow1EhKrYB4OTM-9Fpox7FvZ3tC6J6toEsw@mail.gmail.com>

I tried this option after upgrading my git.
Unfortunately, no matter which variation I use, it still attempts to
rebase most or all of the feature branches before merging them.
Possibly depending on their ancestry.


On Mon, 7 Jan 2019 at 22:12, Andreas Hennings <andreas@dqxtech.net> wrote:
>
> It sounds good!
> I was using git version 2.7.4 all the time. I should have checked
> before posting here :)
> Now trying 2.20.1
>
> From "git help rebase":
>
>            By default, or when no-rebase-cousins was specified,
> commits which do not have <upstream> as direct ancestor will keep
> their
>            original branch point, i.e. commits that would be excluded
> by gitlink:git-log[1]'s --ancestry-path option will keep their
>            original ancestry by default. If the rebase-cousins mode is
> turned on, such commits are instead rebased onto <upstream> (or
>            <onto>, if specified).
>
> I am not sure if this criterion (which ancestors it has) will always
> produce the behavior I am looking for.
> I will have to experiment a bit.
>
> Thanks for now, I will post again with new thoughts once I have done
> some experiments.
>
> On Mon, 7 Jan 2019 at 17:42, Junio C Hamano <gitster@pobox.com> wrote:
> >
> > Andreas Hennings <andreas@dqxtech.net> writes:
> >
> > > This means we need a rebase operation where:
> > > - The commits of the acceptance branch itself are being replaced.
> > > - The commits of the feature branches remain as they are.
> > >
> > > A "git rebase --preserve-merges" almost does this, but not really.
> >
> > This wished-for feature sounds to me more like the "first-parent"
> > mode that has been discussed a few times in the past but never
> > materialized.
> >
> > The preserve-merges mode is getting abandoned by the original author
> > as unsalvageable.  Have you tried the rebase-merges mode?  That may
> > let you choose replaying only the merge commits on the acceptance
> > branch without touching the tips of the feature branches getting
> > merged.

^ permalink raw reply

* Re: [PATCH] blame: add the ability to ignore commits
From: Junio C Hamano @ 2019-01-08 18:26 UTC (permalink / raw)
  To: Barret Rhoden; +Cc: git, Stefan Beller, Jeff Smith, Jeff King
In-Reply-To: <20190108112742.7878d4cb@gnomeregan.cam.corp.google.com>

Barret Rhoden <brho@google.com> writes:

>> A policy decision like the above two shouldn't be hardcoded in the
>> feature like this, but should be done as a separate option.  By
>> default, these shouldn't be marked with '*', as the same tools you
>> said you are afraid of breaking would be expecting a word with only
>> digits and no asterisk in the column where line numbers appear and
>> will get broken by this change if done unconditionally.
>
> Since users are already opting-in to the blame-ignore, do you also want
> them to opt-in to the annotation?

Absolutely.

After all, the users of a moral equivalent that is -S
never needed such an extra annotation, which tells us two things.
(1) the claim "It's useful to be alerted to the presence of an
ignored commit" in the proposed log message is merely a personal
preference and universal users' requirement; (2) if it is useful to
mark a blame-source whose parents (used while blaming) do not match
the actual parents, such an annotation would also be useful while
running -S.  So probably it should be a separate option that can be
given when any of the --skip-commit=<rev>, --skip-commits-file=<file>,
r -S<file> option is given.

>> Obviously, an interesting consideration is what happens when a merge
>> commit is skipped.  Is it sufficient to change this description to
>> "...will get passed to its parentS", or would the code do completely
>> nonsensical things without further tweaks (a possible simple tweak
>> could be to refuse skipping merges)?
>
> If we skip a merge commit, it might pick the wrong parent.

Actually after thinking about it a bit more, I no longer think a
merge is so special.  In this topology (as usual, time flows from
left to right), if you are skipping M,

        ---A---M---C---D
              /
         ----B

you'd simply pretend that the ancestry is like this and you'd be
fine, no?


        ---A-------C---D
                  /
         --------B

That is, when inspecting C, pass_blame() would enumerate its true
parents, notice that M to be skipped, which would cause it to
pretend as if C has M's parents instead of M itself as its parents.
If M in the true history is the first parent of C, then M's first
parent in the true history becomes C's first parent, M's second
parent in the true history becomes C's second parent, etc. (if C
were a merge in the true history, such a rewriting would make C an
octopus in the distorted history)

> The wrong commit is blamed.

So... I still suspect that it is merely a bug in your implementation
and there is nothing inherent that forces us to avoid skipping a
merge.

>> Somehow the damage to blame.c codebase looks way too noisy for what
>> the code wants to do.  If all we want is to pretend in a history,
>> e.g.
>> 
>>     ---O---A---B---C---D
>> 
>> that commit B does not exist, i.e. use a distorted view of the
>> history
>> 
>>     ---O---A-------C---D
>> 
>> wouldn't it be sufficient to modify pass_blame(), i.e. the only the
>> caller of the pass_blame_to_parent(), where we find the parent
>> commits of "C" and dig the history to pass blame to "B", and have it
>> pretend as if "B" does not exist and pass blame directly to "A"?
>
> I originally tried to skip 'B' in pass_blame() when B popped up as a
> scapegoat.  That broke the offsets of the blame_entries in the
> parent.

Why?  When inspecting C in order to exonerate it from as many lines
as possible, we'd run "git diff $P C" for each parent of C, but in
the distorted history (i.e. instead of using $P==B, we use $P==A).
As long as the code reads from "git diff A C", I do not see why "the
offsets in the parent" can be broken.  Care to elaborate a bit more?


^ permalink raw reply

* Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups
From: Derrick Stolee @ 2019-01-08 18:27 UTC (permalink / raw)
  To: Junio C Hamano, Jeff King
  Cc: René Scharfe, git, Ævar Arnfjörð Bjarmason
In-Reply-To: <xmqqmuob58gu.fsf@gitster-ct.c.googlers.com>

On 1/8/2019 1:07 PM, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
>> Yeah, they should. I think one of them will need René's patch, which
>> changes the body of quick_has_loose(). I can roll it as a separate topic
>> if that's easier (or just wait a week or so until René's cleanups
>> graduate).
> Nah, what I got is already good to work with.  Both series are
> straight-forward and I do not expect them needing long fermentation.

I'm just chiming in to say that this series was a very satisfying read, 
and the changes were clear-cut and mechanical.

Thanks!
-Stolee

^ permalink raw reply

* Re: [PATCH v2 0/9] diff --color-moved-ws fixes and enhancment
From: Junio C Hamano @ 2019-01-08 18:31 UTC (permalink / raw)
  To: Phillip Wood; +Cc: Git Mailing List, Stefan Beller, Phillip Wood
In-Reply-To: <402b9c01-cd7c-79f3-9fde-55907f03c406@talktalk.net>

Phillip Wood <phillip.wood@talktalk.net> writes:

> I just wanted to check that these patches are on your radar as they
> haven't made it into pu yet.

Sorry, but they were not on my radar.  I was waiting for comments to
come in on them before doing anything, and now it is more than a
month ago X-<.

^ permalink raw reply

* Re: Feature request: --preserve-merges to add "exec git merge ..." instead of "pick ..."
From: Junio C Hamano @ 2019-01-08 18:38 UTC (permalink / raw)
  To: Andreas Hennings; +Cc: git
In-Reply-To: <CAH0Uv3F4q0oPG2O58eTV5n+5eZcxHK9acGMX+4F4LTm1JATfhg@mail.gmail.com>

Andreas Hennings <andreas@dqxtech.net> writes:

> I tried this option after upgrading my git.
> Unfortunately, no matter which variation I use, it still attempts to
> rebase most or all of the feature branches before merging them.
> Possibly depending on their ancestry.

Yes, I know that.  But what I am hoping is that it won't actually
touch the commits on the side branches UNLESS you tell in the insn
sequence to modify them with "edit", "reword", etc. and instead
fast-forward them.

Of course, it will allow you to muck with these commits on the side
branches, which is a potential source of mistakes.

^ permalink raw reply

* Re: [PATCH 0/11] jk/loose-object-cache sha1/object_id fixups
From: Junio C Hamano @ 2019-01-08 18:52 UTC (permalink / raw)
  To: Jeff King; +Cc: René Scharfe, git, Ævar Arnfjörð Bjarmason
In-Reply-To: <xmqqmuob58gu.fsf@gitster-ct.c.googlers.com>

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

> Jeff King <peff@peff.net> writes:
>
>> Yeah, they should. I think one of them will need René's patch, which
>> changes the body of quick_has_loose(). I can roll it as a separate topic
>> if that's easier (or just wait a week or so until René's cleanups
>> graduate).
>
> Nah, what I got is already good to work with.  Both series are
> straight-forward and I do not expect them needing long fermentation.

Yikes, the conflicts with sb/more-repo-in-api is quite irritating.
I think I'll postpone the later parts of this series and ask this to
be sent after sb/more-repo-in-api matures a bit mroe.


^ permalink raw reply

* Re: [PATCH 1/1] git-gc.txt: fix typo about gc.writeCommitGraph
From: Junio C Hamano @ 2019-01-08 18:54 UTC (permalink / raw)
  To: Derrick Stolee via GitGitGadget; +Cc: git, Derrick Stolee
In-Reply-To: <e628fefa41feec008fc4e19a5be5622108391bb3.1546966339.git.gitgitgadget@gmail.com>

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

> From: Derrick Stolee <dstolee@microsoft.com>
>
> Reported-by: Stefan Haller <stefan@haller-berlin.de>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---

Thanks.

>  Documentation/git-gc.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
> index c20ee6c789..a7442499f6 100644
> --- a/Documentation/git-gc.txt
> +++ b/Documentation/git-gc.txt
> @@ -137,7 +137,7 @@ The optional configuration variable `gc.packRefs` determines if
>  it within all non-bare repos or it can be set to a boolean value.
>  This defaults to true.
>  
> -The optional configuration variable `gc.commitGraph` determines if
> +The optional configuration variable `gc.writeCommitGraph` determines if
>  'git gc' should run 'git commit-graph write'. This can be set to a
>  boolean value. This defaults to false.

^ permalink raw reply

* Re: [PATCH v2 1/2] list-objects-filter: teach tree:# how to handle >0
From: Matthew DeVore @ 2019-01-08 19:22 UTC (permalink / raw)
  To: Jonathan Tan, matvore
  Cc: git, sbeller, git, jeffhost, peff, stefanbeller, pclouds
In-Reply-To: <20190108015631.22727-1-jonathantanmy@google.com>


On 2019/01/07 17:56, Jonathan Tan wrote:
>>   	case LOFS_END_TREE:
>>   		assert(obj->type == OBJ_TREE);
>> +		filter_data->current_depth--;
>>   		return LOFR_ZERO;
>>   
>> +	case LOFS_BLOB:
>> +		filter_trees_update_omits(obj, filter_data, include_it);
>> +		return include_it ? LOFR_MARK_SEEN | LOFR_DO_SHOW : LOFR_ZERO;
> Any reason for moving "case LOFS_BLOB" (and "case LOFS_BEGIN_TREE"
> below) after LOFS_END_TREE?

I put LOFS_BLOB and after LOFS_END_TREE since that is the order in all 
the other filter logic functions. I put LOFS_BEGIN_TREE at the end 
(which is different from the other filter logic functions) because it's 
usually better to put simpler things before longer or more complex 
things. LOFS_BEGIN_TREE is much more complex and if it were not the last 
switch section, it would tend to hide the sections that come after it.

FWIW, I consider this the coding corollary of the end-weight problem in 
linguistics - see https://www.thoughtco.com/end-weight-grammar-1690594 - 
this is not my original idea, but something from the book Perl Best 
Practices, although that book only mentioned it in the context of 
ordering clauses in single statements rather than ordering entire blocks.

>
> This is drastically different from the previous case, but this makes
> sense - previously, all blobs accessed through traversal were not shown,
> but now they are sometimes shown.
Yes.
> Here, filter_trees_update_omits() is
> only ever used to remove a blob from the omits set, since once this blob
> is encountered with include_it == true, it is marked as LOFR_MARK_SEEN
> and will not be traversed again.
It is possible that include_it can be false and then in a later 
invocation it can be true. In that case, the blob will be added to the 
set and then removed from it.
>
>> +	case LOFS_BEGIN_TREE:
>> +		seen_info = oidmap_get(
>> +			&filter_data->seen_at_depth, &obj->oid);
>> +		if (!seen_info) {
>> +			seen_info = xcalloc(1, sizeof(struct seen_map_entry));
> Use sizeof(*seen_info).
Done.
>
>> +			seen_info->base.oid = obj->oid;
> We have been using oidcpy, but come to think of it, I'm not sure why...
Because the hash algorithm in use may not use the entire structure, 
apparently. Or there are future improvements planned to the function and 
they need to be picked up by all current hash-copying operations. Fixed.
>
>> +			seen_info->depth = filter_data->current_depth;
>> +			oidmap_put(&filter_data->seen_at_depth, seen_info);
>> +			already_seen = 0;
>> +		} else
>> +			already_seen =
>> +				filter_data->current_depth >= seen_info->depth;
> There has been recently some clarification that if one branch of an
> if/else construct requires braces, braces should be put on all of them:
> 1797dc5176 ("CodingGuidelines: clarify multi-line brace style",
> 2017-01-17). Likewise below.
Done, thank you - that's good to know.
>
>> +		if (already_seen)
>> +			filter_res = LOFR_SKIP_TREE;
>> +		else {
>> +			seen_info->depth = filter_data->current_depth;
>> +			filter_trees_update_omits(obj, filter_data, include_it);
>> +
>> +			if (include_it)
>> +				filter_res = LOFR_DO_SHOW;
>> +			else if (filter_data->omits)
>> +				filter_res = LOFR_ZERO;
>> +			else
>> +				filter_res = LOFR_SKIP_TREE;
> Looks straightforward. If we have already seen it at a shallower or
> equal depth, we can skip it (since we have already done the appropriate
> processing). Otherwise, we need to ensure that its "omit" is correctly
> set, and:
>   - show it if include_it
>   - don't do anything special if not include_it and we need the omit set
>   - skip the tree if not include_it and we don't need the omit set
Right.
>
>> +static void filter_trees_free(void *filter_data) {
>> +	struct filter_trees_depth_data* d = filter_data;
>> +	oidmap_free(&d->seen_at_depth, 1);
>> +	free(d);
>> +}
> Check for NULL-ness of filter_data too, to match the usual behavior of
> free functions.
>
Done.
>> diff --git a/t/t6112-rev-list-filters-objects.sh b/t/t6112-rev-list-filters-objects.sh
>> index eb32505a6e..54e7096d40 100755
>> --- a/t/t6112-rev-list-filters-objects.sh
>> +++ b/t/t6112-rev-list-filters-objects.sh
> [snip]
>
> Thanks for the tests that cover quite a wide range of cases. Can you
> also demonstrate the case where a blob would normally be omitted
> (because it is too deep) but it is directly specified, so it is
> included.

I didn't exactly use TDD, but I did try to cover every line of code as 
well as both branches of each ternary operator.

Added such a test.

>
>> +expect_has_with_different_name () {
>> +	repo=$1 &&
>> +	name=$2 &&
>> +
>> +	hash=$(git -C $repo rev-parse HEAD:$name) &&
>> +	! grep "^$hash $name$" actual &&
>> +	grep "^$hash " actual &&
>> +	! grep "~$hash" actual
>> +}
> Should we also check that a "~" entry appears with $name?

I don't believe there is a way to get the object names to appear next to 
~ entries (note that the names are not saved in the omits oidset).

For your reference, here is an interdiff for this particular patch after 
applying your comments:

--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -158,18 +158,19 @@ static enum list_objects_filter_result 
filter_trees_depth(
          seen_info = oidmap_get(
              &filter_data->seen_at_depth, &obj->oid);
          if (!seen_info) {
-            seen_info = xcalloc(1, sizeof(struct seen_map_entry));
-            seen_info->base.oid = obj->oid;
+            seen_info = xcalloc(1, sizeof(*seen_info));
+            oidcpy(&seen_info->base.oid, &obj->oid);
              seen_info->depth = filter_data->current_depth;
              oidmap_put(&filter_data->seen_at_depth, seen_info);
              already_seen = 0;
-        } else
+        } else {
              already_seen =
                  filter_data->current_depth >= seen_info->depth;
+        }

-        if (already_seen)
+        if (already_seen) {
              filter_res = LOFR_SKIP_TREE;
-        else {
+        } else {
              int been_omitted = filter_trees_update_omits(
                  obj, filter_data, include_it);
              seen_info->depth = filter_data->current_depth;
@@ -193,6 +194,8 @@ static enum list_objects_filter_result 
filter_trees_depth(

  static void filter_trees_free(void *filter_data) {
      struct filter_trees_depth_data* d = filter_data;
+    if (!d)
+        return;
      oidmap_free(&d->seen_at_depth, 1);
      free(d);
  }
diff --git a/t/'t6112-rev-list-filters-objects.sh 
b/t/'t6112-rev-list-filters-objects.sh
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/t/t6112-rev-list-filters-objects.sh 
b/t/t6112-rev-list-filters-objects.sh
index 18b0b14d5a..d6edad6a01 100755
--- a/t/t6112-rev-list-filters-objects.sh
+++ b/t/t6112-rev-list-filters-objects.sh
@@ -407,6 +407,13 @@ test_expect_success 'tree:<depth> where we iterate 
over tree at two levels' '
      expect_has_with_different_name r5 a/subdir/b/foo
  '

+test_expect_success 'tree:<depth> which filters out blob but given as 
arg' '
+    export blob_hash=$(git -C r4 rev-parse HEAD:subdir/bar) &&
+
+    git -C r4 rev-list --objects --filter=tree:1 HEAD $blob_hash >actual &&
+    grep ^$blob_hash actual
+'
+
  # Delete some loose objects and use rev-list, but WITHOUT any filtering.
  # This models previously omitted objects that we did not receive.





^ permalink raw reply related

* RE: error: Use of uninitialized value $hash in chomp
From: Andrew Shearer @ 2019-01-08 19:44 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git@vger.kernel.org, Eric Wong
In-Reply-To: <ME1PR01MB11218D4953017CFE06A2B16AE1B80@ME1PR01MB1121.ausprd01.prod.outlook.com>


Hi 
Thanks for reply, but sorry I don't know how to do that - I don't have the git source code or know how to debug it.
Is there another way I can capture logging/debugging information while running "git svn clone" and send it to you?
Thanks

Andrew Shearer / Web Developer
DDI 021 469 888 / andrew@terabyte.co.nz

/TERABYTE

-----Original Message-----
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com> 
Sent: Thursday, 20 December 2018 8:00 AM
To: Andrew Shearer <andrew@terabyte.co.nz>
Cc: git@vger.kernel.org; Eric Wong <e@80x24.org>
Subject: Re: error: Use of uninitialized value $hash in chomp


On Wed, Dec 19 2018, Andrew Shearer wrote:

> Hello
>
> I am using a "git svn clone" command to extract our project history from svn into git.
> About 30m into the process it fails with:
>
> r50739 = 2a1491de1353b1e3cce50d8f9d383407218a44f1 
> (refs/remotes/git-svn)
> fatal: Cannot open '.git/Git_svn_delta_33316_0_UkxiJV': Permission 
> denied Use of uninitialized value $hash in chomp at C:/Program Files/Git/mingw64/share/perl5/Git.pm line 929, <GEN11> line 36311.
> hash-object -w --stdin-paths --no-filters: command returned error: 128
>
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
>         (in cleanup)  at /usr/share/perl5/vendor_perl/Error.pm line 198 during global destruction.
>
> I tried updating to the latest build, 2.20.1.windows, but it still fails.
>
> There is nothing particularly special about svn changeset 50739 that I can see compared to any other.
> Anyone know why this might be failing or how I could resolve it?

That "Permission denied" looks scary. Don't know how git-svn gets into this, but try with this patch on top:

    diff --git a/perl/Git.pm b/perl/Git.pm
    index d856930b2e..f5d15895d3 100644
    --- a/perl/Git.pm
    +++ b/perl/Git.pm
    @@ -926,7 +926,13 @@ sub hash_and_insert_object {
                    throw Error::Simple("out pipe went bad");
            }

    -       chomp(my $hash = <$in>);
    +       my $hash = <$in>;
    +       unless (defined $hash) {
    +           sub noes { die "blah" }
    +           noes();
    +       } else {
    +           chomp($hash);
    +       }
            unless (defined($hash)) {
                    $self->_close_hash_and_insert_object();
                    throw Error::Simple("in pipe went bad");

Then run:

    perl -d $(git --exec-path)/git-svn

Set a breakpoint at that "noes" with:

  DB<1> b Git::noes

Continue:

  DB<2> c

Then when it stops there get a backtrace with "T":

      DB<2> T
    @ = DB::DB called from file 'perl/Git.pm' line 931
    . = Git::noes() called from file 'perl/Git.pm' line 932
    . = Git::hash_and_insert_object(ref(Git), 'Makefile') called from -e line 1

And see if you can get any other relevant info out of the debugger. See "perldoc perldebug".

^ 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