From: Jakub Narebski <jnareb@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: "Catalin Marinas" <catalin.marinas@gmail.com>,
"David Kågedal" <davidk@lysator.liu.se>,
git@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: kha/safe and kha/experimental updated
Date: Wed, 19 Dec 2007 17:23:27 +0100 [thread overview]
Message-ID: <200712191723.29591.jnareb@gmail.com> (raw)
In-Reply-To: <20071219114021.GB5565@diana.vm.bytemark.co.uk>
Karl Hasselström wrote:
> On 2007-12-19 11:44:57 +0100, Jakub Narebski wrote:
>> On Wed, 19 Dec 2007, Karl Hasselström wrote:
>>> On 2007-12-18 08:39:52 -0800, Jakub Narebski wrote:
>>>
>>>> I also would like to have this command kept (and shown in 'stg
>>>> help'!). Contrary to 'git add' it can check and add to index /
>>>> update index only for files with conflict; we have -r
>>>> (ancestor|current|patched) to choose one side, and we could add
>>>> --check to check if there are no conflict markers with files
>>>> (useful with -a/--all).
>>>
>>> This too sounds like stuff that could profitably be added to "git
>>> add". Except for the ancestor/current/patched words, it is not
>>> specific to patch stacks, so the implementation should be in git
>>> and not in stg.
>>
>> No it cannot, at least the '-r (ancestor|current|patched)' part for
>> resetting file to given version, even if we change the wording to
>> ancestor, ours and theirs. The git-add command is about adding
>> contents, which updates index, which almost as a intended
>> side-effect clears merge state, i.e. stages; and not about resetting
>> to stage.
>
> git checkout-index --stage=1|2|3 <filename>
>
> does what you want. But "git cat-file" knows this handy syntax for
> getting at particular index stages:
>
> :stage:<filename>
I always forget which stage is which. It would be nice if
git-checkout-index implemented human-friendly names, just like
git-diff-files has --base, --ours, --theirs, i.e. if it would be
possible to write
git checkout-index --stage=base|ours|theirs <filename>
and perhaps even
:base|ours|theirs:<filename>.
(but there is a problem with files containing ':'...).
> It would be very convenient to be able to do
>
> git checkout :stage:<filename>
>
> but it doesn't seem to work currently. Does anyone know the "best" way
> of manually checking out a particular index stage in git?
It's a pity it doesn't work. Or if not this, then perhaps
git checkout --stage=ours -- <filename>
>> Besides with "stg resolved" you can update index _only_ for files
>> which were in the conflict, also for -a/--all, and not all the files
>> not only those which were in the conflict like "git add -u" does.
>
> This sounds like a straightforward addition to "git add".
>
>> "stg resolved --check" could happily ignore things that only look
>> like conflict markers, but must have been intended, because they are
>> in files not in conflict.
>
> git knows about conflicting files too.
>
>> Unless you are talking about adding "resolve"/"resolved" command to
>> git-core, as a porcelain wrapper around git-update-index, like "git
>> add"...
>
> Yes, that's what I want. You and others like what "stg resolved" does,
> but I don't want it in StGit because it's a generic git enhancement
> that has nothing to with patch stacks. People who don't use StGit
> would presumably like it as well.
You mean adding another option to git-add, similar to '-u' option, but
updating only the files which were (are) in merge conflict;
'-c'/'-r'/'-s' perhaps? This would be replacement for
"stg resolved --all", wouldn't it (and with filename replacement for
"stg resolved <filename>", of course)?
P.S. Sidenote: it would be nice if git-mergetool was updated to
understand StGIT style interactive 2-way and 3-way merge configuration,
and not offer only limited choice of pre-defined interactive merge tools
(although pre-defined are nice, too).
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2007-12-19 16:24 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 10:55 [StGit PATCH 00/17] Series short description David Kågedal
2007-12-14 10:55 ` [StGit PATCH 01/17] Add an StGit mode for emacs David Kågedal
2007-12-14 10:56 ` [StGit PATCH 02/17] Emacs mode: Show keybindings when user presses "h" or "?" David Kågedal
2007-12-14 10:56 ` [StGit PATCH 03/17] Emacs mode: Add an explanatory header David Kågedal
2007-12-14 10:57 ` [StGit PATCH 04/17] Emacs mode: Makefile for building stgit.el David Kågedal
2007-12-14 10:57 ` [StGit PATCH 05/17] Emacs mode: push/pop next patch, not patch at point David Kågedal
2007-12-14 10:57 ` [StGit PATCH 06/17] Emacs mode: Let "P" push or pop " David Kågedal
2007-12-14 10:57 ` [StGit PATCH 07/17] Emacs mode: Bind "G" to "stg goto" David Kågedal
2007-12-14 10:57 ` [StGit PATCH 08/17] Emacs mode: show patches' short description David Kågedal
2007-12-14 10:58 ` [StGit PATCH 09/17] Emacs mode: Improve the output buffer state David Kågedal
2007-12-14 10:58 ` [StGit PATCH 10/17] Emacs mode: Bind n and p David Kågedal
2007-12-14 10:58 ` [StGit PATCH 11/17] Emacs mode: add stgit-repair David Kågedal
2007-12-14 10:58 ` [StGit PATCH 12/17] Emacs mode: added stgit-commit and stgit-uncommit David Kågedal
2007-12-14 10:59 ` [StGit PATCH 13/17] Emacs mode: Add stgit-edit command David Kågedal
2007-12-14 10:59 ` [StGit PATCH 14/17] Emacs mode: added fontification David Kågedal
2007-12-14 10:59 ` [StGit PATCH 15/17] Emacs mode: Added stgit-new David Kågedal
2007-12-14 10:59 ` [StGit PATCH 16/17] Emacs mode: Add mark command David Kågedal
2007-12-14 10:59 ` [StGit PATCH 17/17] Emacs mode: coalesce command David Kågedal
2007-12-17 11:09 ` [StGit PATCH 00/17] Series short description Catalin Marinas
2007-12-17 22:48 ` Karl Hasselström
2007-12-18 5:21 ` kha/safe and kha/experimental updated Karl Hasselström
2007-12-18 16:09 ` Catalin Marinas
2007-12-18 16:39 ` Jakub Narebski
2007-12-18 16:52 ` Catalin Marinas
2007-12-19 9:41 ` David Kågedal
2007-12-19 9:50 ` David Kågedal
2007-12-19 10:19 ` Catalin Marinas
2007-12-19 9:38 ` Karl Hasselström
2007-12-19 10:44 ` Jakub Narebski
2007-12-19 11:40 ` Karl Hasselström
2007-12-19 11:47 ` Catalin Marinas
2007-12-19 16:23 ` Jakub Narebski [this message]
2007-12-19 17:02 ` Catalin Marinas
2007-12-19 17:14 ` David Kågedal
2007-12-19 17:14 ` Karl Hasselström
2007-12-19 9:34 ` Karl Hasselström
2007-12-19 10:09 ` Catalin Marinas
2007-12-19 11:20 ` Karl Hasselström
2007-12-19 11:40 ` Catalin Marinas
2007-12-19 12:10 ` Karl Hasselström
2007-12-19 15:38 ` Catalin Marinas
2007-12-19 14:59 ` Catalin Marinas
2007-12-19 15:39 ` David Kågedal
2007-12-18 9:11 ` [StGit PATCH 00/17] Series short description Catalin Marinas
2007-12-18 9:20 ` David Kågedal
2007-12-18 9:24 ` Karl Hasselström
2007-12-19 22:19 ` [StGit PATCH 0/2] Make new infrastructure subdirectory safe Karl Hasselström
2007-12-19 22:19 ` [StGit PATCH 1/2] Test that "stg goto" can be called from a subdirectory Karl Hasselström
2007-12-19 22:24 ` [StGit PATCH 2/2] Make "stg goto" subdirectory safe Karl Hasselström
2007-12-19 22:46 ` kha/safe updated Karl Hasselström
2007-12-19 23:17 ` Catalin Marinas
2007-12-19 23:26 ` Karl Hasselström
2007-12-19 23:29 ` Catalin Marinas
2007-12-20 6:39 ` Karl Hasselström
2007-12-19 23:24 ` David Kågedal
2007-12-20 6:38 ` Karl Hasselström
2007-12-19 22:28 ` [StGit PATCH 0/2] Make new infrastructure subdirectory safe Karl Hasselström
-- strict thread matches above, loose matches on Subject: below --
2008-01-29 2:58 kha/safe and kha/experimental updated Karl Hasselström
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=200712191723.29591.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=catalin.marinas@gmail.com \
--cc=davidk@lysator.liu.se \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
--cc=tytso@mit.edu \
/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.
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).