public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr•com>
To: git@vger•kernel.org
Cc: peff@peff•net, dstolee@microsoft•com, gitster@pobox•com,
	mhagger@alum•mit.edu
Subject: [PATCH v3 0/5] commit-graph: write non-split graphs as read-only
Date: Wed, 29 Apr 2020 11:36:26 -0600	[thread overview]
Message-ID: <cover.1588181626.git.me@ttaylorr.com> (raw)
In-Reply-To: <cover.1587422630.git.me@ttaylorr.com>

Hi,

Here's a brief reroll to incorporate suggestions from Junio and Peff in
the sub-thread beginning at [1]. Not much at all has changed since v2,
with the exception of:

  * fixing the aforementioned issue by sprinkling in some 'umask 022's
    in throughout the new tests

  * adding in a new final patch to apply the same treatment to
    the 'commit-graph-chain' file

[1]: https://lore.kernel.org/git/xmqqr1w85vtq.fsf@gitster.c.googlers.com/

Taylor Blau (5):
  tempfile.c: introduce 'create_tempfile_mode'
  lockfile.c: introduce 'hold_lock_file_for_update_mode'
  commit-graph.c: write non-split graphs as read-only
  commit-graph.c: ensure graph layers respect core.sharedRepository
  commit-graph.c: make 'commit-graph-chain's read-only

 commit-graph.c                | 12 ++++++++++--
 lockfile.c                    | 18 ++++++++++--------
 lockfile.h                    | 32 ++++++++++++++++++++++++++++----
 t/t5318-commit-graph.sh       | 15 ++++++++++++++-
 t/t5324-split-commit-graph.sh | 24 ++++++++++++++++++++++++
 t/t6600-test-reach.sh         |  2 ++
 tempfile.c                    |  6 +++---
 tempfile.h                    | 10 +++++++++-
 8 files changed, 100 insertions(+), 19 deletions(-)

Range-diff against v2:
1:  03c975b0bd = 1:  03c975b0bd tempfile.c: introduce 'create_tempfile_mode'
2:  c1c84552bc = 2:  c1c84552bc lockfile.c: introduce 'hold_lock_file_for_update_mode'
3:  86cf29ce9c ! 3:  8d5503d2e6 commit-graph.c: write non-split graphs as read-only
    @@ Commit message
         commit-graph file into place and then trying to replace it. For these,
         make these files writable.

    +    Helped-by: Junio C Hamano <gitster@pobox•com>
         Signed-off-by: Taylor Blau <me@ttaylorr•com>

      ## commit-graph.c ##
    @@ commit-graph.c: static int write_commit_graph_file(struct write_commit_graph_con
      	}

      ## t/t5318-commit-graph.sh ##
    +@@ t/t5318-commit-graph.sh: test_expect_success 'setup full repo' '
    + 	test_oid_init
    + '
    +
    ++test_expect_success POSIXPERM 'tweak umask for modebit tests' '
    ++	umask 022
    ++'
    ++
    + test_expect_success 'verify graph with no graph file' '
    + 	cd "$TRASH_DIRECTORY/full" &&
    + 	git commit-graph verify
     @@ t/t5318-commit-graph.sh: test_expect_success 'write graph' '
      	graph_read_expect "3"
      '
4:  f83437f130 ! 4:  4b74e23af2 commit-graph.c: ensure graph layers respect core.sharedRepository
    @@ commit-graph.c: static int write_commit_graph_file(struct write_commit_graph_con
      		hold_lock_file_for_update_mode(&lk, ctx->graph_name,

      ## t/t5324-split-commit-graph.sh ##
    +@@ t/t5324-split-commit-graph.sh: graph_read_expect() {
    + 	test_cmp expect output
    + }
    +
    ++test_expect_success POSIXPERM 'tweak umask for modebit tests' '
    ++	umask 022
    ++'
    ++
    + test_expect_success 'create commits and write commit-graph' '
    + 	for i in $(test_seq 3)
    + 	do
     @@ t/t5324-split-commit-graph.sh: test_expect_success 'split across alternate where alternate is not split' '
      	test_cmp commit-graph .git/objects/info/commit-graph
      '
-:  ---------- > 5:  864c916067 commit-graph.c: make 'commit-graph-chain's read-only
--
2.26.0.113.ge9739cdccc

  parent reply	other threads:[~2020-04-29 17:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 22:50 [PATCH 0/3] commit-graph: write non-split graphs as read-only Taylor Blau
2020-04-20 22:51 ` [PATCH 1/3] tempfile.c: introduce 'create_tempfile_mode' Taylor Blau
2020-04-20 23:31   ` Junio C Hamano
2020-04-20 22:51 ` [PATCH 2/3] lockfile.c: introduce 'hold_lock_file_for_update_mode' Taylor Blau
2020-04-20 22:51 ` [PATCH 3/3] commit-graph.c: write non-split graphs as read-only Taylor Blau
2020-04-20 23:23 ` [PATCH 0/3] commit-graph: " Junio C Hamano
2020-04-20 23:39   ` Taylor Blau
2020-04-21  1:17     ` Junio C Hamano
2020-04-21  7:01       ` Jeff King
2020-04-21 18:59         ` Junio C Hamano
2020-04-27 16:27 ` [PATCH v2 0/4] " Taylor Blau
2020-04-27 16:27   ` [PATCH v2 1/4] tempfile.c: introduce 'create_tempfile_mode' Taylor Blau
2020-04-27 16:27   ` [PATCH v2 2/4] lockfile.c: introduce 'hold_lock_file_for_update_mode' Taylor Blau
2020-04-27 16:28   ` [PATCH v2 3/4] commit-graph.c: write non-split graphs as read-only Taylor Blau
2020-04-27 23:54     ` Junio C Hamano
2020-04-27 23:59       ` Taylor Blau
2020-04-28  0:25         ` Junio C Hamano
2020-04-28  3:34         ` Jeff King
2020-04-28 16:50           ` Junio C Hamano
2020-04-28 20:59             ` Jeff King
2020-04-28 21:05               ` Junio C Hamano
2020-04-28 21:08                 ` Jeff King
2020-04-28 21:44                   ` Taylor Blau
2020-04-28 21:58                     ` Jeff King
2020-04-28 23:22                       ` Junio C Hamano
2020-04-29 11:52                         ` Derrick Stolee
2020-04-27 16:28   ` [PATCH v2 4/4] commit-graph.c: ensure graph layers respect core.sharedRepository Taylor Blau
2020-04-27 17:21     ` Taylor Blau
2020-04-27 20:58       ` Jeff King
2020-04-29 17:36 ` Taylor Blau [this message]
2020-04-29 17:36   ` [PATCH v3 1/5] tempfile.c: introduce 'create_tempfile_mode' Taylor Blau
2020-04-29 17:36   ` [PATCH v3 2/5] lockfile.c: introduce 'hold_lock_file_for_update_mode' Taylor Blau
2020-04-29 17:36   ` [PATCH v3 3/5] commit-graph.c: write non-split graphs as read-only Taylor Blau
2020-04-29 17:36   ` [PATCH v3 4/5] commit-graph.c: ensure graph layers respect core.sharedRepository Taylor Blau
2020-04-29 17:36   ` [PATCH v3 5/5] commit-graph.c: make 'commit-graph-chain's read-only Taylor Blau
2020-05-01  5:52   ` [PATCH v3 0/5] commit-graph: write non-split graphs as read-only Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1588181626.git.me@ttaylorr.com \
    --to=me@ttaylorr$(echo .)com \
    --cc=dstolee@microsoft$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=mhagger@alum$(echo .)mit.edu \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox