* [PATCH 1/2] git-svn: Set svn.authorsfile to an absolute path when cloning
From: Alex Vandiver @ 2009-12-08 20:54 UTC (permalink / raw)
To: git; +Cc: Eric Wong
If --authors-file is passed a relative path, cloning will work, but
future `git svn fetch`es will fail to locate the authors file
correctly. Thus, use File::Spec->rel2abs to determine an absolute
path for the authors file before setting it.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 957d44e..cf5e75e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -392,9 +392,11 @@ sub cmd_clone {
$path = $url;
}
$path = basename($url) if !defined $path || !length $path;
+ my $authors_absolute = $_authors ? File::Spec->rel2abs($_authors) : "";
cmd_init($url, $path);
Git::SVN::fetch_all($Git::SVN::default_repo_id);
- command_oneline('config', 'svn.authorsfile', $_authors) if $_authors;
+ command_oneline('config', 'svn.authorsfile', $authors_absolute)
+ if $_authors;
}
sub cmd_init {
--
1.6.6.rc0.360.gc408
^ permalink raw reply related
* [PATCH 2/2] git-svn: Move setting of svn.authorsfile in clone to between init and fetch
From: Alex Vandiver @ 2009-12-08 20:54 UTC (permalink / raw)
To: git; +Cc: Eric Wong
In-Reply-To: <1260305651-11111-1-git-send-email-alex@chmrr.net>
If a clone errors out because of a missing author, or user interrupt,
this allows `git svn fetch` to resume seamlessly, rather than forcing
the user to re-provide the path to the authors file.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index cf5e75e..3c3e0e0 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -394,9 +394,9 @@ sub cmd_clone {
$path = basename($url) if !defined $path || !length $path;
my $authors_absolute = $_authors ? File::Spec->rel2abs($_authors) : "";
cmd_init($url, $path);
- Git::SVN::fetch_all($Git::SVN::default_repo_id);
command_oneline('config', 'svn.authorsfile', $authors_absolute)
if $_authors;
+ Git::SVN::fetch_all($Git::SVN::default_repo_id);
}
sub cmd_init {
--
1.6.6.rc0.360.gc408
^ permalink raw reply related
* delete remote branches
From: Patrick Grimard @ 2009-12-08 20:35 UTC (permalink / raw)
To: git
I'm experimenting with Git, just trying to get a feel for it. I
created a bare git repo on a server and pushed a local git repo (let's
call it DIR1) from my PC to the server. Then from another directory
on my local PC (let's call it DIR2), I cloned the repo on the server
and checked out a new branch named testBranch. Did some playing with
branches to see how they worked, like pushing the branch to the server
from DIR2 and fetching it from DIR1, merging it into master and then
pushing master back to the server. Now from DIR2, I fetched master
from the server, merged in the changes and deleted the remote branch
called testBranch using the command "git push origin :testBranch"
which seemed to work fine since the command "git branch -r" no longer
lists the remote branch. However from DIR1 if I do "git branch -r" I
still see the remote branch and can't seem to delete it using the
above method. Any idea why this is happening?
Thanks in advance.
Patrick
^ permalink raw reply
* Re: [RFC PATCH v2 2/2] MSVC: Fix an "incompatible pointer types" compiler warning
From: Johannes Sixt @ 2009-12-08 20:31 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Marius Storm-Olsen, Johannes Schindelin, GIT Mailing-list
In-Reply-To: <4B1EAD9A.3090205@ramsay1.demon.co.uk>
On Dienstag, 8. Dezember 2009, Ramsay Jones wrote:
> 30 #define stat _stat64
> 31 int mingw_lstat(const char *file_name, struct stat *buf);
> 32 int mingw_fstat(int fd, struct stat *buf);
> 33 #define fstat mingw_fstat
> 34 #define lstat mingw_lstat
> 35 #define _stat64(x,y) mingw_lstat(x,y)
> 36 #define ALREADY_DECLARED_STAT_FUNCS
> 37
> 38 #include "compat/mingw.h"
> 39
> 40 #undef ALREADY_DECLARED_STAT_FUNCS
>
> This works fine, *provided* you do not need to compile with
> -D_USE_32BIT_TIME_T, which would produce this warning:
>
> ...mingw.c(223) : warning C4133: 'function' : incompatible types - \
> from '_stat64 *' to '_stat32i64 *'
>
> This would actually be *worse* than the original code, since the struct
> _stat64 would not have the same "shape" as the struct _stat32i64; ...
To cut this short: According to your explanations, using -D_USE_32BIT_TIME_T
with MSVC is bad. Please reroll without references to _USE_32BIT_TIME_T.
-- Hannes
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Sverre Rabbelier @ 2009-12-08 20:29 UTC (permalink / raw)
To: Junio C Hamano, Stephan Beyer, Christian Couder, Daniel Barkalow; +Cc: Git List
In-Reply-To: <7vfx7lcj18.fsf@alter.siamese.dyndns.org>
Heya,
On Tue, Dec 8, 2009 at 21:22, Junio C Hamano <gitster@pobox.com> wrote:
> But I think it is a reasonable thing to _implement_ the feature to
> range-pick commits reusing the sequencing logic already in "rebase" and
> "rebase -i". That essentially is what we wanted to do with "git
> sequencer" that would be a sequencing logic backend shared among rebase,
> cherry-pick, and perhaps am.
Speaking of which, what's the status of git sequencer? I seem to
remember some activity recently to slowly rewrite git rebase in c, but
I haven't seen anything since then. Is it still moving forward? Is
anyone interested in doing so? Just curious...
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Junio C Hamano @ 2009-12-08 20:22 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: git
In-Reply-To: <20091208144740.GA30830@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
> Add --revisions flag to rebase, so that it can be used
> to apply an arbitrary range of commits on top
> of a current branch.
Many people wanted to have "pick many commits onto the current HEAD" and I
think it would be a natural, uncontroversial and welcome addition to allow
"git cherry-pick A..B". In fact, historically, people who wanted to have
"pick many commits" complained that the "rebase" interface was backwards,
because it works in the _wrong_ direction for _their_ usecase. Of course,
when you _are_ rebasing a branch on top of some other branch, the way
"rebase" currently works is the _right_ direction.
But I think it is a reasonable thing to _implement_ the feature to
range-pick commits reusing the sequencing logic already in "rebase" and
"rebase -i". That essentially is what we wanted to do with "git
sequencer" that would be a sequencing logic backend shared among rebase,
cherry-pick, and perhaps am.
So perhaps a good way to move forward is to teach "git cherry-pick A..B"
to be a thin wrapper that invokes a new hidden mode of operation added to
"rebase" that is not advertised to the end user.
I would suggest calling the option to invoke that hidden mode not
"--revisions", but "--reverse" or "--opposite" or something of that
nature, though. It makes "rebase" work in different direction.
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Michael S. Tsirkin @ 2009-12-08 20:00 UTC (permalink / raw)
To: Björn Steinbrink; +Cc: git, Junio C Hamano
In-Reply-To: <20091208191107.GA4103@atjola.homenet>
On Tue, Dec 08, 2009 at 08:11:07PM +0100, Björn Steinbrink wrote:
> On 2009.12.08 18:44:49 +0200, Michael S. Tsirkin wrote:
> > On Tue, Dec 08, 2009 at 05:37:37PM +0100, Björn Steinbrink wrote:
> > > On 2009.12.08 18:14:07 +0200, Michael S. Tsirkin wrote:
> > > > On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > > > > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > > > > Add --revisions flag to rebase, so that it can be used
> > > > > > to apply an arbitrary range of commits on top
> > > > > > of a current branch.
> > > > > >
> > > > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > > > ---
> > > > > >
> > > > > > I've been wishing for this functionality for a while now,
> > > > > > so here goes. This isn't yet properly documented and I didn't
> > > > > > write a test, but the patch seems to work fine for me.
> > > > > > Any early flames/feedback?
> > > > >
> > > > > This pretty much reverses what rebase normally does. Instead of "rebase
> > > > > this onto that" it's "'rebase' that onto this". And instead of updating
> > > > > the branch head that got rebased, the, uhm, "upstream" gets updated.
> > > >
> > > > The last sentence is wrong I think - it is still the branch head that
> > > > is updated.
> > >
> > > But you don't rebase the branch head. Before the rebase, the branch head
> > > doesn't reference the commits that get rebased. For example:
> > >
> > > git checkout bar
> > > git rebase --revisions foo bar
> > >
> > > You "rebase" the commits in foo's history, but you update bar.
> >
> > Yes, that's the who point of the patch.
>
> Yes, and it's "backwards" compared to the existing "rebase" modes, but
> more like "cherry-pick".
>
> > The above applies a single commit, foo, on top of current branch bar.
>
> Hm, no. I expected it to turn all commits reachable from foo into
> patches and applying them to bar. But actually, that should hit the
> special <since> mode of format-patch. So
> git rebase --revisions foo bar
> is (with your patch) actually the same as
> git rebase foo bar
>
> So actually the example should have been:
> git rebase --root --revisions foo bar
>
> Both invocations probably mess up the diff-stat as that becomes:
> git diff --stat --summary foo
> So it creates a diffstat of the diff from the working tree to "foo",
> which can't be right.
>
> >
> > > WRT the result, the above command should be equivalent to:
> > > git checkout bar
> > > git reset --hard foo
> > > git rebase --root --onto ORIG_HEAD;
> > >
> > > And here, the commits currently reachable through "bar" are rebased, and
> > > "bar" also gets updated.
> >
> > So this
> > 1. won't be very useful, as you show it is easy
> > to achieve with existing commands.
>
> One can "almost" achieve it.
> git rebase --revision A..B foo
>
> is about the same as:
> git checkout foo
> git reset --hard B
> git rebase --onto ORIG_HEAD A
>
> But:
> a) The "reset --hard" obviously lacks the safety checks for clean
> index/working tree.
> b) "git rebase --abort" won't take you back to your initial state, but
> to B.
> c) It's not really obvious that you can do it and how to do it.
>
> Another possibility would be:
>
> git checkout B^0 # detach HEAD at B
> git rebase foo # rebase onto foo
> git checkout foo
> git merge HEAD@{1} # Fast-forwards foo to the rebased stuff
>
> That fixes a), avoid b) [because you don't mess up any branch head
> early] but is still subject to c).
>
> And for both methods, the ORIG_HEAD and HEAD@{1} arguments are somewhat
> "unstable", e.g. checking out the wrong branch head first, and only then
> the correct one, you'd have to use HEAD@{2} instead of HEAD@{1} (because
> the reflog for HEAD got a new entry).
>
> So you can already do what you want to do, but wrapping it in a single
> porcelain might still be useful because it's obviously a lot easier and
> safer that way. That said, I wonder what kind of workflow you're using
> though, and why you require that feature. I've never needed something
> like that.
I need this often for many reasons:
- Imagine developing a patchset with a complex bugfix on master branch.
Then I decide to also apply (backport) this patchset to stable branch.
- Imagine developing a bugfix/feature patchset on master branch.
Then I decide the patchset is too large/unsafe and want to
switch it to staging branch.
- I have a large queue of patches on staging branch, I decide that
a range of patches is mature enough for master.
And I often need -i to inspec/edit patches while doing this,
even though I can rebase -i later, but that would mean
figuring which commit to pass to rebase -i.
> > 2. interprets "foo" as branch name as opposed to
> > revision range.
>
> Well, a single committish is a "range" as far as the range-based
> commands are concerned, e.g. "git log master" treats "master" to mean
> all commits reachable it. If "rebase --revisions master" would do the
> same, that's at least consistent (and for single commit picks, there's
> already cherry-pick). The problem with your patch is that it passes the
> revision argument to format-patch as is, and:
> git format-patch foo
> is the same as
> git format-patch foo..HEAD
>
>
> > OTOH, rebase --revisions as I implemented is a "smarter cherry-pick"
> > which can't easily be achieved with existing commands, especially if
> > you add "-i".
>
> And that "is a 'smarter cherry-pick'" is why I think that rebase is
> actually the wrong command to get that feature. While rebase internally
> does just mass-cherry-picking, it does that with commits in the current
> branch onto a specified branch. The --revisions flag makes it do things
> the other way around.
>
> Björn
Well, implemenation-wise, teaching cherry-pick about multiple
commits seems very hard to me. We would need to teach it about
all the flags that rebase has to patch queue management.
So I can't implement it. Can you?
--
MST
^ permalink raw reply
* [PATCH] mergetool--lib: add diffmerge as a pre-configured mergetool option
From: Jay Soffian @ 2009-12-08 20:01 UTC (permalink / raw)
To: git; +Cc: Jay Soffian, David Aguilar, Junio C Hamano
Add SourceGear DiffMerge to the set of built-in diff/merge tools, and update
bash completion and documentation.
---
Documentation/git-difftool.txt | 2 +-
Documentation/git-mergetool.txt | 2 +-
Documentation/merge-config.txt | 4 ++--
contrib/completion/git-completion.bash | 2 +-
git-mergetool--lib.sh | 22 ++++++++++++++++++++--
5 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt
index 8e9aed6..28178da 100644
--- a/Documentation/git-difftool.txt
+++ b/Documentation/git-difftool.txt
@@ -31,7 +31,7 @@ OPTIONS
Use the diff tool specified by <tool>.
Valid merge tools are:
kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
- ecmerge, diffuse, opendiff, p4merge and araxis.
+ ecmerge, diffuse, opendiff, p4merge, araxis and diffmerge.
+
If a diff tool is not specified, 'git-difftool'
will use the configuration variable `diff.tool`. If the
diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
index 4a6f7f3..7f00269 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -27,7 +27,7 @@ OPTIONS
Use the merge resolution program specified by <tool>.
Valid merge tools are:
kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
- diffuse, tortoisemerge, opendiff, p4merge and araxis.
+ diffuse, tortoisemerge, opendiff, p4merge, araxis and diffmerge.
+
If a merge resolution program is not specified, 'git-mergetool'
will use the configuration variable `merge.tool`. If the
diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt
index a403155..a68a205 100644
--- a/Documentation/merge-config.txt
+++ b/Documentation/merge-config.txt
@@ -23,8 +23,8 @@ merge.tool::
Controls which merge resolution program is used by
linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3",
"tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff",
- "diffuse", "ecmerge", "tortoisemerge", "p4merge", "araxis" and
- "opendiff". Any other value is treated is custom merge tool
+ "diffuse", "ecmerge", "tortoisemerge", "p4merge", "araxis", "opendiff"
+ and "diffmerge". Any other value is treated is custom merge tool
and there must be a corresponding mergetool.<tool>.cmd option.
merge.verbosity::
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7c18b0c..5cc5ee7 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -975,7 +975,7 @@ _git_diff ()
}
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
- tkdiff vimdiff gvimdiff xxdiff araxis p4merge
+ tkdiff vimdiff gvimdiff xxdiff araxis p4merge diffmerge
"
_git_difftool ()
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 5b62785..5b29fef 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -46,7 +46,8 @@ check_unchanged () {
valid_tool () {
case "$1" in
kdiff3 | tkdiff | xxdiff | meld | opendiff | \
- emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis | p4merge)
+ emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis | p4merge | \
+ diffmerge)
;; # happy
tortoisemerge)
if ! merge_mode; then
@@ -297,6 +298,23 @@ run_merge_tool () {
>/dev/null 2>&1
fi
;;
+ diffmerge)
+ if merge_mode; then
+ if $base_present; then
+ "$merge_tool_path" -nosplash -merge -result="$MERGED" \
+ "$LOCAL" "$BASE" "$REMOTE"
+ >/dev/null 2>&1
+ else
+ "$merge_tool_path" -nosplash -merge \
+ "$LOCAL" "$MERGED" "$REMOTE"
+ >/dev/null 2>&1
+ fi
+ status=$?
+ else
+ "$merge_tool_path" -nosplash "$LOCAL" "$REMOTE" \
+ >/dev/null 2>&1
+ fi
+ ;;
*)
merge_tool_cmd="$(get_merge_tool_cmd "$1")"
if test -z "$merge_tool_cmd"; then
@@ -336,7 +354,7 @@ guess_merge_tool () {
else
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
fi
- tools="$tools gvimdiff diffuse ecmerge p4merge araxis"
+ tools="$tools gvimdiff diffuse ecmerge p4merge araxis diffmerge"
fi
case "${VISUAL:-$EDITOR}" in
*vim*)
--
1.6.6.rc1.296.ge77fc.dirty
^ permalink raw reply related
* Re: [RFC PATCH v2 2/2] MSVC: Fix an "incompatible pointer types" compiler warning
From: Ramsay Jones @ 2009-12-08 19:48 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Marius Storm-Olsen, Johannes Schindelin, GIT Mailing-list
In-Reply-To: <200912051257.21386.j6t@kdbg.org>
Johannes Sixt wrote:
> On Samstag, 5. Dezember 2009, Ramsay Jones wrote:
>> The patch is still marked RFC because:
>> - I'm still not sure if the flexibility to support both 32- and 64-bit
>> time_t is required.
>> - should -D_USE_32BIT_TIME_T be added to the Makefile?
>
> If *not* using -D_USE_32BIT_TIME_T produces a build or code base that is in
> some way superior, why should we require it? For example, its absence could
> help a 64bit build.
Indeed.
I only added the second bullet because you seemed to be advocating it, in your
last email, so I'm waiting for your answer on that. :-D
Unfortunately the patch can not be a simple as the first version (Dscho was
quite right to complain about adding too much clutter to mingw.h with msvc
related code), but the moral equivalent would have msvc.h look like:
25 /* Use mingw_lstat() instead of lstat()/stat() and mingw_fstat() instead
26 * of fstat(). We add the declaration of these functions here, suppressing
27 * the corresponding declarations in mingw.h, so that we can use the
28 * appropriate structure type (and function) names from the msvc headers.
29 */
30 #define stat _stat64
31 int mingw_lstat(const char *file_name, struct stat *buf);
32 int mingw_fstat(int fd, struct stat *buf);
33 #define fstat mingw_fstat
34 #define lstat mingw_lstat
35 #define _stat64(x,y) mingw_lstat(x,y)
36 #define ALREADY_DECLARED_STAT_FUNCS
37
38 #include "compat/mingw.h"
39
40 #undef ALREADY_DECLARED_STAT_FUNCS
This works fine, *provided* you do not need to compile with -D_USE_32BIT_TIME_T,
which would produce this warning:
...mingw.c(223) : warning C4133: 'function' : incompatible types - \
from '_stat64 *' to '_stat32i64 *'
This would actually be *worse* than the original code, since the struct _stat64
would not have the same "shape" as the struct _stat32i64; it would not write
outside of the allocated memory, at least, but the time fields would obviously
be written to the wrong offsets etc,. In the original code, the struct _stati64
would have the correct "shape", since the time fields are declared with time_t.
At first I thought there would be no need to set _USE_32BIT_TIME_T. After some
thought, however, I could not be confident that it would *never* be necessary.
(my only concern was to revert to 32-bit time_t, perhaps only temporarily, while
fixing a breakage; I did not consider wanting to keep "compatibility" with the
MinGW code). This lead to the more complicated/flexible RFC patch.
I was hoping for someone to say: "Hey, we will *never* need to compile with
-D_USE_32BIT_TIME_T, so just get rid of those #if conditionals and simplify
the code ...". :-P
Since nobody has said any such thing, I have to conclude that the extra
flexibility is required. That being the case, I have to be happy with the
patch as-is and propose to remove the RFC.
Before I do that, do you have any further comments or concerns about the
v2 patch that you want me to address?
ATB,
Ramsay Jones
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Björn Steinbrink @ 2009-12-08 19:13 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: git, Junio C Hamano
In-Reply-To: <20091208164904.GB32204@redhat.com>
On 2009.12.08 18:49:04 +0200, Michael S. Tsirkin wrote:
> On Tue, Dec 08, 2009 at 05:41:13PM +0100, Björn Steinbrink wrote:
> > > > Also, AFAICT this needs to be called like this:
> > > > git rebase --revisions foo..bar HEAD
> > > >
> > > > Changing the meaning of the <upstream> argument and relying on the fact
> > > > that <newbase> defaults to <upstream>. If such a thing gets added, it
> > > > should rather work like --root, not using <upstream> at all, but --onto
> > > > <newbase> only. Maybe defaulting to HEAD for <newbase> and making --onto
> > > > optional, as it's reversed WRT what it does compared to the usual
> > > > rebase.
> > >
> > > Sorry, I had trouble parsing the above. Could you suggest e.g. how the
> > > help line should look?
> >
> > Current:
> > git rebase [-i | --interactive] [options] [--onto <newbase>]
> > <upstream> [<branch>]
> > git rebase [-i | --interactive] [options] --onto <newbase>
> > --root [<branch>]
> >
> > Add:
> > git rebase [-i | --interactive] [options] --revisions <range> [<branch>]
> >
> > (Thinking about it, I guess an explicit --onto makes no sense with the
> > --revisions flag)
>
> I agree.
> So this is different from what I implemented basically only in that
> we should disallow combining --onto with --revisions. Right?
It also drops <upstream>, because that makes no sense with --revisions.
So the only mandatory argument is the revision range.
Björn
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Björn Steinbrink @ 2009-12-08 19:11 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: git, Junio C Hamano
In-Reply-To: <20091208164449.GA32204@redhat.com>
On 2009.12.08 18:44:49 +0200, Michael S. Tsirkin wrote:
> On Tue, Dec 08, 2009 at 05:37:37PM +0100, Björn Steinbrink wrote:
> > On 2009.12.08 18:14:07 +0200, Michael S. Tsirkin wrote:
> > > On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > > > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > > > Add --revisions flag to rebase, so that it can be used
> > > > > to apply an arbitrary range of commits on top
> > > > > of a current branch.
> > > > >
> > > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > > ---
> > > > >
> > > > > I've been wishing for this functionality for a while now,
> > > > > so here goes. This isn't yet properly documented and I didn't
> > > > > write a test, but the patch seems to work fine for me.
> > > > > Any early flames/feedback?
> > > >
> > > > This pretty much reverses what rebase normally does. Instead of "rebase
> > > > this onto that" it's "'rebase' that onto this". And instead of updating
> > > > the branch head that got rebased, the, uhm, "upstream" gets updated.
> > >
> > > The last sentence is wrong I think - it is still the branch head that
> > > is updated.
> >
> > But you don't rebase the branch head. Before the rebase, the branch head
> > doesn't reference the commits that get rebased. For example:
> >
> > git checkout bar
> > git rebase --revisions foo bar
> >
> > You "rebase" the commits in foo's history, but you update bar.
>
> Yes, that's the who point of the patch.
Yes, and it's "backwards" compared to the existing "rebase" modes, but
more like "cherry-pick".
> The above applies a single commit, foo, on top of current branch bar.
Hm, no. I expected it to turn all commits reachable from foo into
patches and applying them to bar. But actually, that should hit the
special <since> mode of format-patch. So
git rebase --revisions foo bar
is (with your patch) actually the same as
git rebase foo bar
So actually the example should have been:
git rebase --root --revisions foo bar
Both invocations probably mess up the diff-stat as that becomes:
git diff --stat --summary foo
So it creates a diffstat of the diff from the working tree to "foo",
which can't be right.
>
> > WRT the result, the above command should be equivalent to:
> > git checkout bar
> > git reset --hard foo
> > git rebase --root --onto ORIG_HEAD;
> >
> > And here, the commits currently reachable through "bar" are rebased, and
> > "bar" also gets updated.
>
> So this
> 1. won't be very useful, as you show it is easy
> to achieve with existing commands.
One can "almost" achieve it.
git rebase --revision A..B foo
is about the same as:
git checkout foo
git reset --hard B
git rebase --onto ORIG_HEAD A
But:
a) The "reset --hard" obviously lacks the safety checks for clean
index/working tree.
b) "git rebase --abort" won't take you back to your initial state, but
to B.
c) It's not really obvious that you can do it and how to do it.
Another possibility would be:
git checkout B^0 # detach HEAD at B
git rebase foo # rebase onto foo
git checkout foo
git merge HEAD@{1} # Fast-forwards foo to the rebased stuff
That fixes a), avoid b) [because you don't mess up any branch head
early] but is still subject to c).
And for both methods, the ORIG_HEAD and HEAD@{1} arguments are somewhat
"unstable", e.g. checking out the wrong branch head first, and only then
the correct one, you'd have to use HEAD@{2} instead of HEAD@{1} (because
the reflog for HEAD got a new entry).
So you can already do what you want to do, but wrapping it in a single
porcelain might still be useful because it's obviously a lot easier and
safer that way. That said, I wonder what kind of workflow you're using
though, and why you require that feature. I've never needed something
like that.
> 2. interprets "foo" as branch name as opposed to
> revision range.
Well, a single committish is a "range" as far as the range-based
commands are concerned, e.g. "git log master" treats "master" to mean
all commits reachable it. If "rebase --revisions master" would do the
same, that's at least consistent (and for single commit picks, there's
already cherry-pick). The problem with your patch is that it passes the
revision argument to format-patch as is, and:
git format-patch foo
is the same as
git format-patch foo..HEAD
> OTOH, rebase --revisions as I implemented is a "smarter cherry-pick"
> which can't easily be achieved with existing commands, especially if
> you add "-i".
And that "is a 'smarter cherry-pick'" is why I think that rebase is
actually the wrong command to get that feature. While rebase internally
does just mass-cherry-picking, it does that with commits in the current
branch onto a specified branch. The --revisions flag makes it do things
the other way around.
Björn
^ permalink raw reply
* Re: help: bisect single file from repos
From: Junio C Hamano @ 2009-12-08 18:35 UTC (permalink / raw)
To: git; +Cc: Christian Couder, Michael J Gruber, wharms
In-Reply-To: <4B1E5796.2090201@bfs.de>
walter harms <wharms@bfs.de> writes:
> Christian Couder schrieb:
> ...
> i am sorry, i am not familiar with git and when i am stating i am looking
> for examples first. the examples in my man page are like
> git bisect start v2.6.20-rc6 v2.6.20-rc4
> there is nothing like:
> git bisect start 6a87a68a6a8 65a76a8a68a7
>
> I ASSUME that you can use tags like "v2.6.20-rc6" and commit-id like "6a87a68a6a8"
> interchangeable but that was not clear from beginning.
The misconception here is "naming commit is done completely differently
from naming branches and tags", which is false in the git land, but it may
hold true in some other systems (e.g. Subversion, which made them into
different dimensions by making branches and tags into a location in a
larger whole tree namespace when their commits are named by serial version
number of that whole tree namespace).
We can call this a misconception, tell users to learn how things work
before using git (sometimes unlearning CVS and Subversion helps for this
exact reason), dismiss the issue and move on. But I wonder if there is
something we _could_ have done better in the documentation area to avoid
this from the beginning, iow, make it easier to "learn how things work
before using"? I think there is a lesson to be learned by us in here, and
I'd like to hear comments and improvement suggestions, especially from
"usability" and "friendly to new people" advocates.
^ permalink raw reply
* Re: Undoing merges
From: Matthieu Moy @ 2009-12-08 17:48 UTC (permalink / raw)
To: Richard; +Cc: git
In-Reply-To: <8440EA2C12E50645A68C4AA98871665131D8D8@SERVER.webdezign.local>
"Richard" <richard@webdezign.co.uk> writes:
> Hi git list,
>
> I'm trying to find out how to undo a merge.
When sitting on a merge commit,
git reset --merge HEAD^
will undo this merge commit (i.e. pretend the merge has never occured,
at least in your branch). Don't do that if you already published this
merge commit.
> I know that my branches are independent and that I can just carry on
> working on them and merge again later, but I'm just trying to keep
> my revision graph tidier. Should I even be undoing merges?
If it's about cleaning up your history, "git rebase" is your friend,
too (with the same limitation: don't do that on published history). By
default, it does some kind of history flattening.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply
* Undoing merges
From: Richard @ 2009-12-08 17:16 UTC (permalink / raw)
To: git
Hi git list,
I'm trying to find out how to undo a merge. I know that my branches are
independent and that I can just carry on working on them and merge again
later, but I'm just trying to keep my revision graph tidier. Should I
even be undoing merges?
I've searched around, but I can seem to find an answer I can follow.
Regards,
Richard
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Björn Steinbrink @ 2009-12-08 16:37 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: git, Junio C Hamano
In-Reply-To: <20091208161406.GB32045@redhat.com>
On 2009.12.08 18:14:07 +0200, Michael S. Tsirkin wrote:
> On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > Add --revisions flag to rebase, so that it can be used
> > > to apply an arbitrary range of commits on top
> > > of a current branch.
> > >
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > ---
> > >
> > > I've been wishing for this functionality for a while now,
> > > so here goes. This isn't yet properly documented and I didn't
> > > write a test, but the patch seems to work fine for me.
> > > Any early flames/feedback?
> >
> > This pretty much reverses what rebase normally does. Instead of "rebase
> > this onto that" it's "'rebase' that onto this". And instead of updating
> > the branch head that got rebased, the, uhm, "upstream" gets updated.
>
> The last sentence is wrong I think - it is still the branch head that
> is updated.
But you don't rebase the branch head. Before the rebase, the branch head
doesn't reference the commits that get rebased. For example:
git checkout bar
git rebase --revisions foo bar
You "rebase" the commits in foo's history, but you update bar.
WRT the result, the above command should be equivalent to:
git checkout bar
git reset --hard foo
git rebase --root --onto ORIG_HEAD;
And here, the commits currently reachable through "bar" are rebased, and
"bar" also gets updated.
Björn
^ permalink raw reply
* Undoing merges
From: rhlee @ 2009-12-08 17:34 UTC (permalink / raw)
To: git
Hi git list,
I hope this isn't a double post. I couldn't get a response from this mailing
list with Outlook.
I'm trying to find out how to undo a merge. I know that my branches are
independent and that I can just carry on working on them and merge again
later, but I'm just trying to keep my revision graph tidier. Should I even
be undoing merges?
I've searched around, but I can seem to find an answer I can follow.
Regards,
Richard
--
View this message in context: http://n2.nabble.com/Undoing-merges-tp4133942p4133942.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PATCH v2 1/3] refactor ref status logic for pushing
From: Daniel Barkalow @ 2009-12-08 17:17 UTC (permalink / raw)
To: Tay Ray Chuan
Cc: git, Shawn O. Pearce, Sverre Rabbelier, Clemens Buchacher,
Jeff King, Junio C Hamano
In-Reply-To: <20091208223543.c7f88afe.rctay89@gmail.com>
On Tue, 8 Dec 2009, Tay Ray Chuan wrote:
> Move the logic that detects up-to-date and non-fast-forward refs to a
> new function in remote.[ch], set_ref_status_for_push().
Is there some reason to not have set_ref_status_for_push() be static in
transport.c now? (Sorry for not suggesting this before.)
Other than that, it looks good to me.
I think it might be a good idea to have it generate a peer ref for refs
that don't have one when mirror is used, which would eliminate a couple
more lines, but there's no reason that has to be done in the same patch.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Michael S. Tsirkin @ 2009-12-08 16:49 UTC (permalink / raw)
To: Björn Steinbrink; +Cc: git, Junio C Hamano
In-Reply-To: <20091208164113.GB2005@atjola.homenet>
On Tue, Dec 08, 2009 at 05:41:13PM +0100, Björn Steinbrink wrote:
> On 2009.12.08 18:11:44 +0200, Michael S. Tsirkin wrote:
> > On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > > Add --revisions flag to rebase, so that it can be used
> > > > to apply an arbitrary range of commits on top
> > > > of a current branch.
> > > >
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > ---
> > > >
> > > > I've been wishing for this functionality for a while now,
> > > > so here goes. This isn't yet properly documented and I didn't
> > > > write a test, but the patch seems to work fine for me.
> > > > Any early flames/feedback?
> > >
> > > This pretty much reverses what rebase normally does. Instead of "rebase
> > > this onto that" it's "'rebase' that onto this". And instead of updating
> > > the branch head that got rebased, the, uhm, "upstream" gets updated.
> > >
> > > Also, AFAICT this needs to be called like this:
> > > git rebase --revisions foo..bar HEAD
> > >
> > > Changing the meaning of the <upstream> argument and relying on the fact
> > > that <newbase> defaults to <upstream>. If such a thing gets added, it
> > > should rather work like --root, not using <upstream> at all, but --onto
> > > <newbase> only. Maybe defaulting to HEAD for <newbase> and making --onto
> > > optional, as it's reversed WRT what it does compared to the usual
> > > rebase.
> >
> > Sorry, I had trouble parsing the above. Could you suggest e.g. how the
> > help line should look?
>
> Current:
> git rebase [-i | --interactive] [options] [--onto <newbase>]
> <upstream> [<branch>]
> git rebase [-i | --interactive] [options] --onto <newbase>
> --root [<branch>]
>
> Add:
> git rebase [-i | --interactive] [options] --revisions <range> [<branch>]
>
> (Thinking about it, I guess an explicit --onto makes no sense with the
> --revisions flag)
I agree.
So this is different from what I implemented basically only in that
we should disallow combining --onto with --revisions. Right?
> > > But generally, I'd say it would be better to add such a range feature to
> > > cherry-pick than abusing rebase for that.
> >
> > The reason to use rebase is that I often want to combine
> > this with -i flag, editing patches as they are applied.
>
> Hm, well, your patch didn't touch git-rebase--interactive.sh ;-)
>
> Björn
Ah, I was wondering why it doesn't work :)
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Michael S. Tsirkin @ 2009-12-08 16:44 UTC (permalink / raw)
To: Björn Steinbrink; +Cc: git, Junio C Hamano
In-Reply-To: <20091208163737.GA2005@atjola.homenet>
On Tue, Dec 08, 2009 at 05:37:37PM +0100, Björn Steinbrink wrote:
> On 2009.12.08 18:14:07 +0200, Michael S. Tsirkin wrote:
> > On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > > Add --revisions flag to rebase, so that it can be used
> > > > to apply an arbitrary range of commits on top
> > > > of a current branch.
> > > >
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > ---
> > > >
> > > > I've been wishing for this functionality for a while now,
> > > > so here goes. This isn't yet properly documented and I didn't
> > > > write a test, but the patch seems to work fine for me.
> > > > Any early flames/feedback?
> > >
> > > This pretty much reverses what rebase normally does. Instead of "rebase
> > > this onto that" it's "'rebase' that onto this". And instead of updating
> > > the branch head that got rebased, the, uhm, "upstream" gets updated.
> >
> > The last sentence is wrong I think - it is still the branch head that
> > is updated.
>
> But you don't rebase the branch head. Before the rebase, the branch head
> doesn't reference the commits that get rebased. For example:
>
> git checkout bar
> git rebase --revisions foo bar
>
> You "rebase" the commits in foo's history, but you update bar.
Yes, that's the who point of the patch. The above applies a single
commit, foo, on top of current branch bar.
> WRT the result, the above command should be equivalent to:
> git checkout bar
> git reset --hard foo
> git rebase --root --onto ORIG_HEAD;
>
> And here, the commits currently reachable through "bar" are rebased, and
> "bar" also gets updated.
>
> Björn
So this
1. won't be very useful, as you show it is easy
to achieve with existing commands.
2. interprets "foo" as branch name as opposed to
revision range.
OTOH, rebase --revisions as I implemented is a "smarter cherry-pick" which
can't easily be achieved with existing commands, especially if you add
"-i".
--
MST
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Björn Steinbrink @ 2009-12-08 16:41 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: git, Junio C Hamano
In-Reply-To: <20091208161142.GA32045@redhat.com>
On 2009.12.08 18:11:44 +0200, Michael S. Tsirkin wrote:
> On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> > On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > > Add --revisions flag to rebase, so that it can be used
> > > to apply an arbitrary range of commits on top
> > > of a current branch.
> > >
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > ---
> > >
> > > I've been wishing for this functionality for a while now,
> > > so here goes. This isn't yet properly documented and I didn't
> > > write a test, but the patch seems to work fine for me.
> > > Any early flames/feedback?
> >
> > This pretty much reverses what rebase normally does. Instead of "rebase
> > this onto that" it's "'rebase' that onto this". And instead of updating
> > the branch head that got rebased, the, uhm, "upstream" gets updated.
> >
> > Also, AFAICT this needs to be called like this:
> > git rebase --revisions foo..bar HEAD
> >
> > Changing the meaning of the <upstream> argument and relying on the fact
> > that <newbase> defaults to <upstream>. If such a thing gets added, it
> > should rather work like --root, not using <upstream> at all, but --onto
> > <newbase> only. Maybe defaulting to HEAD for <newbase> and making --onto
> > optional, as it's reversed WRT what it does compared to the usual
> > rebase.
>
> Sorry, I had trouble parsing the above. Could you suggest e.g. how the
> help line should look?
Current:
git rebase [-i | --interactive] [options] [--onto <newbase>]
<upstream> [<branch>]
git rebase [-i | --interactive] [options] --onto <newbase>
--root [<branch>]
Add:
git rebase [-i | --interactive] [options] --revisions <range> [<branch>]
(Thinking about it, I guess an explicit --onto makes no sense with the
--revisions flag)
> > But generally, I'd say it would be better to add such a range feature to
> > cherry-pick than abusing rebase for that.
>
> The reason to use rebase is that I often want to combine
> this with -i flag, editing patches as they are applied.
Hm, well, your patch didn't touch git-rebase--interactive.sh ;-)
Björn
^ permalink raw reply
* PATCH/RFC] gitweb.js: Workaround for IE8 bug
From: Jakub Narebski @ 2009-12-08 16:29 UTC (permalink / raw)
To: Stephen Boyd; +Cc: git
In-Reply-To: <1260148741.1579.50.camel@swboyd-laptop>
On Mon, 7 Dec 2009, Stephen Boyd wrote:
> On Sun, 2009-12-06 at 17:04 -0800, Stephen Boyd wrote:
> >
> > Ok. It's December and I've had some more time to look into this.
> > Initializing 'xhr' to null seems to get rid of the "Unknown error"
> > problem (see patch below).
> >
>
> Ah sorry. Seems this doesn't work and I was just getting lucky.
Does the following fixes the issue for IE8 for you (it works for me)?
As for testing, try with blaming 'revision.c' and 'gitweb/gitweb.perl'
using 'blame_incremental' view.
With probably too long commit message, and not detailed enough title:
-- >8 --
Subject: [PATCH] gitweb.js: Workaround for IE8 bug
In Internet Explorer 8 (IE8) the 'blame_incremental' view, which uses
JavaScript to generate blame info using AJAX, sometimes hang at the
beginning (at 0%) of blaming, e.g. for larger files with long history
like git's own gitweb/gitweb.perl.
The error shown by JavaScript console is "Unspecified error" at char:2
of the following line in gitweb/gitweb.js:
if (xhr.readyState === 3 && xhr.status !== 200) {
Debugging it using IE8 JScript debuger shown that the error occurs
when trying to access xhr.status (xhr is XMLHttpRequest object).
Watch for xhr object shows 'Unspecified error.' as "value" of
xhr.status, and trying to access xhr.status from console throws error.
This bug is some intermittent bug, depending on XMLHttpRequest timing,
as it doesn't occur in all cases. It is probably caused by the fact
that handleResponse is called from timer (pollTimer), to work around
the fact that some browsers call onreadystatechange handler only once
for each state change, and not like required for 'blame_incremental'
as soon as new data is available from server. It looks like xhr
object is not properly initialized; still it is a bug to throw an
error when accessing xhr.status (and not use 'null' or 'undefined' as
value).
Work around this bug in IE8 by using try-catch block when accessing
xhr.status.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
gitweb/gitweb.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.js b/gitweb/gitweb.js
index 2a25b7c..9c66928 100644
--- a/gitweb/gitweb.js
+++ b/gitweb/gitweb.js
@@ -779,7 +779,12 @@ function handleResponse() {
}
// the server returned error
- if (xhr.readyState === 3 && xhr.status !== 200) {
+ // try ... catch block is to work around bug in IE8
+ try {
+ if (xhr.readyState === 3 && xhr.status !== 200) {
+ return;
+ }
+ } catch (e) {
return;
}
if (xhr.readyState === 4 && xhr.status !== 200) {
--
1.6.5.3
^ permalink raw reply related
* Re: [PATCH RFC] rebase: add --revisions flag
From: Michael S. Tsirkin @ 2009-12-08 16:14 UTC (permalink / raw)
To: Björn Steinbrink; +Cc: git, Junio C Hamano
In-Reply-To: <20091208160822.GA1299@atjola.homenet>
On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > Add --revisions flag to rebase, so that it can be used
> > to apply an arbitrary range of commits on top
> > of a current branch.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >
> > I've been wishing for this functionality for a while now,
> > so here goes. This isn't yet properly documented and I didn't
> > write a test, but the patch seems to work fine for me.
> > Any early flames/feedback?
>
> This pretty much reverses what rebase normally does. Instead of "rebase
> this onto that" it's "'rebase' that onto this". And instead of updating
> the branch head that got rebased, the, uhm, "upstream" gets updated.
The last sentence is wrong I think - it is still the branch head that
is updated.
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Michael S. Tsirkin @ 2009-12-08 16:11 UTC (permalink / raw)
To: Björn Steinbrink; +Cc: git, Junio C Hamano
In-Reply-To: <20091208160822.GA1299@atjola.homenet>
On Tue, Dec 08, 2009 at 05:08:22PM +0100, Björn Steinbrink wrote:
> On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> > Add --revisions flag to rebase, so that it can be used
> > to apply an arbitrary range of commits on top
> > of a current branch.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >
> > I've been wishing for this functionality for a while now,
> > so here goes. This isn't yet properly documented and I didn't
> > write a test, but the patch seems to work fine for me.
> > Any early flames/feedback?
>
> This pretty much reverses what rebase normally does. Instead of "rebase
> this onto that" it's "'rebase' that onto this". And instead of updating
> the branch head that got rebased, the, uhm, "upstream" gets updated.
>
> Also, AFAICT this needs to be called like this:
> git rebase --revisions foo..bar HEAD
>
> Changing the meaning of the <upstream> argument and relying on the fact
> that <newbase> defaults to <upstream>. If such a thing gets added, it
> should rather work like --root, not using <upstream> at all, but --onto
> <newbase> only. Maybe defaulting to HEAD for <newbase> and making --onto
> optional, as it's reversed WRT what it does compared to the usual
> rebase.
Sorry, I had trouble parsing the above. Could you suggest e.g. how the
help line should look?
> But generally, I'd say it would be better to add such a range feature to
> cherry-pick than abusing rebase for that.
>
> Björn
The reason to use rebase is that I often want to combine
this with -i flag, editing patches as they are applied.
--
MST
^ permalink raw reply
* Re: [PATCH RFC] rebase: add --revisions flag
From: Björn Steinbrink @ 2009-12-08 16:08 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: git, Junio C Hamano
In-Reply-To: <20091208144740.GA30830@redhat.com>
On 2009.12.08 16:47:42 +0200, Michael S. Tsirkin wrote:
> Add --revisions flag to rebase, so that it can be used
> to apply an arbitrary range of commits on top
> of a current branch.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> I've been wishing for this functionality for a while now,
> so here goes. This isn't yet properly documented and I didn't
> write a test, but the patch seems to work fine for me.
> Any early flames/feedback?
This pretty much reverses what rebase normally does. Instead of "rebase
this onto that" it's "'rebase' that onto this". And instead of updating
the branch head that got rebased, the, uhm, "upstream" gets updated.
Also, AFAICT this needs to be called like this:
git rebase --revisions foo..bar HEAD
Changing the meaning of the <upstream> argument and relying on the fact
that <newbase> defaults to <upstream>. If such a thing gets added, it
should rather work like --root, not using <upstream> at all, but --onto
<newbase> only. Maybe defaulting to HEAD for <newbase> and making --onto
optional, as it's reversed WRT what it does compared to the usual
rebase.
But generally, I'd say it would be better to add such a range feature to
cherry-pick than abusing rebase for that.
Björn
^ permalink raw reply
* Re: [PATCH 2/2] t7508-status: test all modes with color
From: Michael J Gruber @ 2009-12-08 16:06 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <hflc82$sf8$1@ger.gmane.org>
Jakub Narebski venit, vidit, dixit 08.12.2009 12:10:
> Michael J Gruber wrote:
>
>> +decrypt_color () {
>> + sed \
>> + -e 's/.\[1m/<WHITE>/g' \
>> + -e 's/.\[31m/<RED>/g' \
>> + -e 's/.\[32m/<GREEN>/g' \
>> + -e 's/.\[34m/<BLUE>/g' \
>> + -e 's/.\[m/<RESET>/g'
>> +}
>
> Shouldn't this be better in test-lib.sh, or some common lib
> (lib-color.sh or color-lib.sh; we are unfortunately a bit inconsistent
> in naming here)?
Well, so far it's used in two places (and somewhat differently). I would
say test-libification starts at 3 :)
Michael
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox