On Wed, May 12, 2010 at 3:35 PM, Jeff King <peff@xxxxxxxx> wrote: > On Thu, May 06, 2010 at 02:24:41PM +0200, Knittl wrote: > >> - initial commit is also printed when there is tracking information >> (i still haven't managed to create a situation like that. `git branch >> oldmaster; rm .git/refs/heads/master; git branch master --set-upstream >> oldmaster` will reset branch master to oldmaster (a bug?)) > > Try: > > git branch oldmaster > rm .git/refs/heads/master > git config branch.master.remote . > git config branch.master.merge refs/heads/oldmaster > > That being said, I still get "Initial commit on master". I think that > stat_tracking_branch just gives up if the branch doesn't exist (which > does make some sense). So in practice, I think your original and this > one actually behave the same (sorry, I know that changing it was my > suggestion). > > And no, the "--set-upstream" behavior is not a bug. At least not > according to the documentation. ;) yep, that's what i discovered too—but i don't care if this condition is 3 lines up or down. if stat_tracking_branch decides it will work for initial commits, then this code will do the expected thing >> - colors to match output of `git branch` (green: current, red: remote) >> - output format is copy-pasteable, ahead/behind information is in the >> same format as in `git branch -v` > > I think it's much nicer, though the colors are a bit much for my liking. > Still, it's configurable, so I don't have to care. :) i find the numbers quicker to spot when they are a different color from normal text, but if the majority objects i can remove them of course. >> - branch information is still printed by default, i have to look into >> commandline option parsing first. i was thinking of `git status -v -b` >> (as in `git checkout -b` to mean branch) > > You may also want to have a configuration option if it is the output you > prefer all the time (similarly, if you are using "git status -s" all the > time, you might want a config option to make "git status" do what you > want). on my local system i have `alias.st = git status -sb`, so i don't really find a need to make a config option. actually i fall into both groups you described in your first answer: having a quick glance what files were changed and grouping files based on status. so i write both `git st` and `git status` quite often (also with `git stat` my alias for `git diff --stat` to see what changed content-wise) >> ---------8<---------------- >> From 82b4481d38ae0cd62030aeea67160656b7c763e2 Mon Sep 17 00:00:00 2001 >> From: Daniel Knittl-Frank <knittl89+git@xxxxxxxxxxxxxx> >> Date: Tue, 20 Apr 2010 22:40:54 +0200 >> Subject: [PATCH] Show branch information in short output of git status > > This patch looks OK, but: > > 1. I think for the final version you can just squash in part 2/2. should be no problem. the second patch changed quite a bit, so i thought it is easier to review when i send it as a separate patch. the final patch can be squashed of course > 2. Your patch has wrapped lines which make it impossible to apply > without fixing up manually. This is a common gmail problem. See > the "gmail" section of SubmittingPatches. ok, browsed through that. i think i will just put my branch into a pasteservice or on a fileserver, unless the email way is *really* preferred—what about email attachments? cheers, daniel -- typed with http://neo-layout.org myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released! -- 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