threads / discuss / 11928

List of files aded/removed/modified by "git-checkout"

Subject: List of files aded/removed/modified by "git-checkout"

## tl;dr

4 messages between Feb 6, 2008 and Feb 7, 2008.

replies: 3people: 3as markdown or json

Stefan Monnier· Feb 6, 2008, 21:47 UTC · lore

Whenever I do a git-checkout to switch between branches, I'm disappointed by the absence of a "-v" option which would list the operations performed.

How can I get this information?
        Stefan
Junio C Hamano· Feb 7, 2008, 03:51 UTC · re: Stefan Monnier · lore

Re: List of files aded/removed/modified by "git-checkout"

Stefan Monnier <monnier@iro.umontreal.ca> writes:
Show 5 quoted lines
> Whenever I do a git-checkout to switch between branches, I'm
> disappointed by the absence of a "-v" option which would list the
> operations performed.
>
> How can I get this information?

I'd be mightily annoyed with it myself, though, as I switch between 'master', 'next', 'pu' and 'maint' pretty often.

Have something like this in .git/hooks/post-checkout and make it executable, perhaps? Modify the options to suit your taste.

#!/bin/sh
case "$3" in
1)
	git diff --stat --summary -M "$1" "$2" ;;
esac
Stefan Monnier· Feb 7, 2008, 13:41 UTC · re: Junio C Hamano · lore

Re: List of files aded/removed/modified by "git-checkout"

Show 5 quoted lines
>> Whenever I do a git-checkout to switch between branches, I'm
>> disappointed by the absence of a "-v" option which would list the
>> operations performed.
>> 
>> How can I get this information?
> I'd be mightily annoyed with it myself, though, as I switch
> between 'master', 'next', 'pu' and 'maint' pretty often.
Why would such a "-v" option bother you?  Nobody forces you to use it.
> Have something like this in .git/hooks/post-checkout and make it
> executable, perhaps?  Modify the options to suit your taste.
That doesn't really cut it: I'd like to use it in a git frontend.
        Stefan
Johannes Schindelin· Feb 7, 2008, 16:11 UTC · re: Stefan Monnier · lore

Re: List of files aded/removed/modified by "git-checkout"

Hi,
On Thu, 7 Feb 2008, Stefan Monnier wrote:
Show 10 quoted lines
> >> Whenever I do a git-checkout to switch between branches, I'm 
> >> disappointed by the absence of a "-v" option which would list the 
> >> operations performed.
> >> 
> >> How can I get this information?
> 
> > I'd be mightily annoyed with it myself, though, as I switch between 
> > 'master', 'next', 'pu' and 'maint' pretty often.
> 
> Why would such a "-v" option bother you?  Nobody forces you to use it.
I agree.
> > Have something like this in .git/hooks/post-checkout and make it 
> > executable, perhaps?  Modify the options to suit your taste.
> 
> That doesn't really cut it: I'd like to use it in a git frontend.

Well, this request does not really cut it: it lacks a patch. And yes, you have been given enough information to hack it yourself. No, I will not do something about it; this is not my itch.

Hth, Dscho

← back to recent threads