<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit.c, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-10-20T18:57:40Z</updated>
<entry>
<title>Documentation: stylistically normalize references to Signed-off-by:</title>
<updated>2020-10-20T18:57:40Z</updated>
<author>
<name>Bradley M. Kuhn</name>
<email>bkuhn@sfconservancy.org</email>
</author>
<published>2020-10-20T01:03:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3abd4a67d912e0c0980aa34def6ea55ebde84947'/>
<id>urn:sha1:3abd4a67d912e0c0980aa34def6ea55ebde84947</id>
<content type='text'>
Ted reported an old typo in the git-commit.txt and merge-options.txt.
Namely, the phrase "Signed-off-by line" was used without either a
definite nor indefinite article.

Upon examination, it seems that the documentation (including items in
Documentation/, but also option help strings) have been quite
inconsistent on usage when referring to `Signed-off-by`.

First, very few places used a definite or indefinite article with the
phrase "Signed-off-by line", but that was the initial typo that led
to this investigation.  So, normalize using either an indefinite or
definite article consistently.

The original phrasing, in Commit 3f971fc425b (Documentation updates,
2005-08-14), is "Add Signed-off-by line".  Commit 6f855371a53 (Add
--signoff, --check, and long option-names. 2005-12-09) switched to
using "Add `Signed-off-by:` line", but didn't normalize the former
commit to match.  Later commits seem to have cut and pasted from one
or the other, which is likely how the usage became so inconsistent.

Junio stated on the git mailing list in
&lt;xmqqy2k1dfoh.fsf@gitster.c.googlers.com&gt; a preference to leave off
the colon.  Thus, prefer `Signed-off-by` (with backticks) for the
documentation files and Signed-off-by (without backticks) for option
help strings.

Additionally, Junio argued that "trailer" is now the standard term to
refer to `Signed-off-by`, saying that "becomes plenty clear that we
are not talking about any random line in the log message".  As such,
prefer "trailer" over "line" anywhere the former word fits.

However, leave alone those few places in documentation that use
Signed-off-by to refer to the process (rather than the specific
trailer), or in places where mail headers are generally discussed in
comparison with Signed-off-by.

Reported-by: "Theodore Y. Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Bradley M. Kuhn &lt;bkuhn@sfconservancy.org&gt;
Acked-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/interpret-branch-name-fallback'</title>
<updated>2020-09-09T20:53:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-09T20:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0df670bc0b8b5499859829ba0889ce96a75304a6'/>
<id>urn:sha1:0df670bc0b8b5499859829ba0889ce96a75304a6</id>
<content type='text'>
"git status" has trouble showing where it came from by interpreting
reflog entries that recordcertain events, e.g. "checkout @{u}", and
gives a hard/fatal error.  Even though it inherently is impossible
to give a correct answer because the reflog entries lose some
information (e.g. "@{u}" does not record what branch the user was
on hence which branch 'the upstream' needs to be computed, and even
if the record were available, the relationship between branches may
have changed), at least hide the error to allow "status" show its
output.

* jt/interpret-branch-name-fallback:
  wt-status: tolerate dangling marks
  refs: move dwim_ref() to header file
  sha1-name: replace unsigned int with option struct
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-more-options'</title>
<updated>2020-09-03T19:37:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-03T19:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c31b19dd00981fcea435de1cd05eab179039a8d'/>
<id>urn:sha1:9c31b19dd00981fcea435de1cd05eab179039a8d</id>
<content type='text'>
"git rebase -i" learns a bit more options.

* pw/rebase-i-more-options:
  t3436: do not run git-merge-recursive in dashed form
  rebase: add --reset-author-date
  rebase -i: support --ignore-date
  rebase -i: support --committer-date-is-author-date
  am: stop exporting GIT_COMMITTER_DATE
  rebase -i: add --ignore-whitespace flag
</content>
</entry>
<entry>
<title>wt-status: tolerate dangling marks</title>
<updated>2020-09-02T21:39:25Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-09-01T22:28:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f24c30e0b6b13078d8fc7cd71b9989d28fd76610'/>
<id>urn:sha1:f24c30e0b6b13078d8fc7cd71b9989d28fd76610</id>
<content type='text'>
When a user checks out the upstream branch of HEAD, the upstream branch
not being a local branch, and then runs "git status", like this:

  git clone $URL client
  cd client
  git checkout @{u}
  git status

no status is printed, but instead an error message:

  fatal: HEAD does not point to a branch

(This error message when running "git branch" persists even after
checking out other things - it only stops after checking out a branch.)

This is because "git status" reads the reflog when determining the "HEAD
detached" message, and thus attempts to DWIM "@{u}", but that doesn't
work because HEAD no longer points to a branch.

Therefore, when calculating the status of a worktree, tolerate dangling
marks. This is done by adding an additional parameter to
dwim_ref() and repo_dwim_ref().

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am: stop exporting GIT_COMMITTER_DATE</title>
<updated>2020-08-17T18:58:37Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2020-08-17T17:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e8cbe2118a8e3c1aa71ed8d93f96001decebde1d'/>
<id>urn:sha1:e8cbe2118a8e3c1aa71ed8d93f96001decebde1d</id>
<content type='text'>
The implementation of --committer-date-is-author-date exports
GIT_COMMITTER_DATE to override the default committer date but does not
reset GIT_COMMITTER_DATE in the environment after creating the commit
so it is set in the environment of any hooks that get run. We're about
to add the same functionality to the sequencer and do not want to have
GIT_COMMITTER_DATE set when running hooks or exec commands so lets
update commit_tree_extended() to take an explicit committer so we
override the default date without setting GIT_COMMITTER_DATE in the
environment.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strvec: rename struct fields</title>
<updated>2020-07-31T02:18:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-29T00:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d70a9eb611a9d242c1d26847d223b8677609305b'/>
<id>urn:sha1:d70a9eb611a9d242c1d26847d223b8677609305b</id>
<content type='text'>
The "argc" and "argv" names made sense when the struct was argv_array,
but now they're just confusing. Let's rename them to "nr" (which we use
for counts elsewhere) and "v" (which is rather terse, but reads well
when combined with typical variable names like "args.v").

