From patchwork Mon May 4 13:31:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood via GitGitGadget X-Patchwork-Id: 11525981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D94A915AB for ; Mon, 4 May 2020 13:31:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD3C52075B for ; Mon, 4 May 2020 13:31:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uu1gRiiX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728415AbgEDNba (ORCPT ); Mon, 4 May 2020 09:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728129AbgEDNb3 (ORCPT ); Mon, 4 May 2020 09:31:29 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67CB9C061A0F for ; Mon, 4 May 2020 06:31:29 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id i10so20916919wrv.10 for ; Mon, 04 May 2020 06:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=aeSBgPiwecB74eIEA2su9V/0DIgEGdltBHIMD4/NCQA=; b=Uu1gRiiXgGw9kPT3m5M12Mk2KaSVifov0/dxvd13kzmI1Wdc+Kmt14DxI0NwesBpR8 m3ooZWdAIBBFmDUCe4zk0tllGotShe8aeBfycTEK22YlxAvsQ2LkkhkK8K9QAE0VC+fV Q3ZHMejPE2aHB712aPv1dTA9tR0bXlqjia/vebV3ZxCS0JSLrv1JRoNE/dslK1gLZ1mM M7OSYolskVGQepR4gI/QrvMz5ROI62gysvWHh/MXTQSoRsB4g3FAd2WvsXb7aLFGLCN8 Znx6kN+YY0XaRsfWdQ5l1u7nqZcG/hIOW9vFxyAArbSonG9/G0QWlnNfzhxNHnkn7bzD tfvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=aeSBgPiwecB74eIEA2su9V/0DIgEGdltBHIMD4/NCQA=; b=DTJFzIHJxIof2dFwCui/deCiwYYhWdoa7pp5ySk4ijJg9auoH3wo7VPG5lk/UZ/rVl DWnbd4J+NVNUbLzh8sH2yYI8LQdnkAqS29Q9IqDC8KAVuGD/ads2VecgyWRSsBMkA39W BQHzUry07hXF9uVmYinC8vP5IfUAFirFmJdi+jvhJtcVUTtI78+T9/lzvNBqqsq1HL36 LWTi36o5dNvEPyPg1brAyvqZHQe+lZVblGjPKg2+yuPJwHPxzPuB6ljtFeCDSVD1X0aT N4No55gR2eZXbj//qSh2wJLNpykmUfhkAhAINmGuh1EVSr6WC3bndfvjHUsUyS6AYhx7 13AA== X-Gm-Message-State: AGi0PubI7VGeYAnSxY7Q+qrWugZS/S7dVHFcTULC661mBpwML7lJkGV3 fmJvMvds4OFgNWP3Bh1iwXdJ+YGd X-Google-Smtp-Source: APiQypLsBeOKC+iz+/pQqiEfVTGt8PTPQD4h78KYscNy4GatxDYY9+uqikM0mQtzxxff8NKiNpmVvQ== X-Received: by 2002:adf:fe51:: with SMTP id m17mr18815326wrs.414.1588599088012; Mon, 04 May 2020 06:31:28 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q4sm12505706wrx.9.2020.05.04.06.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 06:31:27 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 04 May 2020 13:31:21 +0000 Subject: [PATCH 1/6] fixup! Add reftable library Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin Close files before trying to unlink them. This is actually required on Windows. Note: this is probably not the only part of the code that requires this type of fix, but it seems to be enough to let the _current_ version of t0031 pass. Signed-off-by: Johannes Schindelin --- reftable/stack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reftable/stack.c b/reftable/stack.c index e7b625d924a..2e32f7671c2 100644 --- a/reftable/stack.c +++ b/reftable/stack.c @@ -852,6 +852,10 @@ static int stack_compact_range(struct reftable_stack *st, int first, int last, } } + if (lock_file_fd > 0) { + close(lock_file_fd); + lock_file_fd = 0; + } err = unlink(slice_as_string(&lock_file_name)); if (err < 0) { goto exit; From patchwork Mon May 4 13:31:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood via GitGitGadget X-Patchwork-Id: 11525983 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C16AA913 for ; Mon, 4 May 2020 13:31:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A388A2075B for ; Mon, 4 May 2020 13:31:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DOz20a9e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728439AbgEDNbd (ORCPT ); Mon, 4 May 2020 09:31:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728129AbgEDNba (ORCPT ); Mon, 4 May 2020 09:31:30 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 221EFC061A0E for ; Mon, 4 May 2020 06:31:30 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id d17so20903121wrg.11 for ; Mon, 04 May 2020 06:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=GBAL+MKWIqnHyoVOy+P35kOcjiR8O0DGiJOxd5GbuHI=; b=DOz20a9emF9NfjLS2oOI7JIonVYmaidNQ9gFT+JMQfIGp/lmJLQRO8qyakN4+jF0S3 kIaQ6ByhJfgjSE/QEtXXVNT5LLZxCvYW07eNuxxdX+QW7k7mhIZVlxtqi95CZybBylvU 90kUvZBNwVTDIoHTPpkWHJiI8MjS+vEysb/w05RQ+OGiQWmLrWl2ZfsfJS/DmW0B+ASH hFYVXHhAUBVj5RBnn4O98h4D7Qej2YNaUf6ZW8lkl2G8cfpJNF/w3VI0bcSGjH2l/vgN m+GW3oUIVLFs7uXKvuk67msiy7+UcPZFaWa0Xx0s7FF5VrhcvKmsrbGLdojV3zh+i0DA Vo1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=GBAL+MKWIqnHyoVOy+P35kOcjiR8O0DGiJOxd5GbuHI=; b=HtDBfm4dRqU60MT3pkfJUlLzxQ+Lgj9NnTGf8XCkYAZLphVwDpjGQ+uk8UK12WY+yT YyoqC0FTwi8udgisUjtBnvOZAH2vHG1NnIfUBZOyjwVjQHjM0ALa7UNx2PPzka8LOcNd JZNNk7+/fXBponbp7iqnn3oB9c3gwIrlh1HAGIzfKir7J+p5wkqZ0kfrOlB6kx8ZDbDs QIo2xZZMPaIMTW+5pkistI1lDRjc6FnA4lBxUNNT9VX3a1b99gXIyUPwaQPU7j4qQ3W+ PLvIwjtQmEmGL+BGZAhOMkyuG29RbaLirrMIaFeXdhpNCy7OCCH/v1+8r70mgRgX6AbX MbDg== X-Gm-Message-State: AGi0PubU22yhHgtygAcgWYq+bub+GnLGUFLsG3li5V5Z9Ro+wBP7/qWf +4fSodRIdKtvsNjI5QS6jMVMbmmU X-Google-Smtp-Source: APiQypJnPiwQqvkhL8RwCZPCvTWLwtRDDTShmmtqo6JWTyQJDRJDfJPsQutuClIVxG2DGecjvQ25Ig== X-Received: by 2002:adf:9444:: with SMTP id 62mr15573793wrq.68.1588599088681; Mon, 04 May 2020 06:31:28 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id d7sm18653253wrn.78.2020.05.04.06.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 06:31:28 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 04 May 2020 13:31:22 +0000 Subject: [PATCH 2/6] fixup! Add reftable library Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin Do close the file descriptors to obsolete files before trying to delete them. This is actually required on Windows. Note: this patch is probably a bit heavy-handed, releasing more than necessary (which will then have to be re-read). But it seems to be enough to let t0031 pass on Windows, so it is at least a clue as to what the fix will look like eventually. Signed-off-by: Johannes Schindelin --- reftable/stack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reftable/stack.c b/reftable/stack.c index 2e32f7671c2..3c5f4a43130 100644 --- a/reftable/stack.c +++ b/reftable/stack.c @@ -941,6 +941,10 @@ static int stack_compact_range(struct reftable_stack *st, int first, int last, } have_lock = false; + reftable_merged_table_close(st->merged); + merged_table_clear(st->merged); + reftable_merged_table_free(st->merged); + st->merged = NULL; { char **p = delete_on_success; while (*p) { From patchwork Mon May 4 13:31:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood via GitGitGadget X-Patchwork-Id: 11525987 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C56B515AB for ; Mon, 4 May 2020 13:31:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A189F2078C for ; Mon, 4 May 2020 13:31:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t9cAogDP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728445AbgEDNbd (ORCPT ); Mon, 4 May 2020 09:31:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728417AbgEDNbb (ORCPT ); Mon, 4 May 2020 09:31:31 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAE43C061A0E for ; Mon, 4 May 2020 06:31:30 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id k12so8422196wmj.3 for ; Mon, 04 May 2020 06:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=gl+40ObxAzQ9BUWefXcL7ADB/tskWkmkHMV3sgw61DY=; b=t9cAogDPEj2LnW/RhkYeChf2XqHPMfx7Cbns4/ieijxADrab/T0NGph4dmOSWQc07b cg5CXm0ElIh0Lx76pNoPDFldk6sVDZ9g2pKlQAHJrrgnchMb5uGfuwZvUT/sTnuieU+q K050fzsvQHn5axrhkjBzbKNQKcB+lD5Y67NVA9qDjQMAc8oofiy87w3WPrlxwqUDfIkL XCIgzmij9ivMNxqniWXb6+hIGGR7lMhZ4jvg15/7E1XYGJ3/oPT962NO/fO4NH4+r8k4 ZAETIr3+yhN/blsENVGse5wCGIBq9pXArWml4vEJcNycczqFPQAE9SFzLlViohOODl7M Q3dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=gl+40ObxAzQ9BUWefXcL7ADB/tskWkmkHMV3sgw61DY=; b=Jtu26wLDShKKUwp/wwXrr8EVG8gEJ8647+jLRomT/ASK+1c3VSkPj+SGYlWtC9kDmJ hQwSGKPiOXDgz1vKidEaQ9X5N7DzrU3e6cRVwsz1MpZAhtptn3yQbXi4iVjbb4OwAVOY yjtfrpbior+r/zQ3tQpUmlPUh4JHwYJPLjOsP0kvlYjg0exXiSsRDHskULVs0qV3Jo36 uLmIWHhsLDPgFVgCzi/smCfpoYHG1JrwZxdSLCqJ6XbUkYn8NJCHJHqad9UTGms8x488 8oYAU5cFtSsfYFMlKdTq8krXxo72F0CJqeJbeU1thWoaDX7Q/5jJlws9bzXv0V2o3ev6 iVWA== X-Gm-Message-State: AGi0PuZMRkbNb1z9JgH9W6aBugaThAQciXYUcXsSxsFd2k7HT3d25OyB uu3/GT42Q96wsrBhsYgofebuc5No X-Google-Smtp-Source: APiQypLj6GbwKsSQJIpIxbndv7VTbGR+TgEuadZvoNlrLAmtyY+coiyKwJlBCxK50vb3cKwRm8yXtA== X-Received: by 2002:a1c:66d5:: with SMTP id a204mr14774950wmc.69.1588599089517; Mon, 04 May 2020 06:31:29 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u7sm14985610wmg.41.2020.05.04.06.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 06:31:29 -0700 (PDT) Message-Id: <6f1868a2fe21e59d80a81b837810b09aa86a6838.1588599086.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 04 May 2020 13:31:23 +0000 Subject: [PATCH 3/6] fixup! Add reftable library Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin A `void` function cannot return a value. Signed-off-by: Johannes Schindelin --- reftable/record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reftable/record.c b/reftable/record.c index b0f18f26c55..5f48be1639e 100644 --- a/reftable/record.c +++ b/reftable/record.c @@ -1005,7 +1005,7 @@ int record_decode(struct record rec, struct slice key, byte extra, void record_clear(struct record rec) { - return rec.ops->clear(rec.data); + rec.ops->clear(rec.data); } bool record_is_deletion(struct record rec) From patchwork Mon May 4 13:31:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood via GitGitGadget X-Patchwork-Id: 11525985 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25BD8913 for ; Mon, 4 May 2020 13:31:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E3472078C for ; Mon, 4 May 2020 13:31:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kkz+HC86" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728452AbgEDNbe (ORCPT ); Mon, 4 May 2020 09:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728418AbgEDNbc (ORCPT ); Mon, 4 May 2020 09:31:32 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87874C061A0F for ; Mon, 4 May 2020 06:31:31 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id y24so9079174wma.4 for ; Mon, 04 May 2020 06:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=p9wLXKAFSLFCWoje36n1B+Hg8h4ejYOaBtdMVAqK7n0=; b=Kkz+HC86popgE/fXexF9sEWZiXliI8L1bdfnnpo47bcFIrwAUSpAgqV8LV3wm5WEWs B+LJhTQkKKqZ0vhnN/YknIk//1fcNiw9qB1otaLglq/pywpdPMNKKjvi7mfFqZP+SWGJ 0Gz3qjF5n8MZHEt0HQKV2eB3G7YAJjzyeiYmbvN+klVmQhD+rCTexBM6+lf5g1J4jxjO A+d7ONd82ynjurUog3gOB5U5bGwHbFj5iQVl7POI0y1PtImWZTqepIGyl2YBigePFbvS waxOoncEwaSvtgNzEhPh0fPMQbJBvU+DZkfYS2oBfcIiJFnMLLjuPQnq/deY07ZwPUkJ LRKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=p9wLXKAFSLFCWoje36n1B+Hg8h4ejYOaBtdMVAqK7n0=; b=Cc6Nn903VybS1X3rzW4VbMpC+z57hzld2+3/IuuA8f76En6IqjI1cfkMFW/m88+UrJ cMEwzlT0S983dCi/flc57zzxnkpC0WtVw1A0EPbVaaMwjU/QLU/e6M4/LRtaRZaeLrXN kJcgbrucCLeufyHCL+h7Ekuieoa1Lst7qOGbSNMr/PJ2MhQLva0tat6Ax6DIYVWqplwW msreu8q5chO7FETFDk0hsMOACs+PAf4dGc3+5rsVl+eQ1P5mzbxRkpZxxwHTQ2yf2MJ0 feap9iG1oqvGoWBifXvsRIQoGxzqcEbWBo3QZeOjhA/HckrIaGqY20OGtSc4vAIZVwPI uuWw== X-Gm-Message-State: AGi0PuZpvgE7c+8cIKZCkExigpmYLfcwFFFkIu1SVlxHHcwQ1uXpPesC 04idTUKpSQH8ajjy4zjVsraDTD6k X-Google-Smtp-Source: APiQypLHxB74RtqldCHPmcphKdYN6uFKde0h5vbqQ4+Ighy9IAgBKdkgUNg7w10DaLeXxX6ZfPEHaA== X-Received: by 2002:a7b:cf1a:: with SMTP id l26mr15734029wmg.114.1588599090233; Mon, 04 May 2020 06:31:30 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f83sm13413829wmf.42.2020.05.04.06.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 06:31:29 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 04 May 2020 13:31:24 +0000 Subject: [PATCH 4/6] fixup! Add reftable library Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin `usleep()` is unportable. We need to find a way _not_ to use it. For Visual C, we can use `sleep_millisec()`, but the current design of libreftable seems to be _really_ keen _not_ to depend on anything in libgit.a. Signed-off-by: Johannes Schindelin --- reftable/stack.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reftable/stack.c b/reftable/stack.c index 3c5f4a43130..2d0b831dda1 100644 --- a/reftable/stack.c +++ b/reftable/stack.c @@ -289,7 +289,12 @@ static int reftable_stack_reload_maybe_reuse(struct reftable_stack *st, free_names(names_after); delay = delay + (delay * rand()) / RAND_MAX + 100; +#ifdef _MSC_VER + sleep_millisec(delay/1000); +#else + /* TODO! fix this, `usleep()` is not portable enough for us to use */ usleep(delay); +#endif } return 0; From patchwork Mon May 4 13:31:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood via GitGitGadget X-Patchwork-Id: 11525991 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 709CD913 for ; Mon, 4 May 2020 13:31:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58A0A2075E for ; Mon, 4 May 2020 13:31:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GrmCaqpm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728418AbgEDNbi (ORCPT ); Mon, 4 May 2020 09:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728425AbgEDNbc (ORCPT ); Mon, 4 May 2020 09:31:32 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6076DC061A10 for ; Mon, 4 May 2020 06:31:32 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id h4so8463881wmb.4 for ; Mon, 04 May 2020 06:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=21bNQwZFoud3OvpB7fEuY//SE9GjjgzN5iPbXAGVMt0=; b=GrmCaqpm8cO/wiOAqXRegwYfwf5/V4jB1XK9qNDU/8TRRgdcoGn32L5ispmVLR5SxF OexosNV6Vex6YllEeyJSm7uF+Gu3XWGhkEsa68wAStgaOiIZozdAOAaqXEt7smegGhRD Vksh2cBrQCD0DsZ9bpKGBUDeaPhGu9M4MsceJpB2ybop+n/WzE6vmyU4tZTwrYDIe3je hDWK+7GJ7UevW98mHx/Fc/rh2wFv375obIUjYfKaUhNJev5/QLTB0iJHWNt4+RL7teTY x3UPsEwgaL6mTE8px+pzJctUsYISdDCeNZxt9DPN/bn1D+bXNcuW7n2IeUoG4Ldctvkw fKKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=21bNQwZFoud3OvpB7fEuY//SE9GjjgzN5iPbXAGVMt0=; b=HkK2rr7v1RpRbISBdbVhOjLQ7VYgqEu6RqioucpYtl/OxJl4DXHoFYGAOxYomvuUnw tFaAXWFm+K2yjDzCfqCmLmZ09giUd1WFKi6t7FS0lgL42t3UeGK36/q38xUqfdTaAlvq G4W96RMfC5tfGf/4QqPy/x8yRCY7uMmhtNDa8lTulBIldRFwcmwVEnjOfzMYDzwIjTSd KE12rL5b87l1mroDqsluwzmPqDc7g3rYRYwuE5tAF9Ix9sDIDHywcQh7DKVju2HirE4K xE3xdenLwvggB8f+UGKc0MrUIHU0j2kM3dYh+2e3XIF9iZTHb6Yb4sdbEGqF1Ju8408K wgVw== X-Gm-Message-State: AGi0PuZvNu1YbPx06HYxbIDxvvZdGWxifNgdIXeLmbe7ix3iJeQdaN4Y LuM7J6GRz6XHksLUNmGWc9F/q8yM X-Google-Smtp-Source: APiQypK9ojsrExOWf3qu0tZ5tkI/c1g/yLm3xi06z8+KgyhuK7gHcbRmTSRzUGgQJP37gnfGluVgkQ== X-Received: by 2002:a1c:4603:: with SMTP id t3mr14517492wma.103.1588599091053; Mon, 04 May 2020 06:31:31 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i13sm18279130wro.50.2020.05.04.06.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 06:31:30 -0700 (PDT) Message-Id: <36616471d4afea57ca90825389e896e6c71013e2.1588599086.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 04 May 2020 13:31:25 +0000 Subject: [PATCH 5/6] fixup! Add reftable library Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin Yet another instance of `= {}` initialization. Signed-off-by: Johannes Schindelin --- reftable/stack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reftable/stack.c b/reftable/stack.c index 2d0b831dda1..2f3dfd51861 100644 --- a/reftable/stack.c +++ b/reftable/stack.c @@ -19,7 +19,7 @@ int reftable_new_stack(struct reftable_stack **dest, const char *dir, { struct reftable_stack *p = reftable_calloc(sizeof(struct reftable_stack)); - struct slice list_file_name = {}; + struct slice list_file_name = { 0 }; int err = 0; if (config.hash_id == 0) { @@ -417,7 +417,7 @@ static int reftable_stack_init_addition(struct reftable_addition *add, void reftable_addition_close(struct reftable_addition *add) { int i = 0; - struct slice nm = {}; + struct slice nm = { 0 }; for (i = 0; i < add->new_tables_len; i++) { slice_set_string(&nm, add->stack->list_file); slice_append_string(&nm, "/"); From patchwork Mon May 4 13:31:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood via GitGitGadget X-Patchwork-Id: 11525989 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 798A1913 for ; Mon, 4 May 2020 13:31:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B91A2075E for ; Mon, 4 May 2020 13:31:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CH78vt6S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728476AbgEDNbf (ORCPT ); Mon, 4 May 2020 09:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728418AbgEDNbe (ORCPT ); Mon, 4 May 2020 09:31:34 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A1D1C061A0E for ; Mon, 4 May 2020 06:31:33 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id e16so15830276wra.7 for ; Mon, 04 May 2020 06:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=0y90PgNm96SfrAVrmM5l9tEIZHz3AcvZTUZyDq6Nr8k=; b=CH78vt6S5CMVtiD5d9jTkZjp0oC1nPVDbGX211zBmYpGX6CoiCA6RVrmjNCpsROV3P uxO4zYWNnVZIUpocVpYNd6rdlTqBBgy0mDhYYWBbSbtmQWhLg43XdbLRkgSzwBwSl+er ziTprIJrfhNnS6MeKEExa6852Rq9dpHmFk+LqV2Ij5zXzHg2CpwVt9pC2i91Rl7jCKdj wFTGG4/h/2WOxvpgYNf2GjoaB87m/dKz/OA68OZRvSMpdpsh8oAhZ3s4ZOBVLsEmyKn5 XZsZdgHQZNvTXjEvt/W8VrApvym8NuAnorofQWgY54Gw3tqD3Q+tEZ8zY+3BzR5abd2f 1qmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=0y90PgNm96SfrAVrmM5l9tEIZHz3AcvZTUZyDq6Nr8k=; b=iDsstoF8kMMMMUMb8VZ2XESO8vVn00JcsW+wRBOhwIJSUXMTrkc90c+ROYy5V7iV/M tdqXPqHT6p+de7lI7TRcnnhQW5a/8YYlHkx2pT4F4HnyA3reHnpcqap966SkhW94xKhC yGI+8V6FaQlG3YzCyUQM3TbVS/PLigMUF82MOWH3UzKVEu9pDr8ImfjXwkvsg5v365sF +UeH3e6oifAW1/u23t2hBnFfkzjUnMCOc8nTLqY6WxImJLL0tARF1p5DUCzIQ9LTFaH0 ckF5a5mKvKR2j0ar3cOgGomxldadFBWRYlDcB/8DOCey+445cx6lLo99HD1ryvny7b2/ R53A== X-Gm-Message-State: AGi0PuYPL4g7JvglEtRNCBO3Sv/PBYgcSgPmcTCT/nOO4bc+3wIoY+tm 8cQKMfzxUYQM0UIPepU+69RxZd+i X-Google-Smtp-Source: APiQypKjQd+wXV4gwm8ghqIu5yXLNR7pomV7CAl6z47IQl42UOxT231qxpm2nkjsl3D33Rj/DatHYw== X-Received: by 2002:adf:e90b:: with SMTP id f11mr722897wrm.364.1588599091734; Mon, 04 May 2020 06:31:31 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i129sm14269253wmi.20.2020.05.04.06.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 06:31:31 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 04 May 2020 13:31:26 +0000 Subject: [PATCH 6/6] vcxproj: adjust for the reftable changes Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin This allows Git to be compiled via Visual Studio again after integrating the `hn/reftable` branch. Signed-off-by: Johannes Schindelin --- config.mak.uname | 2 +- contrib/buildsystems/Generators/Vcxproj.pm | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config.mak.uname b/config.mak.uname index 0ab8e009383..8a01a0da3f1 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -700,7 +700,7 @@ vcxproj: # Make .vcxproj files and add them unset QUIET_GEN QUIET_BUILT_IN; \ perl contrib/buildsystems/generate -g Vcxproj - git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj + git add -f git.sln {*,*/lib,*/libreftable,t/helper/*}/*.vcxproj # Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file (echo '' && \ diff --git a/contrib/buildsystems/Generators/Vcxproj.pm b/contrib/buildsystems/Generators/Vcxproj.pm index 5c666f9ac03..33a08d31652 100644 --- a/contrib/buildsystems/Generators/Vcxproj.pm +++ b/contrib/buildsystems/Generators/Vcxproj.pm @@ -77,7 +77,7 @@ sub createProject { my $libs_release = "\n "; my $libs_debug = "\n "; if (!$static_library) { - $libs_release = join(";", sort(grep /^(?!libgit\.lib|xdiff\/lib\.lib|vcs-svn\/lib\.lib)/, @{$$build_structure{"$prefix${name}_LIBS"}})); + $libs_release = join(";", sort(grep /^(?!libgit\.lib|xdiff\/lib\.lib|vcs-svn\/lib\.lib|reftable\/libreftable\.lib)/, @{$$build_structure{"$prefix${name}_LIBS"}})); $libs_debug = $libs_release; $libs_debug =~ s/zlib\.lib/zlibd\.lib/g; $libs_debug =~ s/libcurl\.lib/libcurl-d\.lib/g; @@ -231,6 +231,7 @@ sub createProject { EOM if (!$static_library || $target =~ 'vcs-svn' || $target =~ 'xdiff') { my $uuid_libgit = $$build_structure{"LIBS_libgit_GUID"}; + my $uuid_libreftable = $$build_structure{"LIBS_reftable/libreftable_GUID"}; my $uuid_xdiff_lib = $$build_structure{"LIBS_xdiff/lib_GUID"}; print F << "EOM"; @@ -240,6 +241,14 @@ sub createProject { false EOM + if (!($name =~ /xdiff|libreftable/)) { + print F << "EOM"; + + $uuid_libreftable + false + +EOM + } if (!($name =~ 'xdiff')) { print F << "EOM";