<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.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-08-25T21:57:08Z</updated>
<entry>
<title>Merge branch 'dt/refs-pseudo'</title>
<updated>2015-08-25T21:57:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-25T21:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=080cc646637f20494138c62fe6b8b0fee8d521fa'/>
<id>urn:sha1:080cc646637f20494138c62fe6b8b0fee8d521fa</id>
<content type='text'>
To prepare for allowing a different "ref" backend to be plugged in
to the system, update_ref()/delete_ref() have been taught about
ref-like things like MERGE_HEAD that are per-worktree (they will
always be written to the filesystem inside $GIT_DIR).

* dt/refs-pseudo:
  pseudoref: check return values from read_ref()
  sequencer: replace write_cherry_pick_head with update_ref
  bisect: use update_ref
  pseudorefs: create and use pseudoref update and delete functions
  refs: add ref_type function
  refs: introduce pseudoref and per-worktree ref concepts
</content>
</entry>
<entry>
<title>memoize common git-path "constant" files</title>
<updated>2015-08-10T22:37:14Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-08-10T09:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f932729cc7707390f4d6739be1573e93ceb9df22'/>
<id>urn:sha1:f932729cc7707390f4d6739be1573e93ceb9df22</id>
<content type='text'>
One of the most common uses of git_path() is to pass a
constant, like git_path("MERGE_MSG"). This has two
drawbacks:

  1. The return value is a static buffer, and the lifetime
     is dependent on other calls to git_path, etc.

  2. There's no compile-time checking of the pathname. This
     is OK for a one-off (after all, we have to spell it
     correctly at least once), but many of these constant
     strings appear throughout the code.

This patch introduces a series of functions to "memoize"
these strings, which are essentially globals for the
lifetime of the program. We compute the value once, take
ownership of the buffer, and return the cached value for
subsequent calls.  cache.h provides a helper macro for
defining these functions as one-liners, and defines a few
common ones for global use.

Using a macro is a little bit gross, but it does nicely
document the purpose of the functions. If we need to touch
them all later (e.g., because we learned how to change the
git_dir variable at runtime, and need to invalidate all of
the stored values), it will be much easier to have the
complete list.

Note that the shared-global functions have separate, manual
declarations. We could do something clever with the macros
(e.g., expand it to a declaration in some places, and a
declaration _and_ a definition in path.c). But there aren't
that many, and it's probably better to stay away from
too-magical macros.

Likewise, if we abandon the C preprocessor in favor of
generating these with a script, we could get much fancier.
E.g., normalizing "FOO/BAR-BAZ" into "git_path_foo_bar_baz".
But the small amount of saved typing is probably not worth
the resulting confusion to readers who want to grep for the
function's definition.

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>sequencer: replace write_cherry_pick_head with update_ref</title>
<updated>2015-07-31T17:40:18Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2015-07-31T06:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d96a53996b6c02b96a9a2b4eed9eac4e9d661a38'/>
<id>urn:sha1:d96a53996b6c02b96a9a2b4eed9eac4e9d661a38</id>
<content type='text'>
Now update_ref (via write_pseudoref) does almost exactly what
write_cherry_pick_head did, so we can remove write_cherry_pick_head
and just use update_ref.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mg/sequencer-commit-messages-always-verbatim'</title>
<updated>2015-03-17T23:01:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-17T23:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=795b01422da12da3e576fb3468c627b78948b3dc'/>
<id>urn:sha1:795b01422da12da3e576fb3468c627b78948b3dc</id>
<content type='text'>
"git cherry-pick" used to clean-up the log message even when it is
merely replaying an existing commit.  It now replays the message
verbatim unless you are editing the message of resulting commits.

* mg/sequencer-commit-messages-always-verbatim:
  sequencer: preserve commit messages
</content>
</entry>
<entry>
<title>sequencer: preserve commit messages</title>
<updated>2015-03-06T19:11:39Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2015-03-06T13:55:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17d65f03e1d2d1678d9960a4f71e4caccacf500f'/>
<id>urn:sha1:17d65f03e1d2d1678d9960a4f71e4caccacf500f</id>
<content type='text'>
sequencer calls "commit" with default options, which implies
"--cleanup=default" unless the user specified something else in their
config. This leads to cherry-picked commits getting a cleaned up commit
message, which is usually not an intended side-effect.

