Download raw body.
tog: worktree vs. -r repo
Stefan Sperling: > > What purpose does got_worktree_open() serve in the -r case? > > Maybe just skip got_worktree_open() completely, so worktree==NULL? > > Yes, you're right. The worktree is opened in order to lock it, but > if we're never going to do anything with it, we might as well not > open it in the first place. Is this better? > > diff refs/heads/main refs/heads/togrflag Yes, that's what I had in mind. I have only cosmetic comments: * In cmd_diff(), got_worktree_open() can also move into the "if (repo_path == NULL)" branch. * Throughout, the preceding getcwd() can also move into the "if (repo_path == NULL)" branch. -- Christian "naddy" Weisgerber naddy@mips.inka.de
tog: worktree vs. -r repo