From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 27691 invoked from network); 3 Oct 2022 17:34:39 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 3 Oct 2022 17:34:39 -0000 Received: from mail-il1-f181.google.com ([209.85.166.181]) by 9front; Mon Oct 3 13:33:01 -0400 2022 Received: by mail-il1-f181.google.com with SMTP id a17so5143578ilq.1 for <9front@9front.org>; Mon, 03 Oct 2022 10:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney.org; s=google; h=content-transfer-encoding:mime-version:to:subject:date:from :message-id:from:to:cc:subject:date; bh=XY3BL9sQuUkQ+bktF+OL/e/0J+GPVo1ek0D2qEMqSi8=; b=qDIP/WwaBXjd+Aa4Lpdq9jf8ATzlrcK1qm46akZjWZS7TGUWD/u1+zOahyfWTAENwd ygAlzn+Fi+5pDwnBNzryss8Y4O24gWr2AT3kTg7T4OVF798MRxMvGxe1gmwlZbPI2+zg bnwB7uhMDydnNPX4Vn3VLSkrbQwOfLk5W7A9hWt3qrZu7pbZ9mYKAP1vG4qvR0lfJrfK kGx9q+hz2zEHOAuuzpvhvD3IelJmWAq0XUvbrSf6+tTTCMHbupsLEj9MAv5bY4F/Qbd9 xtu5w5CeldRoqgp8Az/WranxuWmPYvHejMFbL9YccAZIrIzjL9bVzuLyyDUIplNJYHjT JuRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:to:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date; bh=XY3BL9sQuUkQ+bktF+OL/e/0J+GPVo1ek0D2qEMqSi8=; b=ZM9fEvrCW3tl+XXrOdaCmhEVRvq47SXLkn03aZ6+QsBT8FpzkEu//YyOYI9qYIK4N9 eiN3pbcO4cz8Rf1jrayzUXrCAfSCmqsgKOduvYUACk0ezlUgokDJVVDos19tPp59IGQR 7vKAETDcZYCwbkbNJyTZPoe7yg1YEjI4wAPxdR0V9ngZ1VwPdYc2Kv0w1I/xqlxPkGGI S3TNY/Wwlyk3TtmqNfqW1gCZ5hOuNO6c3knkZrXc12eFQ4PwitMGw1PTXWHedZFqTnjq 8bAKg3n/bLOkfo4etxKPGXQ+8jG+zJpJy+2BowHjnO0v2txs7QXcoHLnZE49hXfgIz5O ppkg== X-Gm-Message-State: ACrzQf2JJUITFWR8q+/l4VfG85+BqMG5FNSnQaL2bu7e+BRJPmFxXaZe LmoM+DWODjglcvDoBwEbJP4reB3D6eh04Pvw X-Google-Smtp-Source: AMsMyM7vxNKmqYkRo7ppsB0ERqO/yhkO5nM7BQE0jTlTbAteJOJDscFtKx2BSLAWpP0PgW9kb1Lkww== X-Received: by 2002:a92:6912:0:b0:2ea:fa2e:462d with SMTP id e18-20020a926912000000b002eafa2e462dmr9631301ilc.155.1664818377197; Mon, 03 Oct 2022 10:32:57 -0700 (PDT) Return-Path: Received: from novus ([64.93.113.86]) by smtp.gmail.com with ESMTPSA id j8-20020a0566022cc800b006a153f7e34asm4747041iow.6.2022.10.03.10.32.56 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Oct 2022 10:32:56 -0700 (PDT) Message-ID: <5194B87815F2D38C47BD8A622335E035@mforney.org> From: Michael Forney Date: Mon, 03 Oct 2022 17:33:03 +0000 To: 9front@9front.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: transactional replication method GPU-based optimizer Subject: [9front] [PATCH] git/import: remove removed files from index after commit Reply-To: 9front@9front.org Precedence: bulk Otherwise, they stick around in the index even though they aren't present in the checkout or the commit. This causes various git tools to bail out since they think the tree is dirty. --- diff 606ccb59b11dcdb1bb9235a74cb8b33cc9b81d2c de1315db8636d344f019368e6ae18f447e854773 --- a/sys/src/cmd/git/import +++ b/sys/src/cmd/git/import @@ -96,8 +96,10 @@ } git/walk -fRMA $files if(~ $#nocommit 0){ - if(hash=`{git/save -n $aname -e $amail -N $name -E $email -m $msg -d $date $parents $files}) + if(hash=`{git/save -n $aname -e $amail -N $name -E $email -m $msg -d $date $parents $files}){ echo $hash > $refpath + rm -f .git/index9/removed/$files + } } status='''' '