lkml.org 
[lkml]   [2011]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [git pull] apparmor fix for __d_path() misuse
On Tue, Dec 6, 2011 at 8:41 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Is there any way to have git to complain if you are pushing the current
> branch with uncommitted changes in your repository?

Git has hooks you can use for many ops, but that isn't one of them.
The hooks tend to be at the other end (ie around doing things that
change *your* repository, rather than change some remote repository).
So there are hooks around commit-like operations and around fetching
(so you can check that certain rules apply), but not for pushing.

That said, depending on *how* you push, you can fake it. For example,
since I push to multiple repositories (kernel.org and github, and
before I used github I used to have a separate "backup location" at a
linux-foundation site), I actually don't use "git push" to update
remote repositories, I have a git alias called "push-all" that pushes
to multiple remotes in one go.

And if you can teach your fingers some new way of pushing, then inside
that alias you can obviously add any commands you would want.

Linus


\
 
 \ /
  Last update: 2011-12-06 18:23    [W:0.069 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site