<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/advice.c, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-04-01T16:19:30Z</updated>
<entry>
<title>Merge branch 'tb/document-status-u-tradeoff' into maint</title>
<updated>2013-04-01T16:19:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-01T16:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fec274b01f39262f945edb64c14c3bfe130b5bef'/>
<id>urn:sha1:fec274b01f39262f945edb64c14c3bfe130b5bef</id>
<content type='text'>
* tb/document-status-u-tradeoff:
  status: advise to consider use of -u when read_directory takes too long
  git status: document trade-offs in choosing parameters to the -u option
</content>
</entry>
<entry>
<title>status: advise to consider use of -u when read_directory takes too long</title>
<updated>2013-03-17T04:44:58Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-03-13T12:59:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a38ef2ced55f0a8a7967581934e40f79e1d8733'/>
<id>urn:sha1:6a38ef2ced55f0a8a7967581934e40f79e1d8733</id>
<content type='text'>
Introduce advice.statusUoption to suggest considering use of -u to
strike different trade-off when it took more than 2 seconds to
enumerate untracked/ignored files.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE</title>
<updated>2013-01-24T22:37:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-23T21:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75e5c0dc5529aed42122b3a774e6b17383e51b66'/>
<id>urn:sha1:75e5c0dc5529aed42122b3a774e6b17383e51b66</id>
<content type='text'>
When we push to update an existing ref, if:

 * the object at the tip of the remote is not a commit; or
 * the object we are pushing is not a commit,

it won't be correct to suggest to fetch, integrate and push again,
as the old and new objects will not "merge".  We should explain that
the push must be forced when there is a non-committish object is
involved in such a case.

If we do not have the current object at the tip of the remote, we do
not even know that object, when fetched, is something that can be
merged.  In such a case, suggesting to pull first just like
non-fast-forward case may not be technically correct, but in
practice, most such failures are seen when you try to push your work
to a branch without knowing that somebody else already pushed to
update the same branch since you forked, so "pull first" would work
as a suggestion most of the time.  And if the object at the tip is
not a commit, "pull first" will fail, without making any permanent
damage.  As a side effect, it also makes the error message the user
will get during the next "push" attempt easier to understand, now
the user is aware that a non-commit object is involved.

In these cases, the current code already rejects such a push on the
client end, but we used the same error and advice messages as the
ones used when rejecting a non-fast-forward push, i.e. pull from
there and integrate before pushing again.

Introduce new rejection reasons and reword the messages
appropriately.

[jc: with help by Peff on message details]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: allow already-exists advice to be disabled</title>
<updated>2012-12-03T16:04:09Z</updated>
<author>
<name>Chris Rorvick</name>
<email>chris@rorvick.com</email>
</author>
<published>2012-12-03T03:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b450568209c8ae270d26ee7fda2e4687ad8a5327'/>
<id>urn:sha1:b450568209c8ae270d26ee7fda2e4687ad8a5327</id>
<content type='text'>
Add 'advice.pushAlreadyExists' option to disable the advice shown when
an update is rejected for a reference that is not allowed to update at
all (verses those that are allowed to fast-forward.)

Signed-off-by: Chris Rorvick &lt;chris@rorvick.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: rename config variable for more general use</title>
<updated>2012-12-03T16:04:08Z</updated>
<author>
<name>Chris Rorvick</name>
<email>chris@rorvick.com</email>
</author>
<published>2012-12-03T03:27:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1184564eac8ef6c82da068a31f60aee0d6870265'/>
<id>urn:sha1:1184564eac8ef6c82da068a31f60aee0d6870265</id>
<content type='text'>
The 'pushNonFastForward' advice config can be used to squelch several
instances of push-related advice.  Rename it to 'pushUpdateRejected' to
cover other reject scenarios that are unrelated to fast-forwarding.
Retain the old name for compatibility.

Signed-off-by: Chris Rorvick &lt;chris@rorvick.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-advise-vaddf'</title>
<updated>2012-07-24T21:05:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-07-24T21:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31c4c833d7c39e7fd681d5c0a4809030cbe455f5'/>
<id>urn:sha1:31c4c833d7c39e7fd681d5c0a4809030cbe455f5</id>
<content type='text'>
The advise() function did not use varargs correctly to format
its message.

