Re: [PATCH] better git-submodule status output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/7/08, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
>  On Mon, 7 Jul 2008, Avery Pennarun wrote:
>  > Hmm... how does doing a fetch wreck your state?
>
> It updates the tracking branches.  And guess what I use the tracking
>  branches for?  Yes, to track other people's changes.
>
>  It would wreck my state.
>
>  Anyway, fetch is wrong, wrong, wrong, if all you want to do is see the
>  _state_ of your submodule.
>
>  If that state is that the superproject has a commit that the submodule
>  knows nothing about, then that is _exactly_ what needs to be reported.
>
>  Don't play cute games,

Hmm, somehow we're not understanding each other here.

I think we have already agreed that "git status" and/or "git submodule
status" are obviously not good times to be fetching things.  And a
perfectly valid "submodule status" is that your submodule can't be
updated because you're missing some objects and should fetch.

What I suggested was to recursively do "git fetch" in submodules at
the time of doing fetch or pull operations on the supermodule, in
order to help ensure that all necessary objects have been fetched.  To
reference an earlier email of yours, this would *improve* git's
usability for people who try to use it on a plane, by reducing the
number of cases where they have forgotten to fetch.

(1) Do you think fetching missing submodule objects when fetching the
supermodule is a bad idea, or a good one?  (2) On top of that, do you
think updating the submodule's refs when I do "git fetch" in the
supermodule is a good one (it seems you think it don't)?  (3) And on
top of that, if either of those is a good idea, should it be a config
option?  (4) And should that option default on or off?

In case anyone cares about my preferences, I think (1) makes sense,
(2) is probably too dangerous, (3) should be yes, or perhaps people
should be taught to run "git submodule fetch" to fetch submodules and
leave "git fetch" alone, and (4) if it's configurable, it should do it
by default, because in 99% of situations I can imagine, fetching a
supermodule and not fetching its referenced submodule commit will not
be useful behaviour.

Thanks,

Avery
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux