I have next local changes:
diff --git a/lib/Art.pm b/lib/Art.pm index c8fd249..4bd479f 100644 --- a/lib/Art.pm +++ b/lib/Art.pm @@ -61,6 +61,7 @@ sub startup { $self->hook( around_action => \&Art::Controller::_log_request ); + $self->hook( around_action => \&Art::Controller::_store_referral ); $self->hook( around_action => \&Art::Controller::_json_as_urlencoded ); $self->hook( after_dispatch => \&Art::Controller::_mail_exception ); # NOTICE: before_render is called even before rendering included template And has next changes in the stash:
diff --git a/lib/Art.pm b/lib/Art.pm index 0dde0ec..cff11c9 100644 --- a/lib/Art.pm +++ b/lib/Art.pm @@ -32,6 +32,7 @@ sub startup { push @{ $self->plugins->namespaces }, __PACKAGE__ .'::Plugin'; $self->plugin( Config => { file => 'conf/' .$self->moniker .'.conf' } ); $self->plugin( 'TagHelpers::FetchPanel' ); + $self->plugin( 'UserReferral', key => 'r' ); # default_page is used in redirections. Redirect to site root by default As you can see these changes are not overlap.
Why I get this error when try to apply this stash?
error: Your local changes to the following files would be overwritten by merge: lib/Art.pm Is there a way to apply this patch without this error?
git stash showshows only differences computed through one of these two commits, specifically the work-tree commit. It seems likely that the conflict occurs through the other (index) commit. This would occur if you apply the stash with--index, which usesgit read-treerather thangit read-tree --reset. If so, simply omitting--indexso that Git discards the conflicting saved index should do it.--index. You can still get merge conflicts, although in this case I don't expect there would be any; and if the merge conflicts are severe, you might have to usegit stash branchor equivalent to apply while still preserving the separate index and work-tree. Bottom line is that with--index, even making a new commit isn't guaranteed to suffice, but it will usually work. Applying without--indexis easier, in a fundamental sense, as it gives Git permission to discard most of the index commit.