<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/advice.c, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-04-04T17:56:24Z</updated>
<entry>
<title>Merge branch 'tk/ambiguous-fetch-refspec'</title>
<updated>2022-04-04T17:56:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-04-04T17:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba2452b247dfd455bccbcb04acdcfd142cb5397e'/>
<id>urn:sha1:ba2452b247dfd455bccbcb04acdcfd142cb5397e</id>
<content type='text'>
Give hint when branch tracking cannot be established because fetch
refspecs from multiple remote repositories overlap.

* tk/ambiguous-fetch-refspec:
  tracking branches: add advice to ambiguous refspec error
</content>
</entry>
<entry>
<title>tracking branches: add advice to ambiguous refspec error</title>
<updated>2022-04-01T17:09:18Z</updated>
<author>
<name>Tao Klerks</name>
<email>tao@klerks.biz</email>
</author>
<published>2022-04-01T06:05:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4921d877ab3487fbc0bde8b3e59b757d274783c'/>
<id>urn:sha1:e4921d877ab3487fbc0bde8b3e59b757d274783c</id>
<content type='text'>
The error "not tracking: ambiguous information for ref" is raised
when we are evaluating what tracking information to set on a branch,
and find that the ref to be added as tracking branch is mapped
under multiple remotes' fetch refspecs.

This can easily happen when a user copy-pastes a remote definition
in their git config, and forgets to change the tracking path.

Add advice in this situation, explicitly highlighting which remotes
are involved and suggesting how to correct the situation. Also
update a test to explicitly expect that advice.

Signed-off-by: Tao Klerks &lt;tao@klerks.biz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reset: replace '--quiet' with '--no-refresh' in performance advice</title>
<updated>2022-03-15T01:51:56Z</updated>
<author>
<name>Victoria Dye</name>
<email>vdye@github.com</email>
</author>
<published>2022-03-15T01:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9396251b371b9475b60461ddb27bd22282c86d79'/>
<id>urn:sha1:9396251b371b9475b60461ddb27bd22282c86d79</id>
<content type='text'>
Replace references to '--quiet' with '--no-refresh' in the advice on how to
skip refreshing the index. When the advice was introduced, '--quiet' was the
only way to avoid the expensive 'refresh_index(...)' at the end of a mixed
reset. After introducing '--no-refresh', however, '--quiet' became only a
fallback option for determining refresh behavior, overridden by
'--[no-]refresh' or 'reset.refresh' if either is set. To ensure users are
advised to use the most reliable option for avoiding 'refresh_index(...)',
replace recommendation of '--quiet' with '--[no-]refresh'.

Signed-off-by: Victoria Dye &lt;vdye@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>switch: mention the --detach option when dying due to lack of a branch</title>
<updated>2022-02-26T06:21:48Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2022-02-26T06:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=808213ba36ea72408cc45117a825ad9a714535ba'/>
<id>urn:sha1:808213ba36ea72408cc45117a825ad9a714535ba</id>
<content type='text'>
Users who are accustomed to doing `git checkout &lt;tag&gt;` assume that
`git switch &lt;tag&gt;` will do the same thing. Inform them of the --detach
option so they aren't left wondering why `git switch` doesn't work but
`git checkout` does.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>branch: add --recurse-submodules option for branch creation</title>
<updated>2022-02-04T16:16:39Z</updated>
<author>
<name>Glen Choo</name>
<email>chooglen@google.com</email>
</author>
<published>2022-01-29T00:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=961b130d20c9aea322b94a639a63ec8cca9f14fc'/>
<id>urn:sha1:961b130d20c9aea322b94a639a63ec8cca9f14fc</id>
<content type='text'>
To improve the submodules UX, we would like to teach Git to handle
branches in submodules. Start this process by teaching "git branch" the
--recurse-submodules option so that "git branch --recurse-submodules
topic" will create the `topic` branch in the superproject and its
submodules.

Although this commit does not introduce breaking changes, it does not
work well with existing --recurse-submodules commands because "git
branch --recurse-submodules" writes to the submodule ref store, but most
commands only consider the superproject gitlink and ignore the submodule
ref store. For example, "git checkout --recurse-submodules" will check
out the commits in the superproject gitlinks (and put the submodules in
detached HEAD) instead of checking out the submodule branches.

Because of this, this commit introduces a new configuration value,
`submodule.propagateBranches`. The plan is for Git commands to
prioritize submodule ref store information over superproject gitlinks if
this value is true. Because "git branch --recurse-submodules" writes to
submodule ref stores, for the sake of clarity, it will not function
unless this configuration value is set.

This commit also includes changes that support working with submodules
from a superproject commit because "branch --recurse-submodules" (and
future commands) need to read .gitmodules and gitlinks from the
superproject commit, but submodules are typically read from the
filesystem's .gitmodules and the index's gitlinks. These changes are:

* add a submodules_of_tree() helper that gives the relevant
  information of an in-tree submodule (e.g. path and oid) and
  initializes the repository
* add is_tree_submodule_active() by adding a treeish_name parameter to
  is_submodule_active()
* add the "submoduleNotUpdated" advice to advise users to update the
  submodules in their trees

Incidentally, fix an incorrect usage string that combined the 'list'
usage of git branch (-l) with the 'create' usage; this string has been
incorrect since its inception, a8dfd5eac4 (Make builtin-branch.c use
parse_options., 2007-10-07).

Helped-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Glen Choo &lt;chooglen@google.com&gt;
Reviewed-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/add-rm-with-sparse-index'</title>
<updated>2021-10-13T22:15:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-13T22:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d498a7c894444fba5cfb0007e6b757afcde63c6'/>
<id>urn:sha1:2d498a7c894444fba5cfb0007e6b757afcde63c6</id>
<content type='text'>
"git add", "git mv", and "git rm" have been adjusted to avoid
updating paths outside of the sparse-checkout definition unless
the user specifies a "--sparse" option.

* ds/add-rm-with-sparse-index:
  advice: update message to suggest '--sparse'
  mv: refuse to move sparse paths
  rm: skip sparse paths with missing SKIP_WORKTREE
  rm: add --sparse option
  add: update --renormalize to skip sparse paths
  add: update --chmod to skip sparse paths
  add: implement the --sparse option
  add: skip tracked paths outside sparse-checkout cone
  add: fail when adding an untracked sparse file
  dir: fix pattern matching on dirs
  dir: select directories correctly
  t1092: behavior for adding sparse files
  t3705: test that 'sparse_entry' is unstaged
</content>
</entry>
<entry>
<title>advice: update message to suggest '--sparse'</title>
<updated>2021-09-28T17:31:02Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-09-24T15:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6579e788c0a4b9468c5e2954a0868f9db0496e43'/>
<id>urn:sha1:6579e788c0a4b9468c5e2954a0868f9db0496e43</id>
<content type='text'>
The previous changes modified the behavior of 'git add', 'git rm', and
'git mv' to not adjust paths outside the sparse-checkout cone, even if
they exist in the working tree and their cache entries lack the
SKIP_WORKTREE bit. The intention is to warn users that they are doing
something potentially dangerous. The '--sparse' option was added to each
command to allow careful users the same ability they had before.

To improve the discoverability of this new functionality, add a message
to advice.updateSparsePath that mentions the existence of the option.

The previous set of changes also modified the purpose of this message to
include possibly a list of paths instead of only a list of pathspecs.
Make the warning message more clear about this new behavior.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/retire-advice-config'</title>
<updated>2021-09-10T18:46:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-10T18:46:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd0d7036e0da248f354e91fb8be8771fb20adfac'/>
<id>urn:sha1:fd0d7036e0da248f354e91fb8be8771fb20adfac</id>
<content type='text'>
Code clean up to migrate callers from older advice_config[] based
API to newer advice_if_enabled() and advice_enabled() API.

* ab/retire-advice-config:
  advice: move advice.graftFileDeprecated squashing to commit.[ch]
  advice: remove use of global advice_add_embedded_repo
  advice: remove read uses of most global `advice_` variables
  advice: add enum variants for missing advice variables
</content>
</entry>
<entry>
<title>Merge branch 'js/advise-when-skipping-cherry-picked'</title>
<updated>2021-09-10T18:46:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-10T18:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6c083b7619f171d32df633ca0281653afabd788f'/>
<id>urn:sha1:6c083b7619f171d32df633ca0281653afabd788f</id>
<content type='text'>
"git rebase" by default skips changes that are equivalent to
commits that are already in the history the branch is rebased onto;
give messages when this happens to let the users be aware of
skipped commits, and also teach them how to tell "rebase" to keep
duplicated changes.

* js/advise-when-skipping-cherry-picked:
  sequencer: advise if skipping cherry-picked commit
</content>
</entry>
<entry>
<title>sequencer: advise if skipping cherry-picked commit</title>
<updated>2021-08-30T23:35:36Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2021-08-30T21:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=767a4ca648f8791c1fb623bd9f79fd8d7f026499'/>
<id>urn:sha1:767a4ca648f8791c1fb623bd9f79fd8d7f026499</id>
<content type='text'>
Silently skipping commits when rebasing with --no-reapply-cherry-picks
(currently the default behavior) can cause user confusion. Issue
warnings when this happens, as well as advice on how to preserve the
skipped commits.

These warnings and advice are displayed only when using the (default)
"merge" rebase backend.

Update the git-rebase docs to mention the warnings and advice.

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
