On Thu, Nov 19, 2020 at 7:35 AM Tassilo Horn <t...@gnu.org> wrote:
>
> Philip Oakley <philipoakley@iee.email> writes:
>
> >> That's a good starter, although I'd rather have a less precise
> >> solution which doesn't require that I've already done and committed
> >> my changes, i.e., I'd rather run the script *before* I start changing
> >> anything.  So maybe something along these lines.
> > I know the 'before' feeling (!), but isn't that one of the 'git smells'
> > (like code smells..) where we should be using a quick temporary branch
> > for a side commit, or a WIP-on-top (almost the same as a stash) so that
> > you do have a temporary local revision (blobs/trees/commit) stored
> > *early*, just in case of mistakes.
>
> Yes, in general, I agree.  However, the purpose of the script in
> question is more like this:
>
> 1. I find some smelly code and I'm tempted to refactor it.
> 2. I run my script which tells me quickly that my colleagues on the
>    other team already changed major parts of it on their feature branch.

Yes, I understand this pattern and what I usually do as a developer
for fast checking it:
git log --pretty=oneline --all --not HEAD -- file1 file2 file3
>From the list retrieved I check branches or open pull/merge requests
and see if change should be done on top of them or not

> 3. Because of that, I spin off a short-lived temporary branch from their
>    feature branch, do the refactoring there, and open a PR for them to
>    review.
>
> I can only see benefits.  It costs me just some seconds to find out that
> my intended changes would create much less friction if I just base them
> on work of another team and so I do.
>
> Bye,
> Tassilo
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to git-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/git-users/87v9e1rjsz.fsf%40gnu.org.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CAAwdEzDAgNCQvGAy-B0yEPj%3DbkCT3HuhNXdGqJr-LicpaLqhJg%40mail.gmail.com.

Reply via email to