* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Andreas Ericsson @ 2007-10-24 20:13 UTC (permalink / raw)
To: J. Bruce Fields
Cc: Steffen Prohaska, Johannes Schindelin, Jakub Narebski,
Federico Mena Quintero, git
In-Reply-To: <20071024194849.GH29830@fieldses.org>
J. Bruce Fields wrote:
> On Wed, Oct 24, 2007 at 09:41:05PM +0200, Andreas Ericsson wrote:
>> J. Bruce Fields wrote:
>>> On Wed, Oct 24, 2007 at 08:48:54PM +0200, Steffen Prohaska wrote:
>>>> The central shared repo is called project-shared.git and contains,
>>>> for example, the following branches:
>>>> master
>>>> next
>>>> work/topicA
>>>> work/topicB
>>>> ...
>>>>
>>>>
>>>> Developers clone the repo and check out the branches they are
>>>> interested in. For example a developer may want to track next
>>>> and work on topicB:
>>>>
>>>> git clone ssh://central.example.com/project-shared.git project
>>>> cd project
>>>> git checkout -b next origin/next
>>>> git checkout -b work/topicB origin/work/topicB
>>>>
>>>> This is sufficient. No adding of remotes is needed. Neither
>>>> is a private repository on a server required. After cloning,
>>>> developers have all they need.
>>>>
>>>> Later work/topicB has new commits and should be pushed:
>>>>
>>>> git push origin
>>>>
>>>> The default behaviour of push is fine. Only matching branches
>>>> are pushed.
>>>>
>>>> _But_, origin is a shared repository. Therefore branches may
>>>> have advanced and git push may report
>>>>
>>>> error: remote 'refs/heads/next' is not a strict subset of local ref
>>>> 'refs/heads/next'. maybe you are not up-to-date and need to pull first?
>>>>
>>>> So here's the problem. The developer didn't do anything wrong.
>>>> But git complaints with an error. Git also recommends to run
>>>> pull, so the developer runs "git pull". But this doesn't help,
>>>> because it's only updating work/topicB and "git push" will
>>>> complain with the very same error.
>>>>
>>>> What you need to do is
>>>>
>>>> git checkout <local-branch>
>>>> git pull
>>>> git checkout <local-branch2>
>>>> git pull
>>>> ...
>>>>
>>>> for every local branch.
>>> Or just
>>> git push origin work/topicB
>>> since that's all you really wanted to push anyway.
>> git pull. Not git push. git pull operates on one working branch
>> at a time (by default), whereas git push uploads and fast-forwards
>> all the common branches (by default).
>
> I understand. I was just suggesting that if the goal was to avoid the
> error message on push, then specifying the branch to push explicitly
> would be a solution.
>
A better way to avoid that error message is ofcourse to make sure one
always starts development off of the latest version of the particular
branch one wants to work on.
>> I want git pull to work like git push.
>
> That strikes me as a less complete solution, since it only helps in the
> case where the other branches all happen to be unmodified locally (hence
> can be fast-forwarded).
For a corporate environment with multiple modules, the scenario where the
upstream is modified and the local branches aren't is more common than
anything else. The failure on push happens because developers do
git pull; # Yup, gotta do that to get the latest changes
git checkout whatever; # Here's where I want to work
work work work
git push; # ach crivens! bloody stupid git of a tool to ALWAYS BREAK!
> In other cases the "git push" will still emit a
> spurious error.
>
If the tool can make it happen as few times as possible, that's good
enough for me. It's a lot easier to explain to my co-workers that
their push failed because someone else worked on it simultaneously
and pushed before they did, rather than telling them that they did
the pull/checkout sequence in the wrong order.
In the one scenario, it's "oh, I see". In the other, it's "god damn
piece of shit tool". Simple as that.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Steffen Prohaska @ 2007-10-24 20:12 UTC (permalink / raw)
To: J. Bruce Fields
Cc: Andreas Ericsson, Johannes Schindelin, Jakub Narebski,
Federico Mena Quintero, git
In-Reply-To: <20071024194849.GH29830@fieldses.org>
On Oct 24, 2007, at 9:48 PM, J. Bruce Fields wrote:
>
>> I want git pull to work like git push.
>
> That strikes me as a less complete solution, since it only helps in
> the
> case where the other branches all happen to be unmodified locally
> (hence
> can be fast-forwarded). In other cases the "git push" will still
> emit a
> spurious error.
Well, but then there's something you should really think
about. Then you _have_ local changes that are not at the remote.
You need to handle them somehow. Maybe you forgot to push
earlier and now the remote advanced.
Btw, the 'new' git pull should already have reported a warning
that it failed to fast forward the local branch. git pull
should have suggested to explicitly merge the branch with
local changes.
Steffen
^ permalink raw reply
* Small enhancements of the test-lib.sh
From: Pierre Habouzit @ 2007-10-24 20:03 UTC (permalink / raw)
To: gitster; +Cc: git
Here is a 2-patch series to enhance the test-suite so that the flood
is easier to follow to the eye.
The first patch is a rework of the previous one I sent, and implements
suggestions that were made to me.
The second add a --quiet option that basically stops the flood about
all the test that just pass, and only let the name of the master
t####foo.sh script be printed, and the summary of its test (and the
occasional spurious outputs the testsuite does).
This "series" is available as ph/testlib on my
git://git.madism.org/git.git
Cheers,
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: J. Bruce Fields @ 2007-10-24 19:48 UTC (permalink / raw)
To: Andreas Ericsson
Cc: Steffen Prohaska, Johannes Schindelin, Jakub Narebski,
Federico Mena Quintero, git
In-Reply-To: <471F9FD1.6080002@op5.se>
On Wed, Oct 24, 2007 at 09:41:05PM +0200, Andreas Ericsson wrote:
> J. Bruce Fields wrote:
>> On Wed, Oct 24, 2007 at 08:48:54PM +0200, Steffen Prohaska wrote:
>>> The central shared repo is called project-shared.git and contains,
>>> for example, the following branches:
>>> master
>>> next
>>> work/topicA
>>> work/topicB
>>> ...
>>>
>>>
>>> Developers clone the repo and check out the branches they are
>>> interested in. For example a developer may want to track next
>>> and work on topicB:
>>>
>>> git clone ssh://central.example.com/project-shared.git project
>>> cd project
>>> git checkout -b next origin/next
>>> git checkout -b work/topicB origin/work/topicB
>>>
>>> This is sufficient. No adding of remotes is needed. Neither
>>> is a private repository on a server required. After cloning,
>>> developers have all they need.
>>>
>>> Later work/topicB has new commits and should be pushed:
>>>
>>> git push origin
>>>
>>> The default behaviour of push is fine. Only matching branches
>>> are pushed.
>>>
>>> _But_, origin is a shared repository. Therefore branches may
>>> have advanced and git push may report
>>>
>>> error: remote 'refs/heads/next' is not a strict subset of local ref
>>> 'refs/heads/next'. maybe you are not up-to-date and need to pull first?
>>>
>>> So here's the problem. The developer didn't do anything wrong.
>>> But git complaints with an error. Git also recommends to run
>>> pull, so the developer runs "git pull". But this doesn't help,
>>> because it's only updating work/topicB and "git push" will
>>> complain with the very same error.
>>>
>>> What you need to do is
>>>
>>> git checkout <local-branch>
>>> git pull
>>> git checkout <local-branch2>
>>> git pull
>>> ...
>>>
>>> for every local branch.
>> Or just
>> git push origin work/topicB
>> since that's all you really wanted to push anyway.
>
> git pull. Not git push. git pull operates on one working branch
> at a time (by default), whereas git push uploads and fast-forwards
> all the common branches (by default).
I understand. I was just suggesting that if the goal was to avoid the
error message on push, then specifying the branch to push explicitly
would be a solution.
> I want git pull to work like git push.
That strikes me as a less complete solution, since it only helps in the
case where the other branches all happen to be unmodified locally (hence
can be fast-forwarded). In other cases the "git push" will still emit a
spurious error.
--b.
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Andreas Ericsson @ 2007-10-24 19:41 UTC (permalink / raw)
To: J. Bruce Fields
Cc: Steffen Prohaska, Johannes Schindelin, Jakub Narebski,
Federico Mena Quintero, git
In-Reply-To: <20071024192058.GF29830@fieldses.org>
J. Bruce Fields wrote:
> On Wed, Oct 24, 2007 at 08:48:54PM +0200, Steffen Prohaska wrote:
>> The central shared repo is called project-shared.git and contains,
>> for example, the following branches:
>> master
>> next
>> work/topicA
>> work/topicB
>> ...
>>
>>
>> Developers clone the repo and check out the branches they are
>> interested in. For example a developer may want to track next
>> and work on topicB:
>>
>> git clone ssh://central.example.com/project-shared.git project
>> cd project
>> git checkout -b next origin/next
>> git checkout -b work/topicB origin/work/topicB
>>
>> This is sufficient. No adding of remotes is needed. Neither
>> is a private repository on a server required. After cloning,
>> developers have all they need.
>>
>> Later work/topicB has new commits and should be pushed:
>>
>> git push origin
>>
>> The default behaviour of push is fine. Only matching branches
>> are pushed.
>>
>> _But_, origin is a shared repository. Therefore branches may
>> have advanced and git push may report
>>
>> error: remote 'refs/heads/next' is not a strict subset of local ref
>> 'refs/heads/next'. maybe you are not up-to-date and need to pull first?
>>
>> So here's the problem. The developer didn't do anything wrong.
>> But git complaints with an error. Git also recommends to run
>> pull, so the developer runs "git pull". But this doesn't help,
>> because it's only updating work/topicB and "git push" will
>> complain with the very same error.
>>
>> What you need to do is
>>
>> git checkout <local-branch>
>> git pull
>> git checkout <local-branch2>
>> git pull
>> ...
>>
>> for every local branch.
>
> Or just
>
> git push origin work/topicB
>
> since that's all you really wanted to push anyway.
>
git pull. Not git push. git pull operates on one working branch
at a time (by default), whereas git push uploads and fast-forwards
all the common branches (by default). I want git pull to work like
git push.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: git-remote: Use of uninitialized value in string ne, line 248
From: Alex Riesen @ 2007-10-24 19:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git discussion list
In-Reply-To: <7vwstc68bk.fsf@gitster.siamese.dyndns.org>
Junio C Hamano, Wed, Oct 24, 2007 13:49:51 +0200:
> Perhaps....
>
> git-remote.perl | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/git-remote.perl b/git-remote.perl
> index 9ca3e7e..4cee044 100755
> --- a/git-remote.perl
> +++ b/git-remote.perl
> @@ -244,7 +244,8 @@ sub show_remote {
> print "* remote $name\n";
> print " URL: $info->{'URL'}\n";
> for my $branchname (sort keys %$branch) {
> - next if ($branch->{$branchname}{'REMOTE'} ne $name);
> + next if (!$branch->{$branchname}{'REMOTE'} ||
just you never call yor branches "0".
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: J. Bruce Fields @ 2007-10-24 19:20 UTC (permalink / raw)
To: Steffen Prohaska
Cc: Johannes Schindelin, Jakub Narebski, Andreas Ericsson,
Federico Mena Quintero, git
In-Reply-To: <90325C2E-9AF4-40FB-9EFB-70B6D0174409@zib.de>
On Wed, Oct 24, 2007 at 08:48:54PM +0200, Steffen Prohaska wrote:
> The central shared repo is called project-shared.git and contains,
> for example, the following branches:
> master
> next
> work/topicA
> work/topicB
> ...
>
>
> Developers clone the repo and check out the branches they are
> interested in. For example a developer may want to track next
> and work on topicB:
>
> git clone ssh://central.example.com/project-shared.git project
> cd project
> git checkout -b next origin/next
> git checkout -b work/topicB origin/work/topicB
>
> This is sufficient. No adding of remotes is needed. Neither
> is a private repository on a server required. After cloning,
> developers have all they need.
>
> Later work/topicB has new commits and should be pushed:
>
> git push origin
>
> The default behaviour of push is fine. Only matching branches
> are pushed.
>
> _But_, origin is a shared repository. Therefore branches may
> have advanced and git push may report
>
> error: remote 'refs/heads/next' is not a strict subset of local ref
> 'refs/heads/next'. maybe you are not up-to-date and need to pull first?
>
> So here's the problem. The developer didn't do anything wrong.
> But git complaints with an error. Git also recommends to run
> pull, so the developer runs "git pull". But this doesn't help,
> because it's only updating work/topicB and "git push" will
> complain with the very same error.
>
> What you need to do is
>
> git checkout <local-branch>
> git pull
> git checkout <local-branch2>
> git pull
> ...
>
> for every local branch.
Or just
git push origin work/topicB
since that's all you really wanted to push anyway.
> The problem described can only happen with a shared repository.
> In a workflow that pulls from read-only repos and pushes to a
> private repo that is read-only for others, such a problem cannot
> happen. Because in a non-shared repository the branches cannot
> be advanced by others. But in a shared repository they can.
Actually I push to my public repo from multiple working repositories
(because usually I work on my laptop, but sometimes I do work from a
different machine), so the above can still happen.
--b.
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Steffen Prohaska @ 2007-10-24 18:48 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Jakub Narebski, Andreas Ericsson, Federico Mena Quintero, git
In-Reply-To: <Pine.LNX.4.64.0710231155321.25221@racer.site>
On Oct 23, 2007, at 12:58 PM, Johannes Schindelin wrote:
> On Tue, 23 Oct 2007, Steffen Prohaska wrote:
>
>>
>> On Oct 23, 2007, at 1:35 AM, Jakub Narebski wrote:
>>
>>> 2. Git can do a merge with conflicts _only_ if that branch is
>>> checked
>>> out.
>>
>> Andreas' proposal contains an important requirement that avoids this
>> problem. His proposal states "when they, prior to fetching,
>> pointed to
>> the same commit [the head in remotes pointed to]". That is only
>> fast-forwards are needed, which never have merge conflicts.
>
> You know what I do not like with this proposal? The whole _point_
> of this
> discussion is to make git _easier_. Go ahead, try to explain to a
> complete git newbie the proposed behaviour. I have a pound here which
> says that there is _no_ _way_ that this newbie says "well, that's
> easy".
>
> Some people may not get this, but git has a reputation of being
> complicated, and my "BS" argument was, is, and will be, that we should
> keep clear and simple semantics, because they are the _only_ way to
> battle
> that reputation.
I try to explain the workflow that I'd use the feature for.
Maybe an easier setup could be used to achieve the same.
Any suggestions for a simpler setup are welcome.
The workflow is used by a group of developers that all have
access to a shared repository. One major goal is to keep the
setup for most developers simple. They are new to git and
as few commands as possible should be sufficient to start
working. Besides the typical stable branches (master, next)
shared topic branches should be available that can be used
to develop and review features before they are merged to the
stable branches. Patches are not send by email.
So here's the setup:
The central shared repo is called project-shared.git and contains,
for example, the following branches:
master
next
work/topicA
work/topicB
...
Developers clone the repo and check out the branches they are
interested in. For example a developer may want to track next
and work on topicB:
git clone ssh://central.example.com/project-shared.git project
cd project
git checkout -b next origin/next
git checkout -b work/topicB origin/work/topicB
This is sufficient. No adding of remotes is needed. Neither
is a private repository on a server required. After cloning,
developers have all they need.
Later work/topicB has new commits and should be pushed:
git push origin
The default behaviour of push is fine. Only matching branches
are pushed.
_But_, origin is a shared repository. Therefore branches may
have advanced and git push may report
error: remote 'refs/heads/next' is not a strict subset of local ref
'refs/heads/next'. maybe you are not up-to-date and need to pull first?
So here's the problem. The developer didn't do anything wrong.
But git complaints with an error. Git also recommends to run
pull, so the developer runs "git pull". But this doesn't help,
because it's only updating work/topicB and "git push" will
complain with the very same error.
What you need to do is
git checkout <local-branch>
git pull
git checkout <local-branch2>
git pull
...
for every local branch.
This is absolutely stupid. Therefore the developer starts
to hate git, or she just starts to ignore the errors because
they don't have a real meaning most of the times. And later,
when the error could be helpful she would ignore it, too.
The problem described can only happen with a shared repository.
In a workflow that pulls from read-only repos and pushes to a
private repo that is read-only for others, such a problem cannot
happen. Because in a non-shared repository the branches cannot
be advanced by others. But in a shared repository they can.
I see two reasonable solutions:
1) "git push" only pushes the current branch.
2) "git pull" pulls all branches as proposed by Andreas.
Maybe something that I don't see is fundamentally wrong with
the setup.
Johannes, you mentioned that it is essential to distinguish
remote branches from local branches. In general, I agree. The
problem described above is 'smaller' if you have less local
branches that you're not actively working on. But I believe
it is reasonable to have more than one of them. The remotes
track everything and your local branches are a subset of things
you're interested in although you're not working on each of
the branch every day. I don't think it's reasonable to delete
a local branch immediately each time you stopped working on it.
I think root of the problem is that git is more focused on
pulling from read-only and pushing to non-shared repos. The
support for shared repos needs to be improved before it
is perfect.
Steffen
^ permalink raw reply
* Re: What's cooking in git.git (topics)
From: Andreas Ericsson @ 2007-10-24 18:27 UTC (permalink / raw)
To: Scott Parish; +Cc: Junio C Hamano, git
In-Reply-To: <20071024160852.GA759@srparish.net>
Scott Parish wrote:
> On Wed, Oct 24, 2007 at 05:51:28AM -0700, Junio C Hamano wrote:
>
>> * js/PATH (Sun Oct 21 22:59:01 2007 +0100) 1 commit
>> - execv_git_cmd(): also try PATH if everything else fails.
>>
>> I do not quite get why this is needed; need to go back to the
>> discussion myself. On the other hand, I found the alternative
>> approach suggested on the list very interesting (i.e. instead of
>> "also try", just letting exec*p use PATH, relying on the fact
>> that we do prepend-to-path anyway). What happened to it? Was
>> there a downside?
>
> The main downside that was raised was MingW compatibility, but
> Schindelin and Sixt both said that it could wait until further
> work is done porting to MingW.
>
> Should i resend my string of patches? I've seen people numbering
> their patches, should i do that as well?
>
'git format-patch -n' will do it for you. I take it you've found
out about git-send-email already?
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: UI and git-completion.sh
From: Johannes Gilger @ 2007-10-24 17:34 UTC (permalink / raw)
To: git
In-Reply-To: <86ve8x9z1f.fsf@blue.stonehenge.com>
Randal L. Schwartz wrote:
> Where is it? I'm a zsh user, and would love to have git support.
>
Another way to get git-completion support with zsh (works with 4.3.2) is to use
the existing bash-completion and enable bash-completion for zsh via:
autoload bashcompinit
bashcompinit
in your .zshrc or similar. Btw, if you use gentoo you can install git with bash-completion,
although i suppose that most people here are not using emerge to get their git ;).
Greetings,
Johannes
--
Johannes Gilger <heipei@hackvalue.de>
http://hackvalue.de/heipei/
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81 882C 58EE B178 42F6 DE81
^ permalink raw reply
* Re: Recover a stash
From: Johannes Schindelin @ 2007-10-24 17:42 UTC (permalink / raw)
To: Medve Emilian-EMMEDVE1; +Cc: git
In-Reply-To: <598D5675D34BE349929AF5EDE9B03E27016E5841@az33exm24.fsl.freescale.net>
Hi,
On Wed, 24 Oct 2007, Medve Emilian-EMMEDVE1 wrote:
> Is there any way to recover a stash as a... stash? I accidently removed
> a stash I still need and I'd like to recover it as a stash. I can see
> the dangling commit objects in the database with git lost-found and I
> can have a branch/head point at them, but it's not understood as stash
> anymore.
You should be able to recover it with
git update-ref refs/stash <commit>
Where the <commit> points to the merge commit of the stashed index and the
stashed working directory.
Hth,
Dscho
^ permalink raw reply
* Recover a stash
From: Medve Emilian-EMMEDVE1 @ 2007-10-24 17:26 UTC (permalink / raw)
To: git
Hello,
Is there any way to recover a stash as a... stash? I accidently removed
a stash I still need and I'd like to recover it as a stash. I can see
the dangling commit objects in the database with git lost-found and I
can have a branch/head point at them, but it's not understood as stash
anymore.
Thank you,
Emil.
^ permalink raw reply
* Re: UI and git-completion.sh
From: Pierre Habouzit @ 2007-10-24 17:07 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Paolo Ciarrocchi, git
In-Reply-To: <Pine.LNX.4.64.0710241113190.25221@racer.site>
[-- Attachment #1: Type: text/plain, Size: 445 bytes --]
On Wed, Oct 24, 2007 at 10:20:07AM +0000, Johannes Schindelin wrote:
> BTW Pierre's idea of generating many (if not all) of these completions on
> the fly (maybe with "--help-completion"?) is intriguing.
To be fair, it's not my idea, I'm just bought to it.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: What's cooking in git.git (topics)
From: Scott Parish @ 2007-10-24 16:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vzly84qwf.fsf@gitster.siamese.dyndns.org>
On Wed, Oct 24, 2007 at 05:51:28AM -0700, Junio C Hamano wrote:
> * js/PATH (Sun Oct 21 22:59:01 2007 +0100) 1 commit
> - execv_git_cmd(): also try PATH if everything else fails.
>
> I do not quite get why this is needed; need to go back to the
> discussion myself. On the other hand, I found the alternative
> approach suggested on the list very interesting (i.e. instead of
> "also try", just letting exec*p use PATH, relying on the fact
> that we do prepend-to-path anyway). What happened to it? Was
> there a downside?
The main downside that was raised was MingW compatibility, but
Schindelin and Sixt both said that it could wait until further
work is done porting to MingW.
Should i resend my string of patches? I've seen people numbering
their patches, should i do that as well?
Thanks
sRp
--
Scott Parish
http://srparish.net/
^ permalink raw reply
* Re: Howto request: going home in the middle of something?
From: Jing Xue @ 2007-10-24 13:44 UTC (permalink / raw)
To: Matthias Kestenholz; +Cc: Jan Wielemaker, Petr Baudis, git
In-Reply-To: <256C87B5-3ADE-4A96-9530-A45B97601BAA@spinlock.ch>
On Tue, Oct 23, 2007 at 10:28:46PM +0200, Matthias Kestenholz wrote:
> Hi,
Hi,
> If someone tracks the main branch you are working on and fetches
> while you are travelling home, he has the WIP commit as a new tip
> in his tree.
> If he bases further work upon the WIP commit, he'll need to rebase
> or merge his changes onto your new tip once you have amended or
> replaced the commit. If you are working on the
> master branch, you should really avoid rewinding it. Rewinding topic
> branches is ok, but a temporary branch is still better to clearly tell
> potential fetch-ers that this is only Work in Progress, and not meant
> to be published in the current state.
Good point. Although I guess if some workflow lets you directly hack on a
public branch, it can have lots of other issues beyond just the WIP
being pulled accidentally, no?
Cheers.
--
Jing Xue
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Catalin Marinas @ 2007-10-24 13:15 UTC (permalink / raw)
To: Jakub Narebski
Cc: Karl Hasselström, Johannes Schindelin, Andreas Ericsson,
Steffen Prohaska, Federico Mena Quintero, git
In-Reply-To: <8fe92b430710240404u202521d4g2275bc4886956807@mail.gmail.com>
On Wed, 2007-10-24 at 13:04 +0200, Jakub Narebski wrote:
> On 10/24/07, Karl Hasselström <kha@treskal.com> wrote:
> > On 2007-10-24 04:06:38 +0200, Jakub Narebski wrote:
> >
> >> 5. git format-patch to generate patch series; use git-shortlog or
> >> grepping for patches subjects and git-diff --stat to generate
> >> introductory email. Unfortunately StGIT template for introductory
> >> email does have neither shortlog nor diffstat fields to atomatically
> >> fill.
> >
> > It does now! (I don't think it's in any released version yet, though.)
>
> That is nice to hear.
>
> By the way, there is SRPM for StGIT in
> http://homepage.ntlworld.com/cmarinas/stgit/
> (I need it because I have Python 2.4), but it is not listed on downloads page...
I never thought anyone would need it. I find the .tar.gz better.
BTW, what is the problem with Python 2.4? Was the RPM built for a
different version? The upcoming 0.14 release will be based on Python 2.5
but we keep the compatibility with 2.4 (we dropped 2.3).
--
Catalin
^ permalink raw reply
* Re: What's cooking in git.git (topics)
From: David Symonds @ 2007-10-24 13:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vzly84qwf.fsf@gitster.siamese.dyndns.org>
On 10/24/07, Junio C Hamano <gitster@pobox.com> wrote:
>
> * ds/gitweb (Mon Oct 22 10:28:03 2007 +1000) 1 commit
> + gitweb: Provide title attributes for abbreviated author names.
I was hoping you could include my other two related patches on top of
that one, since they clean it up somewhat.
Dave.
^ permalink raw reply
* Re: [PATCH 2/2] Quoting paths in tests
From: Jonathan del Strother @ 2007-10-24 13:07 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano
In-Reply-To: <4716F849.3090102@viscovery.net>
On 18 Oct 2007, at 07:08, Johannes Sixt wrote:
> Jonathan del Strother schrieb:
>> On 17 Oct 2007, at 12:32, Johannes Sixt wrote:
>>> Jonathan del Strother schrieb:
>>>> --- a/t/lib-git-svn.sh
>>>> +++ b/t/lib-git-svn.sh
>>>> @@ -25,7 +25,7 @@ perl -w -e "
>>>> use SVN::Core;
>>>> use SVN::Repos;
>>>> \$SVN::Core::VERSION gt '1.1.0' or exit(42);
>>>> -system(qw/svnadmin create --fs-type fsfs/, '$svnrepo') == 0 or
>>>> exit(41);
>>>> +system(qw/svnadmin create --fs-type fsfs/, \"$svnrepo\") == 0 or
>>>> exit(41);
>>>
>>> Here you have to work harder: The reason is that this is part of a
>>> perl expression (as opposed to an eval'd string), which does not
>>> have access to $svnrepo of the shell by which it is invoked. The
>>> original version failed if there were single-quotes in $svnrepo,
>>> the new version fails if it contains double-quotes.
>
> You can rewrite this expression as
> perl -w -e '$svnrepo = shift;
> ...
> $SVN::Core::Version gt "1.1.0" ...
> system(qw/svnadmin create --fs-type fsfs/, $svnrepo) == 0 ...
> ...
> ' >&3 2>&4 "$svnrepo"
>
> i.e. you pass the repository name as an argument to the scriptlet.
>
>>> May I recommend that you run the test suite in a directory named
>>> like this:
>>>
>>> $ mkdir \"\ \$GIT_DIR\ \'
>>> $ ls
>>> " $GIT_DIR '
>> Eww. I'm struggling a bit with paths this perverse, actually.
>> For instance, git_editor in git-sh-setup expects the editor path to
>> be pre-quoted. So in t3404, you need to produce escaped double
>> quotes & dollar signs, resulting in unpleasantness like this :
>> VISUAL="`pwd`/fake-editor.sh"
>> VISUAL=${VISUAL//\"/\\\"}
>> VISUAL=${VISUAL//$/\\\$}
>
> This is a bashism - that's a big no-no.
>
>> VISUAL=\"$VISUAL\"
>> export VISUAL
>> And I'm struggling to come up with neat ways of rewriting things
>> like, eg, this bit from t5500 -
>> test_expect_success "clone shallow" "git-clone --depth 2 \"file://
>> `pwd`/.\" shallow"
>> - to handle paths like that properly.
>
> These examples expand `pwd` too early. Can't you just put everything
> inside single-quotes? Although I'm not sure about VISUAL: Is it
> invoked with $PWD that is different from $PWD when VISUAL is
> defined? If so, then you can hardly delay `pwd`...
>
> I know I'm a bit anal with my criticism. I reviewed your patch
> because I think fixing for paths with whitespace is worthwhile.
> However, I also think any fix should go the full way and not only
> shift the problems into a different corner. Maybe a word from
> $maintainer would be in order ;)
In theory, I agree that the tests should properly handle perverse
paths, but it's beginning to stretch my shell scripting skills.
So now our esteemed leader is back in business, any thoughts on how
hard we want to work to quote things?
Also, from "What's cooking in git.git" :
> I have a feeling that this should have forked off of 'maint'.
> The change looks obvious and trivial, so perhaps after getting a
> testcase (hint, hint) merge to 'master' and then cherry-pick to
> 'maint' as well.
Noted
Jon del Strother
^ permalink raw reply
* What's cooking in git.git (topics)
From: Junio C Hamano @ 2007-10-24 12:51 UTC (permalink / raw)
To: git
In-Reply-To: <20071022063222.GS14735@spearce.org>
Thanks to Shawn who was a terrific interim maintainer while I
was away, there are quite a few new topics in 'pu'. The ones in
'next' look safe enough to me, and may graduate to 'master' by
the end of the month. We'll see.
Here are the topics that have been cooking. Commits prefixed
with '-' are only in 'pu' while commits prefixed with '+' are
in 'next'. The topics list the commits in reverse chronological
order.
* cc/skip (Mon Oct 22 07:49:39 2007 +0200) 9 commits
- Bisect: add a "bisect replay" test case.
- Bisect: add "bisect skip" to the documentation.
- Bisect: refactor "bisect_{bad,good,skip}" into "bisect_state".
- Bisect: refactor some logging into "bisect_write".
- Bisect: refactor "bisect_write_*" functions.
- Bisect: implement "bisect skip" to mark untestable revisions.
- Bisect: fix some white spaces and empty lines breakages.
- rev-list documentation: add "--bisect-all".
- rev-list: implement --bisect-all
Still "just parked" as Shawn described, but three patches were
replaced and as a result the series has a single liner fix since
the last "What's cooking".
* ds/gitweb (Mon Oct 22 10:28:03 2007 +1000) 1 commit
+ gitweb: Provide title attributes for abbreviated author names.
* lt/rename (Mon Oct 22 10:29:16 2007 -0700) 2 commits
- Linear-time/space rename logic (exact renames only)
- Split out "exact content match" phase of rename detection
The tip commit has been replaced with a new one (actually,
squash of a few commits) since Shawn's announcement and now
t4001 passes.
* js/PATH (Sun Oct 21 22:59:01 2007 +0100) 1 commit
- execv_git_cmd(): also try PATH if everything else fails.
I do not quite get why this is needed; need to go back to the
discussion myself. On the other hand, I found the alternative
approach suggested on the list very interesting (i.e. instead of
"also try", just letting exec*p use PATH, relying on the fact
that we do prepend-to-path anyway). What happened to it? Was
there a downside?
* ja/shorthelp (Sun Oct 21 01:41:41 2007 +0300) 1 commit
+ On error, do not list all commands, but point to --help option
Shawn says he likes this, and I tend to agree.
* db/fetch-pack (Sat Oct 20 16:03:49 2007 -0400) 60 commits
+ Define compat version of mkdtemp for systems lacking it
+ Avoid scary errors about tagged trees/blobs during git-fetch
+ fetch: if not fetching from default remote, ignore default merge
+ Support 'push --dry-run' for http transport
+ Support 'push --dry-run' for rsync transport
+ Fix 'push --all branch...' error handling
+ Fix compilation when NO_CURL is defined
+ Added a test for fetching remote tags when there is not tags.
+ Fix a crash in ls-remote when refspec expands into nothing
...
This has been cooking forever in git timescale. Judging from
the type of fixes going in, I can see people are using this in
production and the topic is not terribly broken.
* js/forkexec (Fri Oct 19 21:48:06 2007 +0200) 74 commits
+ Use the asyncronous function infrastructure to run the content
filter.
+ Avoid a dup2(2) in apply_filter() - start_command() can do it for
us.
+ t0021-conversion.sh: Test that the clean filter really cleans
content.
+ upload-pack: Run rev-list in an asynchronous function.
+ upload-pack: Move the revision walker into a separate function.
+ Use the asyncronous function infrastructure in builtin-fetch-
pack.c.
+ Add infrastructure to run a function asynchronously.
+ upload-pack: Use start_command() to run pack-objects in
create_pack_file().
+ Have start_command() create a pipe to read the stderr of the
child.
+ Use start_comand() in builtin-fetch-pack.c instead of explicit
fork/exec.
+ Use run_command() to spawn external diff programs instead of
fork/exec.
+ Use start_command() to run content filters instead of explicit
fork/exec.
+ Use start_command() in git_connect() instead of explicit
fork/exec.
+ Change git_connect() to return a struct child_process instead of a
pid_t.
Gave a cursory look at a few of the patches but they all looked
fine.
* tf/afs (Fri Oct 19 07:38:16 2007 -0500) 1 commit
- Better support AFS hardlinking across object directories
I share Shawn's concern of breaking the "never replace existing
object" security. Will probably drop this patch in the current
shape.
* jk/terse-fetch (Fri Oct 19 03:40:57 2007 -0400) 62 commits
- park
- git-fetch: mega-terse fetch output
Haven't caught up with the output format discussion. Hopefully
somebody will implement the list concensus and resend a
replacement patch, at which time I can drop these two before
looking at these two patches ;-).
* np/progress (Fri Oct 19 01:01:40 2007 -0400) 9 commits
+ Stop displaying "Pack pack-$ID created." during git-gc
+ Teach prune-packed to use the standard progress meter
+ Change 'Deltifying objects' to 'Compressing objects'
+ fix for more minor memory leaks
+ fix const issues with some functions
+ pack-objects.c: fix some global variable abuse and memory leaks
+ pack-objects: no delta possible with only one object in the list
+ cope with multiple line breaks within sideband progress messages
+ more compact progress display
"Compressing objects" caught my eye, but it all makes sense.
* sp/mergetool (Thu Oct 18 12:25:34 2007 +0200) 3 commits
+ mergetool: avoid misleading message "Resetting to default..."
+ mergetool: add support for ECMerge
+ mergetool: use path to mergetool in config var
mergetool.<tool>.path
* jk/send-pack (Thu Oct 18 02:17:46 2007 -0400) 2 commits
+ t5516: test update of local refs on push
+ send-pack: don't update tracking refs on error
* js/rebase (Wed Oct 17 10:31:35 2007 +0100) 1 commit
+ Fixing path quoting in git-rebase
I have a feeling that this should have forked off of 'maint'.
The change looks obvious and trivial, so perhaps after getting a
testcase (hint, hint) merge to 'master' and then cherry-pick to
'maint' as well.
* js/reflog-delete (Wed Oct 17 02:50:45 2007 +0100) 1 commit
+ Teach "git reflog" a subcommand to delete single entries
Obviously this was meant for git-stash, but I am not sure if
allowing to drop reflog entries in the middle is a good idea in
general. If we are going to change the UI and the end-user view
for stash _anyway_, we may be better off reimplementing stash as
separate, numbered and/or named refs (e.g. refs/stash/stash-$n).
* jc/stash-create (Mon Jul 9 00:51:23 2007 -0700) 2 commits
+ rebase: allow starting from a dirty tree.
+ stash: implement "stash create"
As I already said earlier, I do not think unstashing always on
top of rebased state is the right thing to do anyway, we would
want to change the behaviour of the tip one, but the question is
how.
* dz/color-addi (Tue Oct 16 21:42:23 2007 -0400) 1 commit
- Add color support to git-add--interactive
* jc/revert-merge (Tue Oct 23 13:33:26 2007 -0700) 1 commit
- revert/cherry-pick: work on merge commits as well
Allowing to revert/cherry-pick a merge commit. I got my first
exposure to the new option parser because I had to adjust to the
new "--mainline" option. The option is supposed to take positive
integer as a value but I left it as a generic OPT_INTEGER for
now and as a result you may get funny error messages if you give
nonsense input.
* ph/parseopt (Mon Oct 15 23:06:02 2007 +0200) 22 commits
- Make builtin-pack-refs.c use parse_options.
- Make builtin-name-rev.c use parse_options.
- Make builtin-count-objects.c use parse_options.
- Make builtin-fsck.c use parse_options.
- Update manpages to reflect new short and long option aliases
- Make builtin-for-each-ref.c use parse-opts.
- Make builtin-symbolic-ref.c use parse_options.
- Make builtin-update-ref.c use parse_options
- Make builtin-revert.c use parse_options.
- Make builtin-describe.c use parse_options
- Make builtin-branch.c use parse_options.
- Make builtin-mv.c use parse-options
- Make builtin-rm.c use parse_options.
- Port builtin-add.c to use the new option parser.
- parse-options: allow callbacks to take no arguments at all.
- parse-options: Allow abbreviated options when unambiguous
- Add shortcuts for very often used options.
- parse-options: make some arguments optional, add callbacks.
- Rework make_usage to print the usage message immediately
- Add tests for parse-options.c
- parse-options: be able to generate usages automatically
- Add a simple option parser.
* sp/push-refspec (Sun Oct 14 10:54:45 2007 +0200) 6 commits
- push, send-pack: use same rules as git-rev-parse to resolve
refspecs
- add ref_cmp_full_short() comparing full ref name with a short name
- push, send-pack: support pushing HEAD to real ref name
- rev-parse: teach "git rev-parse --symbolic" to print the full ref
name
- add get_sha1_with_real_ref() returning full name of ref on demand
- push, send-pack: fix test if remote branch exists for colon-less
refspec
* kh/commit (Mon Sep 17 20:06:47 2007 -0400) 4 commits
+ Export rerere() and launch_editor().
+ Introduce entry point add_interactive and add_files_to_cache
+ Enable wt-status to run against non-standard index file.
+ Enable wt-status output to a given FILE pointer.
* jc/spht (Tue Oct 2 18:00:27 2007 -0700) 1 commit
- git-diff: complain about >=8 consecutive spaces in initial indent
* jc/nu (Mon Oct 1 19:35:12 2007 -0700) 2 commits
- PARK a bit more work
- (PARK) WIP
* jc/pathspec (Thu Sep 13 13:38:19 2007 -0700) 3 commits
- pathspec_can_match(): move it from builtin-ls-tree.c to tree.c
- ls-tree.c: refactor show_recursive() and rename it.
- tree-diff.c: split out a function to match a single pattern.
^ permalink raw reply
* Re: git-remote: Use of uninitialized value in string ne, line 248
From: martin f krafft @ 2007-10-24 11:59 UTC (permalink / raw)
To: Junio C Hamano, git discussion list
In-Reply-To: <7vwstc68bk.fsf@gitster.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
also sprach Junio C Hamano <gitster@pobox.com> [2007.10.24.1349 +0200]:
> - next if ($branch->{$branchname}{'REMOTE'} ne $name);
> + next if (!$branch->{$branchname}{'REMOTE'} ||
> + $branch->{$branchname}{'REMOTE'} ne $name);
Confirmed: this fixes the issue. Thanks.
--
martin | http://madduck.net/ | http://two.sentenc.es/
"convictions are more dangerous enemies of truth than lies."
- friedrich nietzsche
spamtraps: madduck.bogus@madduck.net
[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: git-remote: Use of uninitialized value in string ne, line 248
From: Junio C Hamano @ 2007-10-24 11:49 UTC (permalink / raw)
To: martin f krafft; +Cc: git discussion list
In-Reply-To: <20071024110807.GA12501@piper.oerlikon.madduck.net>
martin f krafft <madduck@madduck.net> writes:
> piper:~> git remote show origin
> * remote origin
> URL: ssh://git.madduck.net/~/git/etc/mailplate.git
> Use of uninitialized value in string ne at /usr/local/stow/git/bin/git-remote line 248.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Perhaps....
git-remote.perl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-remote.perl b/git-remote.perl
index 9ca3e7e..4cee044 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -244,7 +244,8 @@ sub show_remote {
print "* remote $name\n";
print " URL: $info->{'URL'}\n";
for my $branchname (sort keys %$branch) {
- next if ($branch->{$branchname}{'REMOTE'} ne $name);
+ next if (!$branch->{$branchname}{'REMOTE'} ||
+ $branch->{$branchname}{'REMOTE'} ne $name);
my @merged = map {
s|^refs/heads/||;
$_;
^ permalink raw reply related
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Karl Hasselström @ 2007-10-24 11:31 UTC (permalink / raw)
To: Jakub Narebski
Cc: Johannes Schindelin, Andreas Ericsson, Steffen Prohaska,
Federico Mena Quintero, git, Catalin Marinas
In-Reply-To: <8fe92b430710240404u202521d4g2275bc4886956807@mail.gmail.com>
On 2007-10-24 13:04:01 +0200, Jakub Narebski wrote:
> By the way, there is SRPM for StGIT in
> http://homepage.ntlworld.com/cmarinas/stgit/ (I need it because I
> have Python 2.4), but it is not listed on downloads page...
I'll leave the webpage question to Catalin, but I'm curious about the
Python version remark. What exactly is the problem?
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply
* Re: git-{diff,ls}-files from a subdirectory fails ...
From: Karl Hasselström @ 2007-10-24 11:26 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
In-Reply-To: <20071024104055.GB3908@diana.vm.bytemark.co.uk>
On 2007-10-24 12:40:55 +0200, Karl Hasselström wrote:
> On 2007-10-24 11:06:43 +0100, Johannes Schindelin wrote:
>
> > IOW if you run git version v1.5.3.4-14-gdd5c8af or newer, you
> > should not experience this.
>
> Thanks for the pointer; that looks like it might indeed fix this
> bug. Will hopefully have time to verify later today.
It works! Very timely bugfix ...
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply
* git-remote: Use of uninitialized value in string ne, line 248
From: martin f krafft @ 2007-10-24 11:08 UTC (permalink / raw)
To: git discussion list
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
I am useless at Perl, otherwise I'd fix this, but I don't know
what's going on, so best I can do is report it. This is against
current tip of master.
piper:~> git remote show origin
* remote origin
URL: ssh://git.madduck.net/~/git/etc/mailplate.git
Use of uninitialized value in string ne at /usr/local/stow/git/bin/git-remote line 248.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Tracked remote branches
master
piper:~> git branch
* master
--
martin | http://madduck.net/ | http://two.sentenc.es/
"... and so he killed Miguel in a rit of fealous jage."
-- inspector clouseau
spamtraps: madduck.bogus@madduck.net
[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
From: Jakub Narebski @ 2007-10-24 11:04 UTC (permalink / raw)
To: Karl Hasselström
Cc: Johannes Schindelin, Andreas Ericsson, Steffen Prohaska,
Federico Mena Quintero, git
In-Reply-To: <20071024102950.GA3908@diana.vm.bytemark.co.uk>
On 10/24/07, Karl Hasselström <kha@treskal.com> wrote:
> On 2007-10-24 04:06:38 +0200, Jakub Narebski wrote:
>
>> 5. git format-patch to generate patch series; use git-shortlog or
>> grepping for patches subjects and git-diff --stat to generate
>> introductory email. Unfortunately StGIT template for introductory
>> email does have neither shortlog nor diffstat fields to atomatically
>> fill.
>
> It does now! (I don't think it's in any released version yet, though.)
That is nice to hear.
By the way, there is SRPM for StGIT in
http://homepage.ntlworld.com/cmarinas/stgit/
(I need it because I have Python 2.4), but it is not listed on downloads page...
--
Jakub Narebski
^ 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