* tags and patches
@ 2007-06-13 10:52 Geoff Russell
2007-06-13 11:04 ` Pierre Habouzit
2007-06-13 12:14 ` Johannes Schindelin
0 siblings, 2 replies; 10+ messages in thread
From: Geoff Russell @ 2007-06-13 10:52 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: tags and patches 2007-06-13 10:52 tags and patches Geoff Russell @ 2007-06-13 11:04 ` Pierre Habouzit 2007-06-13 12:04 ` Geoff Russell 2007-06-13 12:14 ` Johannes Schindelin 1 sibling, 1 reply; 10+ messages in thread From: Pierre Habouzit @ 2007-06-13 11:04 UTC (permalink / raw) To: Geoff Russell; +Cc: git [-- Attachment #1: Type: text/plain, Size: 1174 bytes --] 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 [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-13 11:04 ` Pierre Habouzit @ 2007-06-13 12:04 ` Geoff Russell 0 siblings, 0 replies; 10+ messages in thread From: Geoff Russell @ 2007-06-13 12:04 UTC (permalink / raw) To: git On 6/13/07, Pierre Habouzit <madcoder@debian.org> wrote: > 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 :) 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 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-13 10:52 tags and patches Geoff Russell 2007-06-13 11:04 ` Pierre Habouzit @ 2007-06-13 12:14 ` Johannes Schindelin 2007-06-14 0:15 ` Geoff Russell 1 sibling, 1 reply; 10+ messages in thread From: Johannes Schindelin @ 2007-06-13 12:14 UTC (permalink / raw) To: Geoff Russell; +Cc: git 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-13 12:14 ` Johannes Schindelin @ 2007-06-14 0:15 ` Geoff Russell 2007-06-14 1:03 ` Johannes Schindelin 0 siblings, 1 reply; 10+ messages in thread From: Geoff Russell @ 2007-06-14 0:15 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git On 6/13/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > 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. Is this considered to be a bug to be eventually fixed or a feature? Geoff > > Ciao, > Dscho > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-14 0:15 ` Geoff Russell @ 2007-06-14 1:03 ` Johannes Schindelin 2007-06-14 2:05 ` Geoff Russell 0 siblings, 1 reply; 10+ messages in thread From: Johannes Schindelin @ 2007-06-14 1:03 UTC (permalink / raw) To: Geoff Russell; +Cc: git Hi, On Thu, 14 Jun 2007, Geoff Russell wrote: > On 6/13/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > > 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. > > 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-14 1:03 ` Johannes Schindelin @ 2007-06-14 2:05 ` Geoff Russell 2007-06-14 2:19 ` Jeff King 2007-06-14 2:31 ` Johannes Schindelin 0 siblings, 2 replies; 10+ messages in thread From: Geoff Russell @ 2007-06-14 2:05 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git On 6/14/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > Hi, > > On Thu, 14 Jun 2007, Geoff Russell wrote: > > > On 6/13/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > > > 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. > > > > 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 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-14 2:05 ` Geoff Russell @ 2007-06-14 2:19 ` Jeff King 2007-06-14 2:50 ` Geoff Russell 2007-06-14 2:31 ` Johannes Schindelin 1 sibling, 1 reply; 10+ messages in thread From: Jeff King @ 2007-06-14 2:19 UTC (permalink / raw) To: Geoff Russell; +Cc: Johannes Schindelin, git 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-14 2:19 ` Jeff King @ 2007-06-14 2:50 ` Geoff Russell 0 siblings, 0 replies; 10+ messages in thread From: Geoff Russell @ 2007-06-14 2:50 UTC (permalink / raw) To: Jeff King; +Cc: Johannes Schindelin, git On 6/14/07, Jeff King <peff@peff.net> wrote: > 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"). 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 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tags and patches 2007-06-14 2:05 ` Geoff Russell 2007-06-14 2:19 ` Jeff King @ 2007-06-14 2:31 ` Johannes Schindelin 1 sibling, 0 replies; 10+ messages in thread From: Johannes Schindelin @ 2007-06-14 2:31 UTC (permalink / raw) To: Geoff Russell; +Cc: git Hi, On Thu, 14 Jun 2007, Geoff Russell wrote: > On 6/14/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > > > 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." > > 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-06-14 2:51 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-06-13 10:52 tags and patches Geoff Russell 2007-06-13 11:04 ` Pierre Habouzit 2007-06-13 12:04 ` Geoff Russell 2007-06-13 12:14 ` Johannes Schindelin 2007-06-14 0:15 ` Geoff Russell 2007-06-14 1:03 ` Johannes Schindelin 2007-06-14 2:05 ` Geoff Russell 2007-06-14 2:19 ` Jeff King 2007-06-14 2:50 ` Geoff Russell 2007-06-14 2:31 ` Johannes Schindelin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).