From patchwork Tue Feb 27 15:09:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Randall S. Becker" X-Patchwork-Id: 13574004 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 119231482E3 for ; Tue, 27 Feb 2024 15:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046601; cv=none; b=d3I7X0EILMcoo/JIZ/pqQE3jtRz5OcAFOczgWkAzkbdql8r/6YS2Tko7Hz/GA4dWvQhTqbPHTw0xjfJpdKWNv3fMnZZN+LrdZqCYQK1qAvhuwgfR7N8aJWt9ER02nQ8zgO+Gi4f2vIJxNA/wH8wWF4PtMrHY0s2eRxRek6ir6Bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046601; c=relaxed/simple; bh=ss8wEPQhUrwBOIq4BkUXzplHoevc/0jYFgkJtUVyNHY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RIneeRXX+WC/eBeg6HdoFbZsEGkwXJdSWzHIHQQJnvI4fM7djavNwSHxfiFCyqrWlyD65SGx4GWWk8MuW5/mrW4/FZ+1Ei6W8d2BgNthWgqKfWTVyHcSQ3KbLUyGdRnxmHnDfKEel0WEeJzEBkr4ZfGG7nSZ+fTDOleHhBnMRg0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NzK4ePm8; arc=none smtp.client-ip=209.85.167.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NzK4ePm8" Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3c1a2f7e302so959702b6e.0 for ; Tue, 27 Feb 2024 07:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709046599; x=1709651399; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lcBb9YUvq+p3EOGxZ9MY3/p4E7NvnPbgKnUHKwVO7NE=; b=NzK4ePm89hN1XBg+WGwRVMzx2EiuiS9QoCvsGvAZYWb/RWsNdMwha+acGdFsJySSem Xm7Qh5tt/kIJk24nfdo4WuB3PoctRqXcvNjUD8dryijjYg96pMQ1hK1EehQmelkSqvqg 0/HTlNae9aFkFDK8itPJuj0rhUQyuzBWuW3Etmzti+xQP3jrUEMOzyECey3lc6O2bn+b Zj1bXzW8Tffg1vCxAFvqZNa6eFgCau65LSo3o1nM1F4FfDGJSlcpNCrC55sVlJ174z+y VDzwg/EqSKYOePSQBFI1W0TM0MkG9+OsHaAa+fxH4YCzDYG8V3+j7pCE+hlxOIqpx3SE s0oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709046599; x=1709651399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lcBb9YUvq+p3EOGxZ9MY3/p4E7NvnPbgKnUHKwVO7NE=; b=TIdx9XPwH5+/Uz3SxeyRfzCzAcySeZn+J0SgNFmAXeeBnCZECyrXRFXSWMaDlbYkLI 1c39Cy3zOt+oW/KAOEVpLgROFJjWIBlPo4MYyotXCEmj6brtS7vW0+cT9p+3n+DPI5vs 1h+ksA8l3T0sAYMoXWN+bxPUgfWPcXTZTM6++aePFsP0k0S24HfXPQYNnBs2CRGeQ992 ZuJsNgo2X9HyUxT+ci0WAgtz57YQyFWJuYgyDAv6JuEIFp3l8EDQ73Q3YdMZQWUDA6+L +Ym0fcsT9EIFn0cEJTMJUXCxgD7jljCF7CmAUvXswJmisIRTnrsN1asVOA1fTSnt/ge5 kg9A== X-Gm-Message-State: AOJu0YyLDO5BwCs6pPlej1DlesQtPtQortdfz+y1QcK3ISGfEBI24m0f 53Qf5vPke8QrmftMIAOVH1DuJgwmikxarFmLwp7Bsm3PZlyUYb9jmM+Coico X-Google-Smtp-Source: AGHT+IH7llTEU0YPXxFZpLaBdDWguglIBqrlpHZZZ/5PR9gP6krTsPV0Z/w5JrtI1J70dDOKwMvyHg== X-Received: by 2002:a05:6808:2013:b0:3c1:acc3:99ce with SMTP id q19-20020a056808201300b003c1acc399cemr2620210oiw.37.1709046598841; Tue, 27 Feb 2024 07:09:58 -0800 (PST) Received: from localhost.localdomain ([2607:fea8:3fa9:4200:ad2d:24a1:4eaf:e903]) by smtp.gmail.com with ESMTPSA id t19-20020a05622a181300b0042e56fb8e0bsm3618149qtc.93.2024.02.27.07.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:09:58 -0800 (PST) From: "Randall S. Becker" X-Google-Original-From: "Randall S. Becker" To: git@vger.kernel.org Cc: "Randall S. Becker" Subject: [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors. Date: Tue, 27 Feb 2024 10:09:32 -0500 Message-ID: <20240227150934.7950-2-randall.becker@nexbridge.ca> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240227150934.7950-1-randall.becker@nexbridge.ca> References: <20240227150934.7950-1-randall.becker@nexbridge.ca> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Randall S. Becker" This change is required because some platforms do not support file writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the maximum single I/O size possible for the destination device. The result of write_in_full() is also passed to the caller, which was previously ignored. Signed-off-by: Randall S. Becker --- builtin/repack.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index ede36328a3..932d24c60b 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -307,6 +307,7 @@ static int write_oid(const struct object_id *oid, struct packed_git *pack UNUSED, uint32_t pos UNUSED, void *data) { + int err; struct child_process *cmd = data; if (cmd->in == -1) { @@ -314,8 +315,12 @@ static int write_oid(const struct object_id *oid, die(_("could not start pack-objects to repack promisor objects")); } - xwrite(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz); - xwrite(cmd->in, "\n", 1); + err = write_in_full(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz); + if (err <= 0) + return err; + err = write_in_full(cmd->in, "\n", 1); + if (err <= 0) + return err; return 0; } From patchwork Tue Feb 27 15:09:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Randall S. Becker" X-Patchwork-Id: 13574005 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B50F1482F1 for ; Tue, 27 Feb 2024 15:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046602; cv=none; b=exiiS1bzhqoVqt6DcvNCs3JxIL1gh4Iq0d5pqvh1DeIiyq3evVa2XTL49E2XPevPfDQuvB37zgerNxzaCT8qhI7RTF4IugdiRvpKac2DoKrPm8ip/zdnwddJ/I9Wj4v+RJwWAyVLOpIXTtQfLUrKNYtcRirnKYXa8inXrsN5cNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046602; c=relaxed/simple; bh=2uWA2uXeWzHsh13/MOYuUXhLONktCkJhJ4yJvsCexhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jSnlGCp5EyjGCl+DC2ISDOK/O9gM6206d4rjH3j+dbqjvQ8FE1/zrp5Zuvmy30SBoiraRX4FOngeVszx6MashiutNNv4qeZooMH8lfSaFXrsRjU8IBJiVRjmlL3qUEeXCjY5itT/Laobr8cxjyRtIBSbV06j0CU88S8+m6m9/Dc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eb/HUfO1; arc=none smtp.client-ip=209.85.222.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eb/HUfO1" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-787cfbc55beso142129085a.1 for ; Tue, 27 Feb 2024 07:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709046600; x=1709651400; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6JKroW3KWW2sMO4OM8NPrJeitdYl/x2+h8vyVpo3a4I=; b=eb/HUfO1ljt5ZGO8fhFNHqAWBuFGXV3/Sch5BXZfwmKT7bwEYAvQbLzE9Dqc2MNBEL kIqAad9boVlGUIkHiW4+B0LWpEvCU/x5dPQgUdl3LSxKerjnfltFAu/0HplZ2F9HmXWP GBuK5cYNdr40yTxyrX1CSE8IIoIsI80BStZgG8lP7Njixpj4lmKw63AJhAVHaj9ahek0 7ZWTyS73Is3om8B6tTO4vZMPiuBZzpqHwndnj/qUqDtFfjtVYeKxn7yG94ZeHiMx4QSu 08RajR9YqGy+aHqkcpVNbxbQsxCbu6v2NoQI+kqsB2YEAFSir7jYR5s0vaHrv2M89vYN sbEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709046600; x=1709651400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6JKroW3KWW2sMO4OM8NPrJeitdYl/x2+h8vyVpo3a4I=; b=F1Eah8jREw77joM8QAkpRyJ7z8gYzJiuX5rPDcRKPaynFffj9DsFCs7CvFqyotX6FA rv9yHMF9sN8duwOwwsVJCktkOMJtvd2l10DkPwozYRdZDYuP7iAldCDU0B46F8v4dDjR nItXAz3dBnXtkhKvsJVpgifN4rRZIlHh/hn4mph+d2GAOMrM4cDvfPXalWZxcZSIsvL4 /Ml6zWRO3E4hjpANy/YgVo1LwiAvhG+R/wXeMs74FNuSqB1RMAzsyojw6T+M/pviMNO8 UAdIdF/EYsIjk4Ug9Yh/MV0K7l07h95cxdpO6LqekWFJlLc69PpH2n7jEWwYQqqRmu+Q PhbA== X-Gm-Message-State: AOJu0YwtwqLtcotFxyzBsrH4GGlff3QLjDvE2yWjzWr2Ja2fcLPyJPoL 42h/PiYkOYOIAuB6VLYIK6I7EWaMOFp1H+Mzc4Gwxi16wLuSzke1aA2UoVGF X-Google-Smtp-Source: AGHT+IEnR5rBnuuWlD7bDf3aRIoD7L9mgQkETfg9WTJ8aaaVzcsWzqR7tI7JRISYRV2CW8rKkiZcGg== X-Received: by 2002:ac8:5803:0:b0:42e:87ad:9237 with SMTP id g3-20020ac85803000000b0042e87ad9237mr6718449qtg.48.1709046599750; Tue, 27 Feb 2024 07:09:59 -0800 (PST) Received: from localhost.localdomain ([2607:fea8:3fa9:4200:ad2d:24a1:4eaf:e903]) by smtp.gmail.com with ESMTPSA id t19-20020a05622a181300b0042e56fb8e0bsm3618149qtc.93.2024.02.27.07.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:09:59 -0800 (PST) From: "Randall S. Becker" X-Google-Original-From: "Randall S. Becker" To: git@vger.kernel.org Cc: "Randall S. Becker" Subject: [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full. Date: Tue, 27 Feb 2024 10:09:33 -0500 Message-ID: <20240227150934.7950-3-randall.becker@nexbridge.ca> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240227150934.7950-1-randall.becker@nexbridge.ca> References: <20240227150934.7950-1-randall.becker@nexbridge.ca> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Randall S. Becker" This change is required because some platforms do not support file writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the maximum single I/O size possible for the destination device. Signed-off-by: Randall S. Becker --- builtin/receive-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index db65607485..4277c63d08 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -456,7 +456,7 @@ static void report_message(const char *prefix, const char *err, va_list params) if (use_sideband) send_sideband(1, 2, msg, sz, use_sideband); else - xwrite(2, msg, sz); + write_in_full(2, msg, sz); } __attribute__((format (printf, 1, 2))) From patchwork Tue Feb 27 15:09:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Randall S. Becker" X-Patchwork-Id: 13574006 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0EA8148308 for ; Tue, 27 Feb 2024 15:10:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046603; cv=none; b=Imx5dApPP4zBVk3Px3mJZzclI+IyWrQHoguEKUc5R/bJIjzsl09G0QrB3rYGkRB/Fi/qPEHWZuH2s5z6QppH3Hpx4QrjaH2xYijPWfX5VUY4eCpS0IUSrEo7fHMMgTcBfoi+30+amdLro+vcst8nK7qsNc/jvXrY5dkSTv5JjdI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046603; c=relaxed/simple; bh=Mje2hWwfPchtJSad1nkosPCApdna/QPnT43z3Z4CJxE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K9Tm6G65CWxQbDM1JlK4bZMZqKcAdbRYcSXp6MToZ08mm+f2Mqzrp0T/sKQD+m8fLiQwxDEUckMoosl1VmjrGM+bqw3VHWyUtMdYS/J5MJqteYBZIt0i5CQ5yLHxa2YuRkXsQhBZCbdzTVv0uIdFMAcrJiRetutZku46MO+YQyY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MUc4gwvI; arc=none smtp.client-ip=209.85.160.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MUc4gwvI" Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-42e848fc6f6so15577341cf.2 for ; Tue, 27 Feb 2024 07:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709046600; x=1709651400; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BbYEKOjMd0n/174MA33Qo13M6pFhrlNqbXxEHbUQe2A=; b=MUc4gwvILOEgwB2p3vnBFwWpC90yo526x2xHTqm+WQec7qSOcGEGMz9nMq9SI8lEve ShqzSSX0+tKjpCrqlUkqaR7HviyB8AHTf0d/+0HxuVJe8jtDRnFyPBcLs4eWSK/CEaki 1jgqknb0cju1q2oN1yuLlwlk8Bk3L/KxoXVu43Cs11/jnQZKKXcLxh2KR2EL+lPFZEKL 3syIDrpq3VJZCnazr/fKHcrZXsqZhbqGDEUzhJiXlW8Mt8B2zsBHO+0ygxDqXBnEKmQ5 HgDIfsIVS77H0hMvvewJG1h+JIDfgHIe+pPspXtLHQOliW+QnPCKPefuTNHb7ksG0I3M m5Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709046600; x=1709651400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BbYEKOjMd0n/174MA33Qo13M6pFhrlNqbXxEHbUQe2A=; b=XegxvqWo/GyAZ/n6tvVkQAyMyfNEcOG/epdryZf6O/WDKESGdYNQRVkXkewu18iY/E A5hUbLTDIeA4La3WB7NaWRCliseV1ePD9WCSRqGNKNwjMn5WGYnUKLjFOQ4eH1nTrU+J p6JhrQwfb6/tYGnOaX/DQ2A9Pj+FacdNPxVBYiavFWJ4mLjvCgfkcDTSPmbgbafSBnhd froXRMH9Mo/GY8H7xQfFBV0ZQBEWVjVRX8y3k8s/1Rm4ScSw7UWwpQJpG2SZrb1rPPLo /0W5KSJ/Vi42b6ghy0J0691RtTrWTSpPkJ6eUZSJIZREvAiGnf1raB3rLk5xHnfx3br9 CfPA== X-Gm-Message-State: AOJu0Yy0EwZ5j86IYwls8YOW55dO/UF3pLs62lp8stfv/cLLQoihRclv g7PvdQaiOVrVi9q/ujzRxpi0OZL3Y5SyvnfBniP0DMVQrmGsT38Tl7Vc8NOZ X-Google-Smtp-Source: AGHT+IH0JHNlPIaid8HoJ0+IMtNYHazsb/cCuKjyf5YP2hgPo3fR755c61OXFO9+t4ggk3Ll9VjNag== X-Received: by 2002:a05:622a:cb:b0:42e:a69f:aa9f with SMTP id p11-20020a05622a00cb00b0042ea69faa9fmr492125qtw.65.1709046600484; Tue, 27 Feb 2024 07:10:00 -0800 (PST) Received: from localhost.localdomain ([2607:fea8:3fa9:4200:ad2d:24a1:4eaf:e903]) by smtp.gmail.com with ESMTPSA id t19-20020a05622a181300b0042e56fb8e0bsm3618149qtc.93.2024.02.27.07.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:10:00 -0800 (PST) From: "Randall S. Becker" X-Google-Original-From: "Randall S. Becker" To: git@vger.kernel.org Cc: "Randall S. Becker" Subject: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation. Date: Tue, 27 Feb 2024 10:09:34 -0500 Message-ID: <20240227150934.7950-4-randall.becker@nexbridge.ca> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240227150934.7950-1-randall.becker@nexbridge.ca> References: <20240227150934.7950-1-randall.becker@nexbridge.ca> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Randall S. Becker" This change is required because some platforms do not support file writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the maximum single I/O size possible for the destination device if the supplied len value exceeds the supported value. Replacing xwrite with write_in_full corrects this problem. Future optimisations could remove the loop in favour of just calling write_in_full. Signed-off-by: Randall S. Becker --- builtin/unpack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index e0a701f2b3..6935c4574e 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED) /* Write the last part of the buffer to stdout */ while (len) { - int ret = xwrite(1, buffer + offset, len); + int ret = write_in_full(1, buffer + offset, len); if (ret <= 0) break; len -= ret;