9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Paul Lalonde <paul.a.lalonde@gmail.com>
To: 9fans <9fans@9fans.net>, Ori Bernstein <ori@eigenstate.org>
Subject: Re: [9fans] Re: Git usage
Date: Sun, 12 Jan 2025 14:08:53 -0800	[thread overview]
Message-ID: <CA+POUVgbxn1P0=Hi=0FwFrR2mdWh++OCWWY-w930B5yyp-7Wag@mail.gmail.com> (raw)
In-Reply-To: <D70FHL0MM8S9.2DLTD0KH6G3IJ@pixelhero.dev>

[-- Attachment #1: Type: text/plain, Size: 1707 bytes --]

Validating every file as you describe makes sense if there is no common
ancestor.
In the case of trees with a common ancestor, however, only files changed in
subsequent commits should require checking.
I went digging around git/fs and I don't see a way to get the files
associated with a given commit.
@Ori Bernstein <ori@eigenstate.org> Is there a tool in 9git that lets me
list which files were changed at a given commit hash?

Paul

On Sun, Jan 12, 2025 at 1:58 PM Noam Preil <noam@pixelhero.dev> wrote:

> git/merge might work a bit faster, but making it smarter was on the list
> of things I wanted to get to right before my 9front laptop broke :P
>
> Both merge and rebase, IIRC, will try comparing every path on either
> side (or all three sides for 3-way merges, rather), even if e.g. the
> parent directory doesn't exist.
>
> So if you do e.g.
>
> % mkdir /tmp/foo
> % cd /tmp/foo
> % git/init
> % touch foo
> % git/add foo
> % git/commit -m 'initial commit' foo
> % git/branch -nb front tmp
> # Copy the entire Go tree in here
> % clone -v /tmp/go/* .
> % git/add go
> % git/commit -m 'add go' go
> % git/branch front
> 
> Any merge you do between these two branchs will check EVERY PATH IN THE
> GO TREE, even though go only exists on one side.
> 
> What we basically need is for diff3 or merge to take in the roots, and
> walk the tree intelligently, writing off entire directories rather than
> attempting every child.
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc30944502958e1a0-Mf7d5e4599a717ca072cb06ed
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 3214 bytes --]

  reply	other threads:[~2025-01-12 22:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-12 19:55 [9fans] " Paul Lalonde
2025-01-12 20:10 ` Ron Minnich
2025-01-12 20:44   ` Christopher Nielsen
2025-01-12 21:06 ` [9fans] " Paul Lalonde
2025-01-12 21:55   ` Noam Preil
2025-01-12 22:08     ` Paul Lalonde [this message]
2025-01-12 22:17       ` Noam Preil
2025-01-12 22:50         ` Paul Lalonde
2025-01-13  0:07           ` ori
2025-01-13  0:14             ` Paul Lalonde
2025-01-13  0:34               ` ori
2025-01-13  0:32   ` ori
2025-01-13  2:22     ` Paul Lalonde
2025-01-13  5:55       ` ori
2025-01-13  5:59       ` ori
2025-01-13  7:46       ` Michael Forney
2025-01-13  0:17 ` [9fans] " ori

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='CA+POUVgbxn1P0=Hi=0FwFrR2mdWh++OCWWY-w930B5yyp-7Wag@mail.gmail.com' \
    --to=paul.a.lalonde@gmail.com \
    --cc=9fans@9fans.net \
    --cc=ori@eigenstate.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).