<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/advice.c, branch v2.33.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.33.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.33.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-07-21T04:43:12Z</updated>
<entry>
<title>pull: abort if --ff-only is given and fast-forwarding is impossible</title>
<updated>2021-07-21T04:43:12Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2021-07-21T01:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d5fc24daefbdf56bc36a491aed0b7990fa0c62f'/>
<id>urn:sha1:3d5fc24daefbdf56bc36a491aed0b7990fa0c62f</id>
<content type='text'>
The warning about pulling without specifying how to reconcile divergent
branches says that after setting pull.rebase to true, --ff-only can
still be passed on the command line to require a fast-forward. Make that
actually work.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
[en: updated tests; note 3 fixes and 1 new failure]
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: warn when asked to update SKIP_WORKTREE entries</title>
<updated>2021-04-08T21:18:03Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2021-04-08T20:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a20f70478ffcc66d30936920ebcc35ebfc12a7c7'/>
<id>urn:sha1:a20f70478ffcc66d30936920ebcc35ebfc12a7c7</id>
<content type='text'>
`git add` already refrains from updating SKIP_WORKTREE entries, but it
silently exits with zero code when it is asked to do so. Instead, let's
warn the user and display a hint on how to update these entries.

Note that we only warn the user whey they give a pathspec item that
matches no eligible path for updating, but it does match one or more
SKIP_WORKTREE entries. A warning was chosen over erroring out right away
to reproduce the same behavior `add` already exhibits with ignored
files. This also allow users to continue their workflow without having
to invoke `add` again with only the eligible paths (as those will have
already been added).

Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: parse and set flag for "--force-if-includes"</title>
<updated>2020-10-03T16:59:19Z</updated>
<author>
<name>Srinidhi Kaushik</name>
<email>shrinidhi.kaushik@gmail.com</email>
</author>
<published>2020-10-03T12:10:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b990aa645d1169b7373d12cbf1511ca4633e349'/>
<id>urn:sha1:3b990aa645d1169b7373d12cbf1511ca4633e349</id>
<content type='text'>
The previous commit added the necessary machinery to implement the
"--force-if-includes" protection, when "--force-with-lease" is used
without giving exact object the remote still ought to have. Surface
the feature by adding a command line option and a configuration
variable to enable it.

 - Add a flag: "TRANSPORT_PUSH_FORCE_IF_INCLUDES" to indicate that the
   new option was passed from the command line of via configuration
   settings; update command line and configuration parsers to set the
   new flag accordingly.

 - Introduce a new configuration option "push.useForceIfIncludes", which
   is equivalent to setting "--force-if-includes" in the command line.

 - Update "remote-curl" to recognize and pass this option to "send-pack"
   when enabled.

 - Update "advise" to catch the reject reason "REJECT_REF_NEEDS_UPDATE",
   set when the ref status is "REF_STATUS_REJECT_REMOTE_UPDATED" and
   (optionally) print a help message when the push fails.

 - The new option is a "no-op" in the following scenarios:
    * When used without "--force-with-lease".
    * When used with "--force-with-lease", and if the expected commit
      on the remote side is specified as an argument.

Signed-off-by: Srinidhi Kaushik &lt;shrinidhi.kaushik@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'hw/advise-ng'</title>
<updated>2020-03-25T20:57:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-03-25T20:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4a09cc9ccb63090b78a4d9529462151df62d73d'/>
<id>urn:sha1:c4a09cc9ccb63090b78a4d9529462151df62d73d</id>
<content type='text'>
Revamping of the advise API to allow more systematic enumeration of
advice knobs in the future.

* hw/advise-ng:
  tag: use new advice API to check visibility
  advice: revamp advise API
  advice: change "setupStreamFailure" to "setUpstreamFailure"
  advice: extract vadvise() from advise()
</content>
</entry>
<entry>
<title>tag: use new advice API to check visibility</title>
<updated>2020-03-05T14:15:04Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2020-03-02T20:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f665d63a912748bc1397940a0dc1de80c6f693e3'/>
<id>urn:sha1:f665d63a912748bc1397940a0dc1de80c6f693e3</id>
<content type='text'>
change the advise call in tag library from advise() to
advise_if_enabled() to construct an example of the usage of
the new API.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>advice: revamp advise API</title>
<updated>2020-03-05T14:15:02Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2020-03-02T20:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3b18d1621315fb187689ee6c759bdbbea214eb8'/>
<id>urn:sha1:b3b18d1621315fb187689ee6c759bdbbea214eb8</id>
<content type='text'>
Currently it's very easy for the advice library's callers to miss
checking the visibility step before printing an advice. Also, it makes
more sense for this step to be handled by the advice library.

Add a new advise_if_enabled function that checks the visibility of
advice messages before printing.

Add a new helper advise_enabled to check the visibility of the advice
if the caller needs to carry out complicated processing based on that
value.

A list of advice_settings is added to cache the config variables names
and values, it's intended to replace advice_config[] and the global
variables once we migrate all the callers to use the new APIs.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>advice: change "setupStreamFailure" to "setUpstreamFailure"</title>
<updated>2020-03-02T20:37:22Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2020-03-02T20:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fef0c76f1802c42f1d1f3b6344deb182a3600625'/>
<id>urn:sha1:fef0c76f1802c42f1d1f3b6344deb182a3600625</id>
<content type='text'>
fb6fbffbda (advice: keep config name in camelCase in advice_config[],
2018-05-26) changed the config names to camelCase, but one of the names
wasn't changed correctly. Fix it.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>advice: extract vadvise() from advise()</title>
<updated>2020-03-02T20:37:21Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2020-03-02T20:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06ac2b3b6e30e65f4f9bc63ca78a1e33025f2e4c'/>
<id>urn:sha1:06ac2b3b6e30e65f4f9bc63ca78a1e33025f2e4c</id>
<content type='text'>
In preparation for a new advice method, extract a version of advise()
that uses an explict 'va_list' parameter. Call it from advise() for a
functionally equivalent version.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: change advice config variables used by the add API</title>
<updated>2020-02-06T19:08:00Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2020-02-06T10:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=887a0fd57336dc5ff3ac28b6de0be91278e9e179'/>
<id>urn:sha1:887a0fd57336dc5ff3ac28b6de0be91278e9e179</id>
<content type='text'>
advice.addNothing config variable is used to control the visibility of
two advice messages in the add library. This config variable is
replaced by two new variables, whose names are more clear and relevant
to the two cases.

Also add the two new variables to the documentation.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add: use advise function to display hints</title>
<updated>2020-01-15T20:15:04Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2020-01-07T23:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf66db37f1e17b71e8edb93d78ec407fbc1e0989'/>
<id>urn:sha1:bf66db37f1e17b71e8edb93d78ec407fbc1e0989</id>
<content type='text'>
Use the advise function in advice.c to display hints to the users, as
it provides a neat and a standard format for hint messages, i.e: the
text is colored in yellow and the line starts by the word "hint:".

Also this will enable us to control the messages using advice.*
configuration variables.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
