All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] buildhistory: record removals with Git 2.0 and later
@ 2013-05-31  9:42 Jonathan Liu
  2013-05-31 10:29 ` Jonathan Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Liu @ 2013-05-31  9:42 UTC (permalink / raw)
  To: openembedded-core

There is a behavior change with Git 2.0 where "git add ." will no
longer record removals by default unless -A (--all) is specified.
Change to "git add -A ." so removals are recorded with Git 2.0 and
later.

Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 meta/classes/buildhistory.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index d39408b..b12da4a 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -510,7 +510,7 @@ END
 		repostatus=`git status --porcelain | grep -v " metadata-revs$"`
 		HOSTNAME=`hostname 2>/dev/null || echo unknown`
 		if [ "$repostatus" != "" ] ; then
-			git add .
+			git add -A .
 			# porcelain output looks like "?? packages/foo/bar"
 			# Ensure we commit metadata-revs with the first commit
 			for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
-- 
1.8.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] buildhistory: record removals with Git 2.0 and later
  2013-05-31  9:42 [PATCH] buildhistory: record removals with Git 2.0 and later Jonathan Liu
@ 2013-05-31 10:29 ` Jonathan Liu
  2013-05-31 10:31   ` Jonathan Liu
  2013-05-31 10:42   ` Paul Eggleton
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Liu @ 2013-05-31 10:29 UTC (permalink / raw)
  To: Jonathan Liu; +Cc: openembedded-core

On 31/05/2013 7:42 PM, Jonathan Liu wrote:
> There is a behavior change with Git 2.0 where "git add ." will no
> longer record removals by default unless -A (--all) is specified.
> Change to "git add -A ." so removals are recorded with Git 2.0 and
> later.
>
> Signed-off-by: Jonathan Liu <net147@gmail.com>
> ---
>   meta/classes/buildhistory.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Hmm... looks like I interpreted the Git warning incorrectly. Maybe I 
need to look into this a bit more and perhaps change the commit message.

The following appears after a build with buildhistory enabled:
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'test.txt' that are
removed from your working tree are ignored with this version of Git.

* 'git add --ignore-removal <pathspec>', which is the current default,
   ignores paths you removed from your working tree.

* 'git add --all <pathspec>' will let you also record the removals.

Run 'git status' to check the paths you removed from your working tree.

Regards,
Jonathan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] buildhistory: record removals with Git 2.0 and later
  2013-05-31 10:29 ` Jonathan Liu
@ 2013-05-31 10:31   ` Jonathan Liu
  2013-05-31 10:42   ` Paul Eggleton
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Liu @ 2013-05-31 10:31 UTC (permalink / raw)
  To: Jonathan Liu; +Cc: openembedded-core

On 31/05/2013 8:29 PM, Jonathan Liu wrote:
> On 31/05/2013 7:42 PM, Jonathan Liu wrote:
>> There is a behavior change with Git 2.0 where "git add ." will no
>> longer record removals by default unless -A (--all) is specified.
>> Change to "git add -A ." so removals are recorded with Git 2.0 and
>> later.
>>
>> Signed-off-by: Jonathan Liu <net147@gmail.com>
>> ---
>>   meta/classes/buildhistory.bbclass | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> Hmm... looks like I interpreted the Git warning incorrectly. Maybe I 
> need to look into this a bit more and perhaps change the commit message.
>
> The following appears after a build with buildhistory enabled:
> warning: You ran 'git add' with neither '-A (--all)' or 
> '--ignore-removal',
> whose behaviour will change in Git 2.0 with respect to paths you removed.
> Paths like 'test.txt' that are
> removed from your working tree are ignored with this version of Git.
>
> * 'git add --ignore-removal <pathspec>', which is the current default,
>   ignores paths you removed from your working tree.
>
> * 'git add --all <pathspec>' will let you also record the removals.
>
> Run 'git status' to check the paths you removed from your working tree.
>
> Regards,
> Jonathan
The warning appears in Git 1.8.3. The path removed was the package 
information for a kernel module after updating from 3.8.11 to 3.8.13.

Regards,
Jonathan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] buildhistory: record removals with Git 2.0 and later
  2013-05-31 10:29 ` Jonathan Liu
  2013-05-31 10:31   ` Jonathan Liu
@ 2013-05-31 10:42   ` Paul Eggleton
  2013-05-31 10:50     ` Paul Eggleton
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2013-05-31 10:42 UTC (permalink / raw)
  To: Jonathan Liu; +Cc: openembedded-core

On Friday 31 May 2013 20:29:19 Jonathan Liu wrote:
> On 31/05/2013 7:42 PM, Jonathan Liu wrote:
> > There is a behavior change with Git 2.0 where "git add ." will no
> > longer record removals by default unless -A (--all) is specified.
> > Change to "git add -A ." so removals are recorded with Git 2.0 and
> > later.
> > 
> > Signed-off-by: Jonathan Liu <net147@gmail.com>
> > ---
> > 
> >   meta/classes/buildhistory.bbclass | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hmm... looks like I interpreted the Git warning incorrectly. Maybe I
> need to look into this a bit more and perhaps change the commit message.
> 
> The following appears after a build with buildhistory enabled:
> warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
> whose behaviour will change in Git 2.0 with respect to paths you removed.
> Paths like 'test.txt' that are
> removed from your working tree are ignored with this version of Git.
> 
> * 'git add --ignore-removal <pathspec>', which is the current default,
>    ignores paths you removed from your working tree.
> 
> * 'git add --all <pathspec>' will let you also record the removals.
> 
> Run 'git status' to check the paths you removed from your working tree.

So it seems the change is reasonable but yes perhaps the commit message should 
change to mention that it also avoids a warning with 1.8.3.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] buildhistory: record removals with Git 2.0 and later
  2013-05-31 10:42   ` Paul Eggleton
@ 2013-05-31 10:50     ` Paul Eggleton
  2013-05-31 10:52       ` Jonathan Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2013-05-31 10:50 UTC (permalink / raw)
  To: Jonathan Liu; +Cc: openembedded-core

On Friday 31 May 2013 11:42:27 Paul Eggleton wrote:
> On Friday 31 May 2013 20:29:19 Jonathan Liu wrote:
> > On 31/05/2013 7:42 PM, Jonathan Liu wrote:
> > > There is a behavior change with Git 2.0 where "git add ." will no
> > > longer record removals by default unless -A (--all) is specified.
> > > Change to "git add -A ." so removals are recorded with Git 2.0 and
> > > later.
> > > 
> > > Signed-off-by: Jonathan Liu <net147@gmail.com>
> > > ---
> > > 
> > >   meta/classes/buildhistory.bbclass | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Hmm... looks like I interpreted the Git warning incorrectly. Maybe I
> > need to look into this a bit more and perhaps change the commit message.
> > 
> > The following appears after a build with buildhistory enabled:
> > warning: You ran 'git add' with neither '-A (--all)' or
> > '--ignore-removal',
> > whose behaviour will change in Git 2.0 with respect to paths you removed.
> > Paths like 'test.txt' that are
> > removed from your working tree are ignored with this version of Git.
> > 
> > * 'git add --ignore-removal <pathspec>', which is the current default,
> > 
> >    ignores paths you removed from your working tree.
> > 
> > * 'git add --all <pathspec>' will let you also record the removals.
> > 
> > Run 'git status' to check the paths you removed from your working tree.
> 
> So it seems the change is reasonable but yes perhaps the commit message
> should change to mention that it also avoids a warning with 1.8.3.

Hmm, I misread - looks like we should be using -A or --all right now since we 
do want deleted files to be recorded.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] buildhistory: record removals with Git 2.0 and later
  2013-05-31 10:50     ` Paul Eggleton
@ 2013-05-31 10:52       ` Jonathan Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Liu @ 2013-05-31 10:52 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 31/05/2013 8:50 PM, Paul Eggleton wrote:
> On Friday 31 May 2013 11:42:27 Paul Eggleton wrote:
>> On Friday 31 May 2013 20:29:19 Jonathan Liu wrote:
>>> On 31/05/2013 7:42 PM, Jonathan Liu wrote:
>>>> There is a behavior change with Git 2.0 where "git add ." will no
>>>> longer record removals by default unless -A (--all) is specified.
>>>> Change to "git add -A ." so removals are recorded with Git 2.0 and
>>>> later.
>>>>
>>>> Signed-off-by: Jonathan Liu <net147@gmail.com>
>>>> ---
>>>>
>>>>    meta/classes/buildhistory.bbclass | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>> Hmm... looks like I interpreted the Git warning incorrectly. Maybe I
>>> need to look into this a bit more and perhaps change the commit message.
>>>
>>> The following appears after a build with buildhistory enabled:
>>> warning: You ran 'git add' with neither '-A (--all)' or
>>> '--ignore-removal',
>>> whose behaviour will change in Git 2.0 with respect to paths you removed.
>>> Paths like 'test.txt' that are
>>> removed from your working tree are ignored with this version of Git.
>>>
>>> * 'git add --ignore-removal <pathspec>', which is the current default,
>>>
>>>     ignores paths you removed from your working tree.
>>>
>>> * 'git add --all <pathspec>' will let you also record the removals.
>>>
>>> Run 'git status' to check the paths you removed from your working tree.
>> So it seems the change is reasonable but yes perhaps the commit message
>> should change to mention that it also avoids a warning with 1.8.3.
> Hmm, I misread - looks like we should be using -A or --all right now since we
> do want deleted files to be recorded.
>
> Cheers,
> Paul
>
Updated patch submitted.

Regards,
Jonathan


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-31 10:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31  9:42 [PATCH] buildhistory: record removals with Git 2.0 and later Jonathan Liu
2013-05-31 10:29 ` Jonathan Liu
2013-05-31 10:31   ` Jonathan Liu
2013-05-31 10:42   ` Paul Eggleton
2013-05-31 10:50     ` Paul Eggleton
2013-05-31 10:52       ` Jonathan Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.