git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git fetch <remote> <branch> behaves weirdely when run in a worktree
Date: Mon, 24 Sep 2018 17:17:00 +0200	[thread overview]
Message-ID: <CACsJy8D_37U+4sb7tb8KqGM=_3CRrTaZX1ZE9VqDVrYJT-AhnA@mail.gmail.com> (raw)
In-Reply-To: <90301874969f7b11f33e504500c150a25d722ff8.camel@gmail.com>

On Sun, Sep 23, 2018 at 10:19 PM Kaartic Sivaraam
<kaartic.sivaraam@gmail.com> wrote:
>
> Hi,
>
> I was actually trying to automae the building and installation of Git
> source code to reduce my burden. I tried to automate it with the help
> of a script that runs daily via cron and a separate worktree used only
> by the build script.y run
>
> The script typically fetches new changes for the next branch by running
> the following in the build worktree (which is not the main worktree):
>
>    $ git fetch origin next
>
> I thought that would result in FETCH_HEAD pointing to the latest
> changes for origin/next if the command succeeded.
>
> Unfortunately, it seems to be behaving weirdely when run in a worktree.
> It sems to be behaving as if I ran 'git fetch origin'. To add to that
> confusion when I run
> ...
>    Why is this weirdness happening when run in other worktrees?
>
>    Why isn't 'git fetch <remote> <branch> not fetching the changes for
>    just the specified branch?
>
>    Am I missing something?

Yes, some bugs. It behaves correctly for me. There must be something
strange that triggers this. What's your "git worktree list" (iow
anything strange there, duplicate worktrees perhaps)? Also please try
"git fetch" again with GIT_TRACE=1 and GIT_TRACE_SETUP=1. Hopefully we
could catch something with that.
-- 
Duy

  reply	other threads:[~2018-09-24 15:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-23 20:09 git fetch <remote> <branch> behaves weirdely when run in a worktree Kaartic Sivaraam
2018-09-24 15:17 ` Duy Nguyen [this message]
2018-09-25 18:44   ` Kaartic Sivaraam
2018-09-25 21:40     ` Junio C Hamano
2018-09-26  3:37       ` Kaartic Sivaraam
2018-09-26  4:46 ` Kaartic Sivaraam
2018-09-26 15:24   ` Duy Nguyen
2018-09-26 16:09     ` Duy Nguyen
2018-09-26 17:05       ` Junio C Hamano
2018-10-02 18:43         ` Kaartic Sivaraam
2018-10-04  6:54           ` Kaartic Sivaraam
2018-10-04  7:00             ` Duy Nguyen

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACsJy8D_37U+4sb7tb8KqGM=_3CRrTaZX1ZE9VqDVrYJT-AhnA@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kaartic.sivaraam@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).