git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 0/1] push: introduce '--heads' option

From
Teng Long <dyroneteng@gmail.com>
Date
Dec 15, 2022, 12:27 UTC
Message-ID
<20221215122719.11996-1-tenglong.tl@alibaba-inc.com>
In-Reply-To
<xmqqilippgp2.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> My knee-jerk reaction is to avoid "--heads" and instead use
> "--branches", if this is about pushing all local branches.  The
> option "--heads" may still remain in some commands added to the
> system in the earliest part of our history, but soon we started
> to use "branch" over "head", as it is a more commonly used word.

OK, that's true, I just misled by some existing '--heads' in other commands.

> How should it interact with --follow-tags?  Just as if you listed
> all local branch names on the command line?  I.e. is

Actually I didn't try '--follow-tags' before, but the documentation about it is a ittle hard to understand for me on first reading. Then, I think it supports to use as negative '--[no-]follow-tags' but not marked in the git-push.txt documentation.

Show 5 quoted lines
>     git push $URL --heads
>
> equivalent to the long-hand
>
>     git push $URL $(git for-each-ref --format='%(refname)' refs/heads/\*)

git push $URL $(git for-each-ref --format='%(refname)' refs/heads/\*\*) maybe to recursivly subdirectories matching?

Actually I didn't get why you represent this, maybe try to let's us know there is another way we could make it as the same result?

Show 5 quoted lines
> and because of that, does
>
>     git push $URL --any --other --option --heads
>
> behave identically to the long-hand with these other options added?

I think you concerned about the compatibility with the interaction of the options, if so, I think a direct way is to keep --all and --heads both have the some behavior when interact with other options, a little confused why we have to use the long-hand to do that.

By the way, it seems like there are no specify tests for '--all', maybe we can add some tests about '--all' first if this RFC patch is worthy to continue.

Thanks.
Previous: Junio C HamanoNext: Teng Long
Message 11 of 18 in “push: introduce '--heads' option”
  1. 0/1 push: introduce '--heads' optionTeng Long, Dec 5, 2022
  2. 1/1 push: introduce '--heads' optionTeng Long, Dec 5, 2022
  3. ZheNing HuDec 5, 2022
  4. Teng LongDec 6, 2022
  5. Felipe ContrerasApr 28, 2023
  6. Teng LongApr 30, 2023
  7. 0/1 push: introduce '--branches' optionTeng Long, May 6, 2023
  8. 1/1 push: introduce '--branches' optionTeng Long, May 6, 2023
  9. 0/1 push: introduce '--branches' optionTeng Long, May 6, 2023
  10. Junio C HamanoDec 5, 2022
  11. Teng LongDec 15, 2022
  12. Teng LongApr 28, 2023
  13. Junio C HamanoApr 28, 2023
  14. Teng LongApr 30, 2023
  15. 0/1 push: introduce '--branches' optionTeng Long, May 6, 2023
  16. 1/1 push: introduce '--branches' optionTeng Long, May 6, 2023
  17. Junio C HamanoMay 6, 2023
  18. Teng LongMay 7, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.