<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.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-12T20:38:40Z</updated>
<entry>
<title>Correct common spelling mistakes in comments and tests</title>
<updated>2013-04-12T20:38:40Z</updated>
<author>
<name>Stefano Lattarini</name>
<email>stefano.lattarini@gmail.com</email>
</author>
<published>2013-04-11T22:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41ccfdd9c931ee71b09f38f4eb19cf44a8e4381d'/>
<id>urn:sha1:41ccfdd9c931ee71b09f38f4eb19cf44a8e4381d</id>
<content type='text'>
Most of these were found using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini &lt;stefano.lattarini@gmail.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Acked-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>learn to pick/revert into unborn branch</title>
<updated>2012-12-23T18:40:37Z</updated>
<author>
<name>Martin von Zweigbergk</name>
<email>martinvonz@gmail.com</email>
</author>
<published>2012-12-21T19:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=334ae397452170dacfcd8e69e4a41f6a64f54eec'/>
<id>urn:sha1:334ae397452170dacfcd8e69e4a41f6a64f54eec</id>
<content type='text'>
cherry-picking into an unborn branch should work, so make it work,
with or without --ff.

Cherry-picking anything other than a commit that only adds files, will
naturally result in conflicts. Similarly, revert also works, but will
result in conflicts unless the specified revision only deletes files.

Signed-off-by: Martin von Zweigbergk &lt;martinvonz@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/same-encoding'</title>
<updated>2012-11-15T18:24:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-11-15T18:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b8731258d06001217254ef67a3553d3fe601737'/>
<id>urn:sha1:6b8731258d06001217254ef67a3553d3fe601737</id>
<content type='text'>
Various codepaths checked if two encoding names are the same using
ad-hoc code and some of them ended up asking iconv() to convert
between "utf8" and "UTF-8".  The former is not a valid way to spell
the encoding name, but often people use it by mistake, and we
equated them in some but not all codepaths. Introduce a new helper
function to make these codepaths consistent.

* jc/same-encoding:
  reencode_string(): introduce and use same_encoding()

Conflicts:
	builtin/mailinfo.c
</content>
</entry>
<entry>
<title>reencode_string(): introduce and use same_encoding()</title>
<updated>2012-11-04T13:10:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-19T05:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0e18bcd5e937b9e5857892e7f5c80c3c5b1da5d4'/>
<id>urn:sha1:0e18bcd5e937b9e5857892e7f5c80c3c5b1da5d4</id>
<content type='text'>
Callers of reencode_string() that re-encodes a string from one
encoding to another all used ad-hoc way to bypass the case where the
input and the output encodings are the same.  Some did strcmp(),
some did strcasecmp(), yet some others when converting to UTF-8 used
is_encoding_utf8().

Introduce same_encoding() helper function to make these callers use
the same logic.  Notably, is_encoding_utf8() has a work-around for
common misconfiguration to use "utf8" to name UTF-8 encoding, which
does not match "UTF-8" hence strcasecmp() would not consider the
same.  Make use of it in this helper function.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Move try_merge_command and checkout_fast_forward to libgit.a</title>
<updated>2012-10-29T07:08:30Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-10-26T15:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db699a8a1f2c8063620efae41e66786c11a31d8f'/>
<id>urn:sha1:db699a8a1f2c8063620efae41e66786c11a31d8f</id>
<content type='text'>
These functions are called in sequencer.c, which is part of
libgit.a. This makes libgit.a potentially require builtin/merge.c for
external git commands.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/make-static'</title>
<updated>2012-09-18T21:37:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-18T21:37:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06e211acc61c52a2e1709ea8b62a0b0f6dcb492b'/>
<id>urn:sha1:06e211acc61c52a2e1709ea8b62a0b0f6dcb492b</id>
<content type='text'>
Turn many file-scope private symbols to static to reduce the
global namespace contamination.

* jc/make-static:
  sequencer.c: mark a private file-scope symbol as static
  ident.c: mark private file-scope symbols as static
  trace.c: mark a private file-scope symbol as static
  wt-status.c: mark a private file-scope symbol as static
  read-cache.c: mark a private file-scope symbol as static
  strbuf.c: mark a private file-scope symbol as static
  sha1-array.c: mark a private file-scope symbol as static
  symlinks.c: mark private file-scope symbols as static
  notes.c: mark a private file-scope symbol as static
  rerere.c: mark private file-scope symbols as static
  graph.c: mark private file-scope symbols as static
  diff.c: mark a private file-scope symbol as static
  commit.c: mark a file-scope private symbol as static
  builtin/notes.c: mark file-scope private symbols as static
</content>
</entry>
<entry>
<title>sequencer.c: mark a private file-scope symbol as static</title>
<updated>2012-09-16T06:20:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-16T06:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=250f2492a408be1ed79c563f304a0d43752d032c'/>
<id>urn:sha1:250f2492a408be1ed79c563f304a0d43752d032c</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cherry-pick: don't forget -s on failure</title>
<updated>2012-09-14T17:04:29Z</updated>
<author>
<name>Miklos Vajna</name>
<email>vmiklos@suse.cz</email>
</author>
<published>2012-09-14T06:52:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ed75e2a3fb30f93fea7772e481ec6091e9a2c5f'/>
<id>urn:sha1:5ed75e2a3fb30f93fea7772e481ec6091e9a2c5f</id>
<content type='text'>
In case 'git cherry-pick -s &lt;commit&gt;' failed, the user had to use 'git
commit -s' (i.e. state the -s option again), which is easy to forget
about.  Instead, write the signed-off-by line early, so plain 'git
commit' will have the same result.

Also update 'git commit -s', so that in case there is already a relevant
Signed-off-by line before the Conflicts: line, it won't add one more at
the end of the message. If there is no such line, then add it before the
the Conflicts: line.

Signed-off-by: Miklos Vajna &lt;vmiklos@suse.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mz/cherry-pick-cmdline-order'</title>
<updated>2012-09-10T22:42:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-10T22:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2b927932d90588e7094100b470b9e94bd769afe'/>
<id>urn:sha1:c2b927932d90588e7094100b470b9e94bd769afe</id>
<content type='text'>
"git cherry-pick A C B" used to replay changes in A and then B and
then C if these three commits had committer timestamps in that
order, which is not what the user who said "A C B" naturally expects.

* mz/cherry-pick-cmdline-order:
  cherry-pick/revert: respect order of revisions to pick
  demonstrate broken 'git cherry-pick three one two'
  teach log --no-walk=unsorted, which avoids sorting
</content>
</entry>
<entry>
<title>cherry-pick/revert: respect order of revisions to pick</title>
<updated>2012-08-30T21:00:23Z</updated>
<author>
<name>Martin von Zweigbergk</name>
<email>martinvonz@gmail.com</email>
</author>
<published>2012-08-29T06:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a73e22e96350c9bcb5c0e31e0298ce67bec0a527'/>
<id>urn:sha1:a73e22e96350c9bcb5c0e31e0298ce67bec0a527</id>
<content type='text'>
When giving multiple individual revisions to cherry-pick or revert, as
in 'git cherry-pick A B' or 'git revert B A', one would expect them to
be picked/reverted in the order given on the command line. They are
instead ordered by their commit timestamp -- in chronological order
for "cherry-pick" and in reverse chronological order for
"revert". This matches the order in which one would usually give them
on the command line, making this bug somewhat hard to notice. Still,
it has been reported at least once before [1].

It seems like the chronological sorting happened by accident because
the revision walker has traditionally always sorted commits in reverse
chronological order when rev_info.no_walk was enabled. In the case of
'git revert B A' where B is newer than A, this sorting is a no-op. For
'git cherry-pick A B', the sorting would reverse the arguments, but
because the sequencer also flips the rev_info.reverse flag when
picking (as opposed to reverting), the end result is a chronological
order. The rev_info.reverse flag was probably flipped so that the
revision walker emits B before C in 'git cherry-pick A..C'; that it
happened to effectively undo the unexpected sorting done when not
walking, was probably a coincidence that allowed this bug to happen at
all.

Fix the bug by telling the revision walker not to sort the commits
when not walking. The only case we want to reverse the order is now
when cherry-picking and walking revisions (rev_info.no_walk = 0).

 [1] http://thread.gmane.org/gmane.comp.version-control.git/164794

Signed-off-by: Martin von Zweigbergk &lt;martinvonz@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
