From nobody Wed Oct 18 15:08:41 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Z4Y28Xfz4x8Xq for ; Wed, 18 Oct 2023 15:09:01 +0000 (UTC) (envelope-from vsasjason@gmail.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9Z4X2Ll8z3dPb for ; Wed, 18 Oct 2023 15:09:00 +0000 (UTC) (envelope-from vsasjason@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="V2VDJzu/"; spf=pass (mx1.freebsd.org: domain of vsasjason@gmail.com designates 2a00:1450:4864:20::532 as permitted sender) smtp.mailfrom=vsasjason@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-53e70b0a218so7184266a12.2 for ; Wed, 18 Oct 2023 08:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697641739; x=1698246539; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=83d7/aTCo3vNROtvnVuuHxULg5r1WWJyYtOmrJh3bjY=; b=V2VDJzu/niDagWdRKNzQSwC32miIA2WAt5K9c8KaEK7ZlAFDYLBe8yIF+zSm8N1Q1D YmFnN2NJU3h81tW7JBZcmtK6hEf8eYzxv1B1hJovqsZqtGSTsJCuZfWNXu94Tbxo1KhT rAJ2+Jbq6BMOheRMOOn4dTs5+w3yz96KbNbDDiMa+S/BHbTFoz0W6jBCoL3Vl45tYJRH zNaQ8lQQq5APcsvW4/p2V0B2sDByuW8aIg+w+zdYk4zZ9BaFSdqjNOhCQvDv1tGhgp/t tkYNkKKZHMJez1ipYSf1jk/+6owHcXwXcpMLLPQoSRXs9ASp7fqWZhEy8KhuhKQX0GXM L+Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697641739; x=1698246539; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=83d7/aTCo3vNROtvnVuuHxULg5r1WWJyYtOmrJh3bjY=; b=RDxdlDMsKbsVWBofIlR+iLzz3Z53z66QDtOLB6xcqbL52G4MMlAk9C+JeK5w/ozMfe SSNEg3XGFTb7MNNmrdXKZ79mTFdMzxBvfv4Q6N08U/hgIEPbCC8N8IsFaj2Y9InoGNg9 yTCI/X9j/bhEahLsCeIZS4Xpmaga2m4sq7SvXmk+MWYfenjpyYnur+geqj8OLy0OEpsf nb2871N/2rlwnTlfl1XCCWf3aaB3DyAJke5GpQwK72SLVkPnZ6l6gpC38oBghdUaEL4F uwvRHAJOi+l8Ka1nPARCL2jUErB358dhO5xv7zPM4rZbYnYmPryqFNaE9GvGdAQ9Z9jg t9zg== X-Gm-Message-State: AOJu0YyxGF6xB2FbIsYbgXCn+5oWFO9vsyHFHbIFQzsxYg2u95FP/Lif yi6dUrvivVR0uy+pyzHopdwxSSsac/kVqePL2+84MPm7tBc= X-Google-Smtp-Source: AGHT+IH1CMxl/k3EJJA8zt4ybn+nkul7OWSEm8BjBFYsYAaNxPXo9HNcYRu+sSZ1NmqxrBP/fjqcLwSRTGQPVGLwJ0w= X-Received: by 2002:a17:907:2907:b0:9c7:4e5d:12bc with SMTP id eq7-20020a170907290700b009c74e5d12bcmr959870ejc.51.1697641738490; Wed, 18 Oct 2023 08:08:58 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Anton Saietskii Date: Wed, 18 Oct 2023 18:08:41 +0300 Message-ID: Subject: Fwd: Right way to make a store local changes to repos To: freebsd-git@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.91 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.912]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::532:from]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org] X-Rspamd-Queue-Id: 4S9Z4X2Ll8z3dPb Hi folks, Here's what I'm doing: * "git clone .../ports.git" * since there are some patches which will never hit main tree (like ccache support in bsd.gecko.mk), "git checkout -b local" * "git pull -r" when I'm on local, hacking, commits, pull again, ... * if I need to make some patch and send it -- I do "git checkout -b " from local and "diff"/"format-patch local" when ready, then "git checkout local" back To summarize: origin/main -> main local == I pull here, store local patches here feature-X == creating from local, I do patches which I send back here But sometimes, though not very often, I need to create a patch from a clean tree (or switch to it for another reason), and here comes the issue: "local" is up to date with "origin/main", but "main" is not. Let's say it's 1000 commits behind (with only ~5 local ones), and those commits changed 4000 files, so when I do "git checkout main" -- my working tree goes far away into the past, I'm getting 4000 writes to files (instead of only 5 which I changed locally). How can I avoid that, keeping local changes at the same time? Thanks in advance. -- wbr, Anton