* Re: git branch -a prefixes origin/ branches with remotes/
@ 2010-03-31 17:45 layer
0 siblings, 0 replies; 8+ messages in thread
From: layer @ 2010-03-31 17:45 UTC (permalink / raw)
To: git
I should add that the scripts are merely testing for the existence of
remote tracking branches in the local repo. If there's a better way
to do this, I'm game. Thanks.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* git branch -a prefixes origin/ branches with remotes/
@ 2010-03-31 17:26 layer
2010-03-31 17:52 ` Jakub Narebski
2010-03-31 21:59 ` Jay Soffian
0 siblings, 2 replies; 8+ messages in thread
From: layer @ 2010-03-31 17:26 UTC (permalink / raw)
To: git
In git 1.6.6.1 & 1.6.3.3, "git branch -a" output is like this
* master
remotes/origin/foo
...
instead of like this for 1.6.1.3
* master
origin/foo
...
Is this a feature or bug? I searched the mailing list archives and
announcements couldn't find any reference to this change.
This is important to me because I use the output of "git branch -a" in
scripts.
Thanks.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git branch -a prefixes origin/ branches with remotes/
2010-03-31 17:26 layer
@ 2010-03-31 17:52 ` Jakub Narebski
2010-03-31 21:59 ` Jay Soffian
1 sibling, 0 replies; 8+ messages in thread
From: Jakub Narebski @ 2010-03-31 17:52 UTC (permalink / raw)
To: layer; +Cc: git
layer <layer@known.net> writes:
> In git 1.6.6.1 & 1.6.3.3, "git branch -a" output is like this
>
> * master
> remotes/origin/foo
> ...
>
> instead of like this for 1.6.1.3
>
> * master
> origin/foo
> ...
>
>
> Is this a feature or bug? I searched the mailing list archives and
> announcements couldn't find any reference to this change.
>
> This is important to me because I use the output of "git branch -a" in
> scripts.
Don't use git-branch output in scripts; git-branch is porcelain and
its output is meant for end user and is subject to change! Use either
git-show-ref, or powerfull git-for-each-ref.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git branch -a prefixes origin/ branches with remotes/
2010-03-31 17:26 layer
2010-03-31 17:52 ` Jakub Narebski
@ 2010-03-31 21:59 ` Jay Soffian
2010-03-31 22:03 ` Jeff King
2010-03-31 22:04 ` Andreas Schwab
1 sibling, 2 replies; 8+ messages in thread
From: Jay Soffian @ 2010-03-31 21:59 UTC (permalink / raw)
To: layer; +Cc: git
On Wed, Mar 31, 2010 at 1:26 PM, layer <layer@known.net> wrote:
> In git 1.6.6.1 & 1.6.3.3, "git branch -a" output is like this
>
> * master
> remotes/origin/foo
> ...
>
> instead of like this for 1.6.1.3
>
> * master
> origin/foo
> ...
>
> Is this a feature or bug? I searched the mailing list archives and
> announcements couldn't find any reference to this change.
Feature. Introduced in 1.6.3:
http://article.gmane.org/gmane.comp.version-control.git/116404
See "builtin-branch: improve output when displaying remote branches"
> This is important to me because I use the output of "git branch -a" in
> scripts.
>
> I should add that the scripts are merely testing for the existence of
> remote tracking branches in the local repo. If there's a better way
> to do this, I'm game. Thanks.
git branch is a so-called porcelain command, and as you've now been
bitten by, the output of porcelain's is subject to change.
You probably want git for-each-ref.
Aside, the only list of plumbing vs porcelain commands I'm aware of is
in the bash-completion script under contrib. See
__git_list_porcelain_commands here:
http://git.kernel.org/?p=git/git.git;a=blob;f=contrib/completion/git-completion.bash
Those are generally commands whose output you do not want to be
parsing. All the other git commands installed under git-core are
mostly plumbing upon which you can build additional functionality.
(Note to git list: there should be a man page that has a single-line
summary of each command and states whether the command is plumbing or
porcelain. Maybe there is and I just don't know it.)
j.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git branch -a prefixes origin/ branches with remotes/
2010-03-31 21:59 ` Jay Soffian
@ 2010-03-31 22:03 ` Jeff King
2010-03-31 22:04 ` Andreas Schwab
1 sibling, 0 replies; 8+ messages in thread
From: Jeff King @ 2010-03-31 22:03 UTC (permalink / raw)
To: Jay Soffian; +Cc: layer, git
On Wed, Mar 31, 2010 at 05:59:49PM -0400, Jay Soffian wrote:
> Aside, the only list of plumbing vs porcelain commands I'm aware of is
> in the bash-completion script under contrib. See
> __git_list_porcelain_commands here:
>
> http://git.kernel.org/?p=git/git.git;a=blob;f=contrib/completion/git-completion.bash
Try command-list.txt, which is meant to be authoritative.
> (Note to git list: there should be a man page that has a single-line
> summary of each command and states whether the command is plumbing or
> porcelain. Maybe there is and I just don't know it.)
Try "man git", which splits the command list by porcelain and plumbing
(and further by subcategory).
-Peff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git branch -a prefixes origin/ branches with remotes/
2010-03-31 21:59 ` Jay Soffian
2010-03-31 22:03 ` Jeff King
@ 2010-03-31 22:04 ` Andreas Schwab
2010-03-31 22:09 ` Jay Soffian
1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2010-03-31 22:04 UTC (permalink / raw)
To: Jay Soffian; +Cc: layer, git
Jay Soffian <jaysoffian@gmail.com> writes:
> (Note to git list: there should be a man page that has a single-line
> summary of each command and states whether the command is plumbing or
> porcelain. Maybe there is and I just don't know it.)
git(1)
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git branch -a prefixes origin/ branches with remotes/
2010-03-31 22:04 ` Andreas Schwab
@ 2010-03-31 22:09 ` Jay Soffian
2010-04-01 9:17 ` Michael J Gruber
0 siblings, 1 reply; 8+ messages in thread
From: Jay Soffian @ 2010-03-31 22:09 UTC (permalink / raw)
To: Andreas Schwab; +Cc: layer, git
On Wed, Mar 31, 2010 at 6:04 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Jay Soffian <jaysoffian@gmail.com> writes:
>
>> (Note to git list: there should be a man page that has a single-line
>> summary of each command and states whether the command is plumbing or
>> porcelain. Maybe there is and I just don't know it.)
>
> git(1)
Yes, I'm an idiot. Anyone else wanna pile on? :-)
j.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git branch -a prefixes origin/ branches with remotes/
2010-03-31 22:09 ` Jay Soffian
@ 2010-04-01 9:17 ` Michael J Gruber
0 siblings, 0 replies; 8+ messages in thread
From: Michael J Gruber @ 2010-04-01 9:17 UTC (permalink / raw)
To: Jay Soffian; +Cc: Andreas Schwab, layer, git
Jay Soffian venit, vidit, dixit 01.04.2010 00:09:
> On Wed, Mar 31, 2010 at 6:04 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Jay Soffian <jaysoffian@gmail.com> writes:
>>
>>> (Note to git list: there should be a man page that has a single-line
>>> summary of each command and states whether the command is plumbing or
>>> porcelain. Maybe there is and I just don't know it.)
>>
>> git(1)
>
> Yes, I'm an idiot. Anyone else wanna pile on? :-)
Just blame it on April fool's day, you fooled everyone who took your
remark seriously ;)
Michael
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-01 9:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 17:45 git branch -a prefixes origin/ branches with remotes/ layer
-- strict thread matches above, loose matches on Subject: below --
2010-03-31 17:26 layer
2010-03-31 17:52 ` Jakub Narebski
2010-03-31 21:59 ` Jay Soffian
2010-03-31 22:03 ` Jeff King
2010-03-31 22:04 ` Andreas Schwab
2010-03-31 22:09 ` Jay Soffian
2010-04-01 9:17 ` Michael J Gruber
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).