Note that we have to update all of the callers immediately. Playing
tricks with the preprocessor is hard here, because we wouldn't want to
rewrite unrelated tokens.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strvec: convert more callers away from argv_array name</title>
<updated>2020-07-28T22:02:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef8d7ac42a6a62d678166fe25ea743315809d2bb'/>
<id>urn:sha1:ef8d7ac42a6a62d678166fe25ea743315809d2bb</id>
<content type='text'>
We eventually want to drop the argv_array name and just use strvec
consistently. There's no particular reason we have to do it all at once,
or care about interactions between converted and unconverted bits.
Because of our preprocessor compat layer, the names are interchangeable
to the compiler (so even a definition and declaration using different
names is OK).

This patch converts remaining files from the first half of the alphabet,
to keep the diff to a manageable size.

The conversion was done purely mechanically with:

  git ls-files '*.c' '*.h' |
  xargs perl -i -pe '
    s/ARGV_ARRAY/STRVEC/g;
    s/argv_array/strvec/g;
  '

and then selectively staging files with "git add '[abcdefghjkl]*'".
We'll deal with any indentation/style fallouts separately.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/fix-persistent-shallow' into master</title>
<updated>2020-07-09T21:00:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-07-09T21:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24ecfdf206ee0e9e01f86d333d90d281fdfd12d0'/>
<id>urn:sha1:24ecfdf206ee0e9e01f86d333d90d281fdfd12d0</id>
<content type='text'>
When "fetch.writeCommitGraph" configuration is set in a shallow
repository and a fetch moves the shallow boundary, we wrote out
broken commit-graph files that do not match the reality, which has
been corrected.

* tb/fix-persistent-shallow:
  commit.c: don't persist substituted parents when unshallowing
</content>
</entry>
<entry>
<title>commit.c: don't persist substituted parents when unshallowing</title>
<updated>2020-07-08T23:13:46Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2020-07-08T21:10:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce16364e897e70a17bd1864b6007719eeec959f3'/>
<id>urn:sha1:ce16364e897e70a17bd1864b6007719eeec959f3</id>
<content type='text'>
Since 37b9dcabfc (shallow.c: use '{commit,rollback}_shallow_file',
2020-04-22), Git knows how to reset stat-validity checks for the
$GIT_DIR/shallow file, allowing it to change between a shallow and
non-shallow state in the same process (e.g., in the case of 'git fetch
--unshallow').

However, when $GIT_DIR/shallow changes, Git does not alter or remove any
grafts (nor substituted parents) in memory.

This comes up in a "git fetch --unshallow" with fetch.writeCommitGraph
set to true. Ordinarily in a shallow repository (and before 37b9dcabfc,
even in this case), commit_graph_compatible() would return false,
indicating that the repository should not be used to write a
commit-graphs (since commit-graph files cannot represent a shallow
history). But since 37b9dcabfc, in an --unshallow operation that check
succeeds.

Thus even though the repository isn't shallow any longer (that is, we
have all of the objects), the in-core representation of those objects
still has munged parents at the shallow boundaries.  When the
commit-graph write proceeds, we use the incorrect parentage, producing
wrong results.

There are two ways for a user to work around this: either (1) set
'fetch.writeCommitGraph' to 'false', or (2) drop the commit-graph after
unshallowing.

One way to fix this would be to reset the parsed object pool entirely
(flushing the cache and thus preventing subsequent reads from modifying
their parents) after unshallowing. That would produce a problem when
callers have a now-stale reference to the old pool, and so this patch
implements a different approach. Instead, attach a new bit to the pool,
'substituted_parent', which indicates if the repository *ever* stored a
commit which had its parents modified (i.e., the shallow boundary
prior to unshallowing).

This bit needs to be sticky because all reads subsequent to modifying a
commit's parents are unreliable when unshallowing. Modify the check in
'commit_graph_compatible' to take this bit into account, and correctly
avoid generating commit-graphs in this case, thus solving the bug.

Helped-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Helped-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Reported-by: Jay Conrod &lt;jayconrod@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: minimize commit_graph_data_slab access</title>
<updated>2020-06-17T21:37:52Z</updated>
<author>
<name>Abhishek Kumar</name>
<email>abhishekkumar8222@gmail.com</email>
</author>
<published>2020-06-17T09:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c752ad09c4ea479e8d54d08637cc0e5709723208'/>
<id>urn:sha1:c752ad09c4ea479e8d54d08637cc0e5709723208</id>
<content type='text'>
In an earlier patch, multiple struct acccesses to `graph_pos` and
`generation` were auto-converted to multiple method calls.

Since the values are fixed and commit-slab access costly, we would be
better off with storing the values as a local variable and reusing it.

Signed-off-by: Abhishek Kumar &lt;abhishekkumar8222@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
