Skip to contentSkip to conversation

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

DISCUSSION Stefan Monnier 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 5 lines · Stefan Monnier

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

#2 lore raw
Quoted 8 lines
Quoted 5 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.

Quoted 2 lines

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

#3 lore raw

Hi,

Quoted 10 lines · Stefan Monnier
Quoted 8 lines
Quoted 5 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.

Quoted 4 lines
Quoted 2 lines

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