<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/advice.c, branch v2.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-10-02T21:29:56Z</updated>
<entry>
<title>merge: grammofix in please-commit-before-merge message</title>
<updated>2015-10-02T21:29:56Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2015-10-02T04:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7447679e84ed973430ab19fce87f56857b83068'/>
<id>urn:sha1:b7447679e84ed973430ab19fce87f56857b83068</id>
<content type='text'>
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>pull: check if in unresolved merge state</title>
<updated>2015-06-18T20:17:16Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-18T10:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4a4cf9e821f604b79817bc37b475828f3fb8b0a4'/>
<id>urn:sha1:4a4cf9e821f604b79817bc37b475828f3fb8b0a4</id>
<content type='text'>
Since d38a30d (Be more user-friendly when refusing to do something
because of conflict., 2010-01-12), git-pull will error out with
user-friendly advices if the user is in the middle of a merge or has
unmerged files.

Re-implement this behavior. While the "has unmerged files" case can be
handled by die_resolve_conflict(), we introduce a new function
die_conclude_merge() for printing a different error message for when
there are no unmerged files but the merge has not been finished.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>standardize usage info string format</title>
<updated>2015-01-14T17:32:04Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2015-01-13T07:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c9b4f2f8b7f27f3984e80d053106d5d41cbb03b'/>
<id>urn:sha1:9c9b4f2f8b7f27f3984e80d053106d5d41cbb03b</id>
<content type='text'>
This patch puts the usage info strings that were not already in docopt-
like format into docopt-like format, which will be a litle easier for
end users and a lot easier for translators. Changes include:

- Placing angle brackets around fill-in-the-blank parameters
- Putting dashes in multiword parameter names
- Adding spaces to [-f|--foobar] to make [-f | --foobar]
- Replacing &lt;foobar&gt;* with [&lt;foobar&gt;...]

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>merge, pull: stop advising 'commit -a' in case of conflict</title>
<updated>2014-08-28T17:29:53Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2014-08-28T09:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=91e70e00ac3e72eb81e10273b48d884553e7d01d'/>
<id>urn:sha1:91e70e00ac3e72eb81e10273b48d884553e7d01d</id>
<content type='text'>
'git commit -a' is rarely a good way to mark conflicts as resolved:
the user anyway has to go manually through the list of conflicts to
do the actual resolution, and it is usually better to use "git add"
on each files after doing the resolution.

On the other hand, using 'git commit -a' is potentially dangerous,
as it makes it very easy to mistakenly commit conflict markers
without noticing, and even worse, the user may have started a merge
while having local changes that do not overlap with it in the
working tree.

While we're there, synchronize the 'git pull' and 'git merge'
messages: the first was ending with '...  and make a commit.', but
not the latter.

