Skip to content

Misc. pull/merge/am improvements

Shawn Pearce git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11Use GIT_REFLOG_ACTION environment variable instead.Documentation/git-merge.txt git-am.sh git-fetch.sh +4 more+30 -410 replies
1/11Fix memory leak in traverse_commit_listlist-objects.c+7 -03 replies
2/11Honor GIT_REFLOG_ACTION in git-rebase.git-reset.sh+2 -10 replies
2/11Reorganize the object memory pools so we can release themalloc.c+55 -310 replies
3/11Use branch names in 'git-rebase -m' conflict hunks.git-rebase.sh+10 -10 replies
3/11Define free_all_objects to deallocate object poolsalloc.c cache.h commit.c +7 more+87 -50 replies
4/11Ensure `git-pull` fails if `git-merge` fails.git-pull.sh+1 -10 replies
4/11Allow pooled nodes to be recycled back onto a free listalloc.c+21 -21 reply
5/11Honor pull.{twohead,octopus} in git-merge.git-merge.sh+14 -20 replies
5/11Bulk allocate struct commit_list, as we do for struct commitalloc.c builtin-diff-tree.c builtin-rev-parse.c +8 more+23 -230 replies
6/11Allow git-merge to select the default strategy.git-pull.sh+0 -180 replies
6/11git-fetch: Release objects used by a prior transportbuiltin-fetch.c+4 -12 replies
7/11Avoid git-fetch in `git-pull .` when possible.git-pull.sh+27 -03 replies
7/11git-fetch: Limit automated tag following to only fetched objectsbuiltin-fetch.c t/t5515/fetch.br-branches-default t/t5515/fetch.br-branches-default-merge +52 more+39 -1085 replies
8/11Move better_branch_name above get_ref in merge-recursive.merge-recursive.c+12 -120 replies
8/11run-command: Support sending stderr to /dev/nullrun-command.c run-command.h+5 -20 replies
9/11Allow merging bare trees in merge-recursive.merge-recursive.c+3 -01 reply
9/11rev-list: Introduce --quiet to avoid /dev/null redirectsDocumentation/git-rev-list.txt builtin-rev-list.c+31 -40 replies
10/11Use merge-recursive in git-am -3.git-am.sh+5 -20 replies
10/11git-fetch: avoid local fetching from alternate (again)transport.c+65 -30 replies
11/11Improve merge performance by avoiding in-index merges.git-merge.sh+22 -173 replies
11/11git-fetch: test avoiding unnecessary copying from alternatest/t5502-quickfetch.sh+33 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/11] Updated 'quickfetch' series

So what started out as a 1 patch hack has now grown into an 11 patch series. *sigh*

1) Fix memory leak in traverse_commit_list

This one seems obvious to me. No real harm to not having it but later on we'd see the downside to the leak in git-fetch.

  2)  Reorganize the object memory pools so we can release them
  3)  Define free_all_objects to deallocate object pools
  4)  Allow pooled nodes to be recycled back onto a free list
  5)  Bulk allocate struct commit_list, as we do for struct commit

This part of the series is only lightly tested thus far. It rewrites the object allocators in alloc.c to allow complete destruction of the object hash and its contents in a single call. This way we can rerun the revision machinary a second time in the same process without the mess of clear_commit_flags() or worring about parents having been rewritten.

We also decrease memory usage by moving struct commit_list into the pool of things managed by alloc.c. Given how many of these suckers we are allocating (3x as many as commits in a --topo-order!) the malloc overhead saved per parent pointer is probably worth the pain of reviewing this series.

6) git-fetch: Release objects used by a prior transport

Makes use of the above to ensure transports that are called directly in-process (e.g. fetch-pack) don't get confused by a prior invocation of that same transport. I don't think fetch-pack was meant to be run twice in the same process...

7) git-fetch: Limit automated tag following to only fetched objects

Rewrites the rules behind automated tag following. The new rule is simpler to understand, has some measure of safety attached to it, and actually works when we turn on quickfetch behavior in a transport.

  8)  run-command: Support sending stderr to /dev/null
  9)  rev-list: Introduce --quiet to avoid /dev/null redirects
 10)  git-fetch: avoid local fetching from alternate (again)
 11)  git-fetch: test avoiding unnecessary copying from alternates

Turn on quickfetch for the native git transport. As I'm sitting here writing this I'm wondering if the quickfetch thing shouldn't be higher up, like in git-fetch itself, so that we can also use it in the HTTP transport. But it should work now with the earlier stuff out of the way.

Signature · 1 line
Shawn.