* jk/maint-advise-vaddf:
  advice: pass varargs to strbuf_vaddf, not strbuf_addf
</content>
</entry>
<entry>
<title>advice: pass varargs to strbuf_vaddf, not strbuf_addf</title>
<updated>2012-07-23T20:10:43Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-07-23T18:48:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=447b99c8b1102746054644acd268f4c1b115a9f8'/>
<id>urn:sha1:447b99c8b1102746054644acd268f4c1b115a9f8</id>
<content type='text'>
The advise() function takes a variable number of arguments
and converts them into a va_list object to pass to strbuf
for handling. However, we accidentally called strbuf_addf
(that takes a variable number of arguments) instead of
strbuf_vaddf (that takes a va_list).

This bug dates back to v1.7.8.1-1-g23cb5bf, but we never
noticed because none of the current callers passes a string
with a format specifier in it. And the compiler did not
notice because the format string is not available at
compile time.

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>push: Provide situational hints for non-fast-forward errors</title>
<updated>2012-03-20T04:42:06Z</updated>
<author>
<name>Christopher Tiwald</name>
<email>christiwald@gmail.com</email>
</author>
<published>2012-03-20T04:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f25950f3475e263ed6c8f0797bb058ba6444f85e'/>
<id>urn:sha1:f25950f3475e263ed6c8f0797bb058ba6444f85e</id>
<content type='text'>
Pushing a non-fast-forward update to a remote repository will result in
an error, but the hint text doesn't provide the correct resolution in
every case. Give better resolution advice in three push scenarios:

1) If you push your current branch and it triggers a non-fast-forward
error, you should merge remote changes with 'git pull' before pushing
again.

2) If you push to a shared repository others push to, and your local
tracking branches are not kept up to date, the 'matching refs' default
will generate non-fast-forward errors on outdated branches. If this is
your workflow, the 'matching refs' default is not for you. Consider
setting the 'push.default' configuration variable to 'current' or
'upstream' to ensure only your current branch is pushed.

3) If you explicitly specify a ref that is not your current branch or
push matching branches with ':', you will generate a non-fast-forward
error if any pushed branch tip is out of date. You should checkout the
offending branch and merge remote changes before pushing again.

Teach transport.c to recognize these scenarios and configure push.c
to hint for them. If 'git push's default behavior changes or we
discover more scenarios, extension is easy. Standardize on the
advice API and add three new advice variables, 'pushNonFFCurrent',
'pushNonFFDefault', and 'pushNonFFMatching'. Setting any of these
to 'false' will disable their affiliated advice. Setting
'pushNonFastForward' to false will disable all three, thus preserving the
config option for users who already set it, but guaranteeing new
users won't disable push advice accidentally.

Based-on-patch-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Christopher Tiwald &lt;christiwald@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/clone-detached'</title>
<updated>2012-02-01T06:24:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-02-01T06:24:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ce2b97d2c2890e4ee1dd3bc936ea20d71f830ae'/>
<id>urn:sha1:5ce2b97d2c2890e4ee1dd3bc936ea20d71f830ae</id>
<content type='text'>
* nd/clone-detached:
  clone: fix up delay cloning conditions
  push: do not let configured foreign-vcs permanently clobbered
  clone: print advice on checking out detached HEAD
  clone: allow --branch to take a tag
  clone: refuse to clone if --branch points to bogus ref
  clone: --branch=&lt;branch&gt; always means refs/heads/&lt;branch&gt;
  clone: delay cloning until after remote HEAD checking
  clone: factor out remote ref writing
  clone: factor out HEAD update code
  clone: factor out checkout code
  clone: write detached HEAD in bare repositories
  t5601: add missing &amp;&amp; cascade
</content>
</entry>
<entry>
<title>clone: print advice on checking out detached HEAD</title>
<updated>2012-01-17T00:26:27Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-01-16T09:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2857093ba15982d21ff0d5a9fd65294ac895cb67'/>
<id>urn:sha1:2857093ba15982d21ff0d5a9fd65294ac895cb67</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