Eventually, git should detect that conflicts have been resolved in
the working tree and tailor these messages further.  Not only "use
git commit -a" could be resurected, but "Fix them up in the work
tree" should be dropped when it happens.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refactor skip_prefix to return a boolean</title>
<updated>2014-06-20T17:44:43Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-18T19:44:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf4fff579e02d8585d59f6c8739534b7b0d617dd'/>
<id>urn:sha1:cf4fff579e02d8585d59f6c8739534b7b0d617dd</id>
<content type='text'>
The skip_prefix() function returns a pointer to the content
past the prefix, or NULL if the prefix was not found. While
this is nice and simple, in practice it makes it hard to use
for two reasons:

  1. When you want to conditionally skip or keep the string
     as-is, you have to introduce a temporary variable.
     For example:

       tmp = skip_prefix(buf, "foo");
       if (tmp)
	       buf = tmp;

  2. It is verbose to check the outcome in a conditional, as
     you need extra parentheses to silence compiler
     warnings. For example:

       if ((cp = skip_prefix(buf, "foo"))
	       /* do something with cp */

Both of these make it harder to use for long if-chains, and
we tend to use starts_with() instead. However, the first line
of "do something" is often to then skip forward in buf past
the prefix, either using a magic constant or with an extra
strlen(3) (which is generally computed at compile time, but
means we are repeating ourselves).

This patch refactors skip_prefix() to return a simple boolean,
and to provide the pointer value as an out-parameter. If the
prefix is not found, the out-parameter is untouched. This
lets you write:

  if (skip_prefix(arg, "foo ", &amp;arg))
	  do_foo(arg);
  else if (skip_prefix(arg, "bar ", &amp;arg))
	  do_bar(arg);

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 'jk/error-resolve-conflict-advice'</title>
<updated>2014-06-16T19:18:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T19:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0d5ba7e6ed1f9ea7b22dc8063b782b431ad37b7'/>
<id>urn:sha1:d0d5ba7e6ed1f9ea7b22dc8063b782b431ad37b7</id>
<content type='text'>
* jk/error-resolve-conflict-advice:
  error_resolve_conflict: drop quotations around operation
  error_resolve_conflict: rewrap advice message
</content>
</entry>
<entry>
<title>error_resolve_conflict: drop quotations around operation</title>
<updated>2014-06-03T17:04:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-03T07:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d795216ac35f08e1ae2a706fca4c06a887c7d797'/>
<id>urn:sha1:d795216ac35f08e1ae2a706fca4c06a887c7d797</id>
<content type='text'>
When you try to commit with unmerged entries, you get an
error like:

  $ git commit
  error: 'commit' is not possible because you have unmerged files.

The quotes around "commit" are clunky; the user doesn't care
that this message is a template with the command-name filled
in.  Saying:

  error: commit is not possible because you have unmerged files

is easier to read. As this code is called from other places,
we may also end up with:

  $ git merge
  error: merge is not possible because you have unmerged files

  $ git cherry-pick foo
  error: cherry-pick is not possible because you have unmerged files

  $ git revert foo
  error: revert is not possible because you have unmerged files

All of which look better without the quotes. This also
happens to match the behavior of "git pull", which generates
a similar message (but does not share code, as it is a shell
script).

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>error_resolve_conflict: rewrap advice message</title>
<updated>2014-06-03T17:04:19Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-03T07:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c057b2424a479a2219666f3806c0dd93867ca5c9'/>
<id>urn:sha1:c057b2424a479a2219666f3806c0dd93867ca5c9</id>
<content type='text'>
If you try to commit with unresolved conflicts in the index,
you get this message:

	$ git commit
	U       foo
	error: 'commit' is not possible because you have unmerged files.
	hint: Fix them up in the work tree,
	hint: and then use 'git add/rm &lt;file&gt;' as
	hint: appropriate to mark resolution and make a commit,
	hint: or use 'git commit -a'.
	fatal: Exiting because of an unresolved conflict.

The irregular line-wrapping makes this awkward to read, and
it takes up more lines than necessary. Instead, let's rewrap
it to about 60 characters per line:

	$ git commit
	U       foo
	error: 'commit' is not possible because you have unmerged files.
	hint: Fix them up in the work tree, and then use 'git add/rm &lt;file&gt;'
	hint: as appropriate to mark resolution and make a commit, or use
	hint: 'git commit -a'.
	fatal: Exiting because of an unresolved conflict.

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 'jc/push-2.0-default-to-simple'</title>
<updated>2014-03-07T23:13:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-07T23:13:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=009055f3ecd8d9b4eb140429cb5ce5d2088174c7'/>
<id>urn:sha1:009055f3ecd8d9b4eb140429cb5ce5d2088174c7</id>
<content type='text'>
Finally update the "git push" default behaviour to "simple".
</content>
</entry>
<entry>
<title>Rename advice.object_name_warning to objectNameWarning</title>
<updated>2013-07-31T22:20:07Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@inf.ethz.ch</email>
</author>
<published>2013-07-31T20:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8dc84fdc48a79c70682e6c361a82d0f3e1db9a03'/>
<id>urn:sha1:8dc84fdc48a79c70682e6c361a82d0f3e1db9a03</id>
<content type='text'>
We spell config variables in camelCase instead of with_underscores.

Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