Make the sequencer use "--cleanup=verbatim" so that it preserves commit
messages independent of the default, unless the user has set config for "commit"
or the message is amended with -s or -x.

Reported-by: Christoph Anton Mitterer &lt;calestyo@scientia.net&gt;
Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref_transaction_update(): remove "have_old" parameter</title>
<updated>2015-02-17T19:22:50Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d147bdff0b8132d3aa53a46df8dbab7b673b796'/>
<id>urn:sha1:1d147bdff0b8132d3aa53a46df8dbab7b673b796</id>
<content type='text'>
Instead, verify the reference's old value if and only if old_sha1 is
non-NULL.

ref_transaction_delete() will get the same treatment in a moment.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/interpret-trailers-more'</title>
<updated>2014-12-22T20:26:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-22T20:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ed8a4e161c06b82734f5f5268a5b1fb68abb954'/>
<id>urn:sha1:0ed8a4e161c06b82734f5f5268a5b1fb68abb954</id>
<content type='text'>
"git interpret-trailers" learned to properly handle the
"Conflicts:" block at the end.

* cc/interpret-trailers-more:
  trailer: add test with an old style conflict block
  trailer: reuse ignore_non_trailer() to ignore conflict lines
  commit: make ignore_non_trailer() non static
  merge &amp; sequencer: turn "Conflicts:" hint into a comment
  builtin/commit.c: extract ignore_non_trailer() helper function
  merge &amp; sequencer: unify codepaths that write "Conflicts:" hint
  builtin/merge.c: drop a parameter that is never used
</content>
</entry>
<entry>
<title>Merge branch 'jc/conflict-hint' into cc/interpret-trailers-more</title>
<updated>2014-11-10T17:56:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-11-10T17:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=216d29ef257e48f95bc14765d5da17e7854a3109'/>
<id>urn:sha1:216d29ef257e48f95bc14765d5da17e7854a3109</id>
<content type='text'>
* jc/conflict-hint:
  merge &amp; sequencer: turn "Conflicts:" hint into a comment
  builtin/commit.c: extract ignore_non_trailer() helper function
  merge &amp; sequencer: unify codepaths that write "Conflicts:" hint
  builtin/merge.c: drop a parameter that is never used
  git-tag.txt: Add a missing hyphen to `-s`
</content>
</entry>
<entry>
<title>merge &amp; sequencer: turn "Conflicts:" hint into a comment</title>
<updated>2014-10-28T21:04:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-28T20:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=261f315bebfa9af2d09f20211960100ff06f87cb'/>
<id>urn:sha1:261f315bebfa9af2d09f20211960100ff06f87cb</id>
<content type='text'>
Just like other hints such as "Changes to be committed" we show in
the editor to remind the committer what paths were involved in the
resulting commit to help improving their log message, this section
is merely a reminder.

Traditionally, it was not made into comments primarily because it
has to be generated outside the wt-status infrastructure, and also
because it was meant as a bit stronger reminder than the others
(i.e. explaining how you resolved conflicts is much more important
than mentioning what you did to every paths involved in the commit).

But that still does not make this hint a part of the log message
proper, and not showing it as a comment is inviting mistakes.

Note that we still notice "Conflicts:" followed by list of indented
pathnames as an old-style cruft and insert a new Signed-off-by:
before it.  This is so that "commit --amend -s" adds the new S-o-b
at the right place when used on an older commit.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>merge &amp; sequencer: unify codepaths that write "Conflicts:" hint</title>
<updated>2014-10-24T18:34:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-24T18:34:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75c961b767ec061696634c1079dbe5f1a9e10f93'/>
<id>urn:sha1:75c961b767ec061696634c1079dbe5f1a9e10f93</id>
<content type='text'>
Two identical loops in suggest_conflicts() in merge, and
do_recursive_merge() in sequencer, can use a single helper function
extracted from the latter that prepares the "Conflicts:" hint that
is meant to remind the user the paths for which merge conflicts had
to be resolved to write a better commit log message.

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