From: "David Kågedal" <davidk@lysator•liu.se>
To: "Gustav Hållberg" <gustav@gmail•com>,
"Catalin Marinas" <catalin.marinas@gmail•com>
Cc: kha@treskal•com, git@vger•kernel.org
Subject: Re: [StGit PATCH] edit: Allow setting git tree SHA1 of a patch
Date: Fri, 21 May 2010 15:59:23 +0200 [thread overview]
Message-ID: <u5tzkzt73us.fsf@beatles.e.vtech> (raw)
In-Reply-To: <AANLkTikcG3Chw1cpiKB00MrnZz-HZk9xAF_KtTTiVECi@mail.gmail.com> (Catalin Marinas's message of "Fri, 21 May 2010 13:37:59 +0100")
Catalin Marinas <catalin.marinas@gmail•com> writes:
> Hi Gustav,
>
> 2010/5/16 Gustav Hållberg <gustav@gmail•com>:
>> I would like to have something similar to this patch, which allows for
>> setting the (git) tree of a particular patch. I would like to use it
>> (from the Emacs mode) to make it easier to split an old patch into two
>> (or more).
>>
>> It might be that this is too "powerful" (read: unsafe), and maybe a
>> better (safer) command would use whatever is currently in the index
>> rather than a SHA1.
>
> I'm not against such option (as long as it is somehow mentioned that's
> dangerous) though I don't fully understand how one would use it,
> especially when the patch is buried under other patches. With a series
> of patches, any easily accessible tree (sha1) belongs to one of the
> patches.
The idea is that Gustav wants to allow the editing of a file as it
appears in an earlier version. Lets say you have patches A, B, C and
D. You realize that one of the changes in to foo.c in C shuold really be
done in A. So you open the "A version of foo.c" in your editor, do the
change, and then save it. The save operation needs to update A to be
the new tree that contains the updated foo.c, and the remaining patches
will keep their tree. The effect is that the moved change now appears as
a diff in A, but not in C (nor B or D).
Working like this means that we don't really see the series as a string
of pateches, but as a series of named commits that we can go back and
edit. But this is a natural way of working with it once the tools get
powerful enough to support it.
--
David Kågedal
next prev parent reply other threads:[~2010-05-21 14:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-16 17:33 [StGit PATCH] edit: Allow setting git tree SHA1 of a patch Gustav Hållberg
2010-05-17 17:14 ` Karl Wiberg
2010-05-21 12:37 ` Catalin Marinas
2010-05-21 13:59 ` David Kågedal [this message]
2010-05-21 15:16 ` Catalin Marinas
2010-05-21 15:29 ` David Kågedal
2010-05-21 15:32 ` Gustav Hållberg
2010-05-21 15:58 ` Catalin Marinas
2010-05-21 17:48 ` David Kågedal
2010-05-21 18:45 ` Gustav Hållberg
2010-05-24 18:52 ` [PATCH 0/2] Setting git tree of a patch (improved version) Gustav Hållberg
2010-05-24 18:52 ` [PATCH 1/2] Repository.rev_parse: support commits, trees, and blobs Gustav Hållberg
2010-05-24 18:52 ` [PATCH 2/2] edit: Allow setting git tree of a patch Gustav Hållberg
2010-05-25 12:26 ` [PATCH 0/2] Setting git tree of a patch (improved version) Catalin Marinas
2010-05-26 15:34 ` Gustav Hållberg
2010-05-26 21:18 ` Catalin Marinas
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=u5tzkzt73us.fsf@beatles.e.vtech \
--to=davidk@lysator$(echo .)liu.se \
--cc=catalin.marinas@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gustav@gmail$(echo .)com \
--cc=kha@treskal$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox