zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: trouble with debugging binary
Date: Sun, 23 Nov 2014 20:01:08 +0100	[thread overview]
Message-ID: <CAHYJk3TGUR3Bbhu0S1facrGtKuiTK2e1YZbK1yQThdEQNJ92mg@mail.gmail.com> (raw)
In-Reply-To: <54722A8C.10007@eastlink.ca>

On Sun, Nov 23, 2014 at 7:42 PM, Ray Andrews <rayandrews@eastlink.ca> wrote:
> On 11/23/2014 10:12 AM, Mikael Magnusson wrote:
>>
>>
>> If you think "git pull" downloads patches and applies them locally,
>> you are completely mistaken :).
>
>
> I'm thinking that git does everything with 'patches', although
> they might not be called that. Nevermind tho, I'm reading the
> doc, and will understand it all in time. Anyway, what I meant
> was that if I patch something here by hand, and then 'pull' ,
> *and* that same patch has been applied upstream,
> will git recognize the local patch as kosher, or will it complain that
> the file has been locally changed.
>
> Trying it, I see that git does *not* see the patch as kosher and
> demands that I 'stash' it. git is very fussy, just as it should be.

Ah, that makes sense :). Yes, if you have anything *uncommitted*, git
will never touch it unless you specify an option that sounds like
--force or --hard or so. Note though that pull will create merge
commits for you if you have committed stuff locally, which will make
you end up with a fork of zsh.

What you may want to do if you have a few local patches is to use git
pull --rebase and it'll move your commits on top of upstream each time
(by generating patches, updating the tree, and then applying them
again). I would recommend doing this rather than carrying uncommitted
changes around in a stash forever. You can set the pull.rebase git
option in your zsh repo to true to make it the default too.

What I usually do is just 'git fetch', inspect the history with 'git
log ..@{u}' (or paste the range output from fetch), and if there's
anything I care about, I manually run 'git rebase'.

>> I'm actually a bit confused about what you consider the 'normal' diff
>> format, almost nobody uses anything other than the unified format.
>
> ... just 'diff' with no switches.  Now that I try 'diff -u' I see what you
> mean--that's what I normally see, I just didn't know how to produce
> that format, now I do. It sure is easier to read.

It's also a bit safer in that the extra context lets 'patch' detect in
more cases whether the patch has already been applied, and prevents
you from applying it twice (eg, if it only contains additions, the <>
format will happily add them in at the specified line number forever).

-- 
Mikael Magnusson


  reply	other threads:[~2014-11-23 19:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 21:36 PATCH: key bindings, fixes, docs, tests for vi stuff Oliver Kiddle
2014-11-18  8:04 ` Jun T.
2014-11-19  8:48   ` Oliver Kiddle
2014-11-19 15:35     ` Ray Andrews
2014-11-21  0:01   ` Oliver Kiddle
2014-11-21  0:49     ` Bart Schaefer
2014-11-21  1:10       ` Ray Andrews
2014-11-21  5:53         ` Bart Schaefer
2014-11-21 10:35       ` Oliver Kiddle
2014-11-22  6:59         ` Bart Schaefer
2014-12-12 16:47           ` Oliver Kiddle
2014-11-21  1:15     ` Ray Andrews
2014-11-21  2:20       ` Mikael Magnusson
2014-11-21  2:38         ` Ray Andrews
2014-11-21  6:23           ` Bart Schaefer
2014-11-21 17:28             ` trouble with debugging binary Ray Andrews
2014-11-22  4:45               ` Bart Schaefer
2014-11-22  5:27                 ` Ray Andrews
2014-11-22  5:43                 ` Bart Schaefer
2014-11-22 16:49                   ` Ray Andrews
2014-11-22 22:35                     ` Bart Schaefer
2014-11-23  7:58                     ` Lawrence Velázquez
2014-11-23 16:22                       ` Ray Andrews
2014-11-23 18:12                         ` Mikael Magnusson
2014-11-23 18:42                           ` Ray Andrews
2014-11-23 19:01                             ` Mikael Magnusson [this message]
2014-11-23 22:30                               ` Ray Andrews
2014-11-21 15:20     ` PATCH: key bindings, fixes, docs, tests for vi stuff Jun T.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHYJk3TGUR3Bbhu0S1facrGtKuiTK2e1YZbK1yQThdEQNJ92mg@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).