tags and patches

10 messages, 4 authors, 2016-06-15 · open the first message on its own page

tags and patches

From: Geoff Russell <hidden>
Date: 2016-06-15 22:43:16

Dear gits,

(I'm on 1.5.0.5)

The last tag made seems to be missing from a patch ... eg.

        cd ~ ; mkdir myrepo ; cd myrepo
        git init-db ; echo STUFF > xxx ; git add xxx
        # work, work, work on xxx
        git commit -a
        git tag v1.0
        # work work work on xxx
        # then I clone this repository
        cd /tmp ; git clone ~/myrepo newmyrepo
        # go back and work some more
        cd ~/myrepo
        echo YYY >>xxx
        git commit -a
        git tag v1.1
        # is git commit -a required to commit the tag???
        git format-patch v1.0
        cd /tmp/newmyrepo
        git am ~/myrepo/THEPATCHNAME
        git tag ls

Where is tag v1.1 ?

Cheers,
Geoff Russell

Re: tags and patches

From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:43:16

On Wed, Jun 13, 2007 at 08:22:23PM +0930, Geoff Russell wrote:
Dear gits,

(I'm on 1.5.0.5)

The last tag made seems to be missing from a patch ... eg.

       cd ~ ; mkdir myrepo ; cd myrepo
       git init-db ; echo STUFF > xxx ; git add xxx
       # work, work, work on xxx
       git commit -a
       git tag v1.0
       # work work work on xxx
       # then I clone this repository
       cd /tmp ; git clone ~/myrepo newmyrepo
       # go back and work some more
       cd ~/myrepo
       echo YYY >>xxx
       git commit -a
       git tag v1.1
       # is git commit -a required to commit the tag???
       git format-patch v1.0
       cd /tmp/newmyrepo
       git am ~/myrepo/THEPATCHNAME
       git tag ls
  git tag ls is not the proper way to list tags. Afaict there isn't any
yet, except: ls .git/refs/tags/

  git tag ls just tagged your HEAD with the name 'ls' which is obviously
not what you meant :)

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Re: tags and patches

From: Geoff Russell <hidden>
Date: 2016-06-15 22:43:16

On 6/13/07, Pierre Habouzit [off-list ref] wrote:
On Wed, Jun 13, 2007 at 08:22:23PM +0930, Geoff Russell wrote:
quoted
Dear gits,

(I'm on 1.5.0.5)

The last tag made seems to be missing from a patch ... eg.

       cd ~ ; mkdir myrepo ; cd myrepo
       git init-db ; echo STUFF > xxx ; git add xxx
       # work, work, work on xxx
       git commit -a
       git tag v1.0
       # work work work on xxx
       # then I clone this repository
       cd /tmp ; git clone ~/myrepo newmyrepo
       # go back and work some more
       cd ~/myrepo
       echo YYY >>xxx
       git commit -a
       git tag v1.1
       # is git commit -a required to commit the tag???
       git format-patch v1.0
       cd /tmp/newmyrepo
       git am ~/myrepo/THEPATCHNAME
       git tag ls
  git tag ls is not the proper way to list tags. Afaict there isn't any
yet, except: ls .git/refs/tags/

  git tag ls just tagged your HEAD with the name 'ls' which is obviously
not what you meant :)
Ooops. Yes, I meant "git tag -l" as the last command, which lists the tags,
but doesn't list v1.1.

Geoff.
--
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Re: tags and patches

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:16

Hi,

On Wed, 13 Jun 2007, Geoff Russell wrote:
Dear gits,
;-)
[...]

       git tag v1.1
       git format-patch v1.0
       cd /tmp/newmyrepo
       git am ~/myrepo/THEPATCHNAME

Where is tag v1.1 ?
Tags are not propagated with patches. Sorry.

Ciao,
Dscho

Re: tags and patches

From: Geoff Russell <hidden>
Date: 2016-06-15 22:43:16

On 6/13/07, Johannes Schindelin [off-list ref] wrote:
Hi,

On Wed, 13 Jun 2007, Geoff Russell wrote:
quoted
Dear gits,
;-)
quoted
[...]

       git tag v1.1
       git format-patch v1.0
       cd /tmp/newmyrepo
       git am ~/myrepo/THEPATCHNAME

Where is tag v1.1 ?
Tags are not propagated with patches. Sorry.
Is this considered to be a bug to be eventually fixed or a feature?

Geoff

Ciao,
Dscho

Re: tags and patches

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:16

Hi,

On Thu, 14 Jun 2007, Geoff Russell wrote:
On 6/13/07, Johannes Schindelin [off-list ref] wrote:
quoted
Hi,

On Wed, 13 Jun 2007, Geoff Russell wrote:
quoted
Dear gits,
;-)
quoted
[...]

       git tag v1.1
       git format-patch v1.0
       cd /tmp/newmyrepo
       git am ~/myrepo/THEPATCHNAME

Where is tag v1.1 ?
Tags are not propagated with patches. Sorry.
Is this considered to be a bug to be eventually fixed or a feature?
AFAIK patches are not supposed to _contain_ patches.

What you want is probably a bundle. You don't want a collection of diffs 
with comments on them, but you want a collection to reacreate the history 
the other side has.

Ciao,
Dscho

Re: tags and patches

From: Geoff Russell <hidden>
Date: 2016-06-15 22:43:16

On 6/14/07, Johannes Schindelin [off-list ref] wrote:
Hi,

On Thu, 14 Jun 2007, Geoff Russell wrote:
quoted
On 6/13/07, Johannes Schindelin [off-list ref] wrote:
quoted
Hi,

On Wed, 13 Jun 2007, Geoff Russell wrote:
quoted
Dear gits,
;-)
quoted
[...]

       git tag v1.1
       git format-patch v1.0
       cd /tmp/newmyrepo
       git am ~/myrepo/THEPATCHNAME

Where is tag v1.1 ?
Tags are not propagated with patches. Sorry.
Is this considered to be a bug to be eventually fixed or a feature?
AFAIK patches are not supposed to _contain_ patches.
Is this a typo? I expected patches to contain tags, not other patches.
What you want is probably a bundle. You don't want a collection of diffs
with comments on them, but you want a collection to reacreate the history
the other side has.
I didn't know about bundles but do now.  However "git bundle --help" tells
me "No manual entry for git-bundle" despite
git-bundle.html being in the Documentation directory.

I'm trying to work out if I want to use git to manage a software distribution
problem. I distribute release v1.0 to people then later I want to email them
a patch to take them from v1.0 to v1.1.  I can probably live without
the tags, but
am just surprised that patches don't send them.


Cheers,
Geoff
Ciao,
Dscho

Re: tags and patches

From: Jeff King <hidden>
Date: 2016-06-15 22:43:16

On Thu, Jun 14, 2007 at 11:35:35AM +0930, Geoff Russell wrote:
I'm trying to work out if I want to use git to manage a software
distribution problem. I distribute release v1.0 to people then later I
want to email them a patch to take them from v1.0 to v1.1.  I can
probably live without the tags, but am just surprised that patches
don't send them.
Patches represent differences in _content_, but they don't show history.
So while git supports a somewhat extended patch format (supporting
things like renames and file modes), patches don't know anything about
branches, parent commits, or tags.

If you are trying to take people from v1.0 to v1.1, the best way depends
on their setup:

  - If they are all running git, then you can have them 'pull' from your
    repository
  - If you don't like that for some reason, you can send them a bundle,
    which is the moral equivalent of pulling (except that you've pushed
    through a non-interactive medium, but the end result in their
    repository is the same)
  - If they aren't running git, then you can use git to prepare the
    patch by tagging your own repository, and then creating either a
    patch series (git-format-patch v1.0..v1.1) or a single big patch
    (git-diff v1.0..v1.1). But either way, what would it mean to have a
    tag in the patch, since they don't have a tagging system at the
    other end?

I'm not really sure what you're trying to accomplish; if you can be more
concrete, we might be able to offer more concrete solutions (or maybe
the answer you were looking for was simply, "you want bundles, not
patches").

-Peff

Re: tags and patches

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:16

Hi,

On Thu, 14 Jun 2007, Geoff Russell wrote:
On 6/14/07, Johannes Schindelin [off-list ref] wrote:
quoted
AFAIK patches are not supposed to _contain_ patches.
Is this a typo? I expected patches to contain tags, not other patches.
Actually, two typos. Sorry. "AFAIK" -> "AFAICT", and the rest should 
actually have been written as "formatted patches are not supposed to 
contain tags."
quoted
What you want is probably a bundle. You don't want a collection of 
diffs with comments on them, but you want a collection to reacreate 
the history the other side has.
I didn't know about bundles but do now.  However "git bundle --help" 
tells me "No manual entry for git-bundle" despite git-bundle.html being 
in the Documentation directory.
... which probably means that your man pages, and therefore your Git 
installation, is not up-to-date.
I'm trying to work out if I want to use git to manage a software 
distribution problem. I distribute release v1.0 to people then later I 
want to email them a patch to take them from v1.0 to v1.1.  I can 
probably live without the tags, but am just surprised that patches don't 
send them.
Patches are just files of the format that "diff" outputs, and "patch" 
accepts. There was never any possibility to change anything but files.

But then, usually people put the version _into_ files. So I suspect you 
really don't need tags, if you _have_ to send patches. Because if you 
_have_ to send patches, your recipients probably don't use Git, and could 
not use those tags anyway.

Ciao,
Dscho

Re: tags and patches

From: Geoff Russell <hidden>
Date: 2016-06-15 22:43:16

On 6/14/07, Jeff King [off-list ref] wrote:
On Thu, Jun 14, 2007 at 11:35:35AM +0930, Geoff Russell wrote:
quoted
I'm trying to work out if I want to use git to manage a software
distribution problem. I distribute release v1.0 to people then later I
want to email them a patch to take them from v1.0 to v1.1.  I can
probably live without the tags, but am just surprised that patches
don't send them.
Patches represent differences in _content_, but they don't show history.
So while git supports a somewhat extended patch format (supporting
things like renames and file modes), patches don't know anything about
branches, parent commits, or tags.

If you are trying to take people from v1.0 to v1.1, the best way depends
on their setup:

  - If they are all running git, then you can have them 'pull' from your
    repository
  - If you don't like that for some reason, you can send them a bundle,
    which is the moral equivalent of pulling (except that you've pushed
    through a non-interactive medium, but the end result in their
    repository is the same)
  - If they aren't running git, then you can use git to prepare the
    patch by tagging your own repository, and then creating either a
    patch series (git-format-patch v1.0..v1.1) or a single big patch
    (git-diff v1.0..v1.1). But either way, what would it mean to have a
    tag in the patch, since they don't have a tagging system at the
    other end?

I'm not really sure what you're trying to accomplish; if you can be more
concrete, we might be able to offer more concrete solutions (or maybe
the answer you were looking for was simply, "you want bundles, not
patches").
Ok (in english we have an expression "the penny has dropped" :)), I understand
my confusion and no longer am surprised that patches don't have tags!
I think that we will ensure everyone is running git (but we will ssh into their
machines and do the appropriate pulls).

Many thanks for your help and patience,

Cheers,
Geoff


-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help